//
// cocos2d::CCObject::dCCObject from 0x10047ffd0 to 0x100480036 (102 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b4c798
//
// 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 12:30:39 +0000
//
__int64 *__fastcall cocos2d::CCObject::dCCObject(__int64 a1)
{
_QWORD *v2; // rax
__int64 v3; // rdi
__int64 *result; // rax
__int64 v5; // r14
*(_QWORD *)a1 = off_100B4C790;
if ( *(_DWORD *)(a1 + 24) )
{
v2 = cocos2d::CCPoolManager::sharedPoolManager();
cocos2d::CCPoolManager::removeObject((__int64)v2, a1);
}
if ( *(_DWORD *)(a1 + 12) )
{
v3 = *cocos2d::CCScriptEngineManager::sharedManager();
return (__int64 *)(*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 24LL))(v3, a1);
}
result = cocos2d::CCScriptEngineManager::sharedManager();
v5 = *result;
if ( *result )
{
result = (__int64 *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v5 + 16LL))(v5);
v3 = v5;
if ( (_DWORD)result == 2 )
return (__int64 *)(*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v3 + 24LL))(v3, a1);
}
return result;
}