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.
Code:
/**
* Detour Prototypes
*/
extern "C"
{
FARPROC /**/(WINAPI *Real_GetProcAddress)(HMODULE, LPCSTR) = GetProcAddress;
};
/**
* kernel32!GetProcAddress Detour Callback
*/
FARPROC __stdcall Mine_GetProcAddress(HMODULE hModule, LPCSTR lpProcName)
{
// Prevent the splash screen from showing..
if (lpProcName != nullptr && ((DWORD)lpProcName & 0xFFF000) && strncmp("ShowNostaleSplash", lpProcName, 17) == 0)
return nullptr;
return Real_GetProcAddress(hModule, lpProcName);
}
// Apply the detour:
::DetourTransactionBegin();
::DetourUpdateThread(::GetCurrentThread());
::DetourAttach(&(PVOID&)Real_GetProcAddress, Mine_GetProcAddress);
::DetourTransactionCommit();