Page 1 of 1

[SOURCE] Remove Nostale Splash Screen

Posted: Mon Nov 14, 2016 10:46 am
by atom0s
Here is a simple Detours hook to remove the splash screen. Again, this requires 0 editing of the main game file and is done via DLL injection.
  1. /**
  2.  * Detour Prototypes
  3.  */
  4. extern "C"
  5. {
  6.     FARPROC     /**/(WINAPI *Real_GetProcAddress)(HMODULE, LPCSTR) = GetProcAddress;
  7. };
  8.  
  9.  
  10. /**
  11.  * kernel32!GetProcAddress Detour Callback
  12.  */
  13. FARPROC __stdcall Mine_GetProcAddress(HMODULE hModule, LPCSTR lpProcName)
  14. {
  15.     // Prevent the splash screen from showing..
  16.     if (lpProcName != nullptr && ((DWORD)lpProcName & 0xFFF000) && strncmp("ShowNostaleSplash", lpProcName, 17) == 0)
  17.         return nullptr;
  18.  
  19.  
  20.     return Real_GetProcAddress(hModule, lpProcName);
  21. }
  22.  
  23.  
  24. // Apply the detour:
  25. ::DetourTransactionBegin();
  26. ::DetourUpdateThread(::GetCurrentThread());
  27. ::DetourAttach(&(PVOID&)Real_GetProcAddress, Mine_GetProcAddress);
  28. ::DetourTransactionCommit();