//
// _onexit from 0x140677a3c to 0x140677a76 (58 bytes)
//
// 2 xrefs:
// > atexit @ 0x140677a7c
// > ??> @ 0x1409326fc
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:36:00 +0000
//
_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;
}