//
// sub_10059A590 from 0x10059a590 to 0x10059a5ef (95 bytes)
//
// 1 xrefs:
// > ??> @ 0x1009709c8
//
// 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
//
cocos2d::CCScriptEngineManager *__fastcall sub_10059A590(__int64 a1)
{
*(_QWORD *)a1 = off_1009709C0;
if ( (*(_BYTE *)(a1 + 112) & 1) == 0 )
{
if ( (*(_BYTE *)(a1 + 88) & 1) == 0 )
goto LABEL_3;
LABEL_7:
operator delete(*(void **)(a1 + 104));
if ( (*(_BYTE *)(a1 + 64) & 1) == 0 )
return cocos2d::CCObject::dCCObject((cocos2d::CCObject *)a1);
goto LABEL_4;
}
operator delete(*(void **)(a1 + 128));
if ( (*(_BYTE *)(a1 + 88) & 1) != 0 )
goto LABEL_7;
LABEL_3:
if ( (*(_BYTE *)(a1 + 64) & 1) != 0 )
LABEL_4:
operator delete(*(void **)(a1 + 80));
return cocos2d::CCObject::dCCObject((cocos2d::CCObject *)a1);
}