Fix CRT calling conventions

This commit is contained in:
KeybadeBlox 2026-02-17 09:56:58 -05:00
parent 5d22c39db6
commit 149af27b9c

View file

@ -12,13 +12,13 @@ treatment from the compiler and linker.
int main(); int main();
void __stdcall mainCRTStartup (); void __cdecl mainCRTStartup ();
static DWORD _mainXapiStartup(LPVOID lpThreadParameter); static DWORD __stdcall mainXapiStartup(LPVOID lpThreadParameter);
// Address: 0x00148023 // Address: 0x00148023
// Matching: no // Matching: no
void __stdcall mainCRTStartup() { void __cdecl mainCRTStartup() {
/* The true entrypoint of the game, spawning a thread for the rest to run in /* The true entrypoint of the game, spawning a thread for the rest to run in
The linker automatically sets this function to the entrypoint. The linker automatically sets this function to the entrypoint.
*/ */
@ -26,7 +26,7 @@ The linker automatically sets this function to the entrypoint.
// Address: 0x00147FB4 // Address: 0x00147FB4
// Matching: no // Matching: no
DWORD _mainXapiStartup(LPVOID const lpThreadParameter) { DWORD __stdcall mainXapiStartup(LPVOID const lpThreadParameter) {
/* Runs some initialization and then calls main() */ /* Runs some initialization and then calls main() */
main(); main();
return 0; return 0;