Loader: update SDK loader documentation

The loader no longer loads from WinMain as this caused problems during shutdown. It was switched back to LauncherMain with several adjustments to make it work perfectly for both initialization and shutdown.
This commit is contained in:
Kawe Mazidjatari 2024-11-11 13:56:01 +01:00
parent 50b4c559c6
commit 5e962d6eb0

View File

@ -11,17 +11,16 @@
// The executable exports table has been restructured; the exported function // The executable exports table has been restructured; the exported function
// 'GetDenuvoTimeTicketRequest' has been swapped with 'CreateGlobalMemAlloc', // 'GetDenuvoTimeTicketRequest' has been swapped with 'CreateGlobalMemAlloc',
// the exported 'IEngineAPI' interface accessor has been replaced with // the exported 'IEngineAPI' interface accessor has been replaced with
// 'g_pMemAllocSingleton', and the exported function 'LauncherMain' has been // 'g_pMemAllocSingleton', so we can obtain the addresses without hardcoding.
// swapped with 'WinMain', so we can obtain the addresses without hardcoding.
// //
// These changes allow us to load the SDK in the following order: // These changes allow us to load the SDK in the following order:
// - Create game process // - Create game process
// - Import this loader stub by its dummy export. // - Import this loader stub by its dummy export.
// - Immediately hook 'WinMain', by getting a pointer to it from its exports. // - Immediately hook 'LauncherMain' by getting the address from the exports.
// - Determine if, and which SDK module to load. // - Determine if, and which SDK module to load.
// //
// Since WinMain is called before anything of the game is, we can still hook // Since LauncherMain is called before anything of the game is, we can still
// and modify anything of the game before it starts. With the above order of // hook and modify anything of the game before it starts. With this order of
// initialization, we can now replace the standard memalloc system with that // initialization, we can now replace the standard memalloc system with that
// of the game, by: // of the game, by:
// //