benilla-re systems structs docs

s_exitCode

global · storm

Address
0xc53bd8 · 4 bytes, up to 0xc53bdb
Type
uint32_t
Meaning
Holds the code the C runtime exit passes to ExitProcess
Confidence
verified, proof one
Finding
core/close#c-runtime-exit

Finding: C runtime exit in core: closing the window

0x4021e4 then calls 0x64cbf0, which registers 0x64cc30 (0x64cc18) last. WinMain returns to the start code (0x40999b), which calls _exit. Storm's exit function, registered last, runs first and calls __cexit, whose _doexit runs every other exit function from the last registered to the first; Storm then shuts down and __exit ends with ExitProcess.

The derivation is in the doc.