mirror of
https://codeberg.org/KeybadeBlox/JSRF-Decompilation.git
synced 2026-02-20 10:17:03 +03:00
Tiny steps towards implementing C runtime
This commit is contained in:
parent
ccd2cd37a5
commit
c38d9b5628
6 changed files with 65 additions and 14 deletions
32
decompile/src/XDK/CRT/CRT0.cpp
Normal file
32
decompile/src/XDK/CRT/CRT0.cpp
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
/* JSRF Decompilation: XDK/CRT0.cpp
|
||||
C runtime initialization.
|
||||
Like other CRT code, there's some magic here with symbols that get special
|
||||
treatment from the compiler and linker.
|
||||
*/
|
||||
|
||||
#include "Win32.hpp"
|
||||
|
||||
|
||||
// Every program is supposed to have a main(), so we can just assume its
|
||||
// existence with a declaration here
|
||||
int main();
|
||||
|
||||
|
||||
void __stdcall mainCRTStartup ();
|
||||
static DWORD _mainXapiStartup(LPVOID lpThreadParameter);
|
||||
|
||||
|
||||
// Address: 0x00148023
|
||||
// Matching: no
|
||||
void __stdcall 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.
|
||||
*/
|
||||
}
|
||||
|
||||
// Address: 0x00147FB4
|
||||
// Matching: no
|
||||
DWORD _mainXapiStartup(LPVOID const lpThreadParameter) {
|
||||
/* Runs some initialization and then calls main() */
|
||||
main();
|
||||
}
|
||||
|
|
@ -32,10 +32,6 @@ typedef int BOOL;
|
|||
|
||||
// 64-bit integer compatibility type
|
||||
union LARGE_INTEGER {
|
||||
struct {
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
};
|
||||
struct {
|
||||
DWORD LowPart;
|
||||
LONG HighPart;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue