From 149af27b9c95041599d3d5ad17a605b4ee686ef1 Mon Sep 17 00:00:00 2001 From: KeybadeBlox Date: Tue, 17 Feb 2026 09:56:58 -0500 Subject: [PATCH] Fix CRT calling conventions --- decompile/src/XDK/CRT/CRT0.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/decompile/src/XDK/CRT/CRT0.cpp b/decompile/src/XDK/CRT/CRT0.cpp index c305130..729e597 100644 --- a/decompile/src/XDK/CRT/CRT0.cpp +++ b/decompile/src/XDK/CRT/CRT0.cpp @@ -12,13 +12,13 @@ treatment from the compiler and linker. int main(); - void __stdcall mainCRTStartup (); -static DWORD _mainXapiStartup(LPVOID lpThreadParameter); + void __cdecl mainCRTStartup (); +static DWORD __stdcall mainXapiStartup(LPVOID lpThreadParameter); // Address: 0x00148023 // Matching: no -void __stdcall mainCRTStartup() { +void __cdecl mainCRTStartup() { /* The true entrypoint of the game, spawning a thread for the rest to run in The linker automatically sets this function to the entrypoint. */ @@ -26,7 +26,7 @@ The linker automatically sets this function to the entrypoint. // Address: 0x00147FB4 // Matching: no -DWORD _mainXapiStartup(LPVOID const lpThreadParameter) { +DWORD __stdcall mainXapiStartup(LPVOID const lpThreadParameter) { /* Runs some initialization and then calls main() */ main(); return 0;