From 5e962d6eb02dfa23f4c2be80cdd47d010b91770a Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Mon, 11 Nov 2024 13:56:01 +0100 Subject: [PATCH] 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. --- src/loader/loader.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/loader/loader.cpp b/src/loader/loader.cpp index 39bc1beb..8ad13f6f 100644 --- a/src/loader/loader.cpp +++ b/src/loader/loader.cpp @@ -11,17 +11,16 @@ // The executable exports table has been restructured; the exported function // 'GetDenuvoTimeTicketRequest' has been swapped with 'CreateGlobalMemAlloc', // the exported 'IEngineAPI' interface accessor has been replaced with -// 'g_pMemAllocSingleton', and the exported function 'LauncherMain' has been -// swapped with 'WinMain', so we can obtain the addresses without hardcoding. +// 'g_pMemAllocSingleton', so we can obtain the addresses without hardcoding. // // These changes allow us to load the SDK in the following order: // - Create game process // - 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. // -// Since WinMain is called before anything of the game is, we can still hook -// and modify anything of the game before it starts. With the above order of +// Since LauncherMain is called before anything of the game is, we can still +// 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 // of the game, by: //