//
// _onexit from 0x18001f6ac to 0x18001f6e6 (58 bytes)
//
// 2 xrefs:
// > atexit @ 0x18001f6ec
// > ??> @ 0x18004b214
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
_onexit_t __cdecl onexit(_onexit_t Func)
{
int v2; // eax
int (__cdecl *v3)(); // rdx
if ( Table._first == (_PVFV *)-1LL )
v2 = crt_atexit((_PVFV)Func);
else
v2 = register_onexit_function(&Table, Func);
v3 = nullptr;
if ( !v2 )
return Func;
return v3;
}