//
// sub_1007CAEB0 from 0x1007caeb0 to 0x1007caf1d (109 bytes)
//
// 1 xrefs:
// > ??> @ 0x100996a68
//
// 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
//
__int64 __fastcall sub_1007CAEB0(__int64 a1, cocos2d::CCObject *a2)
{
cocos2d::CCObject *v3; // rdi
__int64 result; // rax
v3 = *(cocos2d::CCObject **)(a1 + 344);
if ( v3 != a2 )
{
if ( a2 )
{
cocos2d::CCObject::retain(a2);
v3 = *(cocos2d::CCObject **)(a1 + 344);
}
if ( v3 )
cocos2d::CCObject::release(v3);
*(_QWORD *)(a1 + 344) = a2;
return (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)(a1 - 320) + 1624LL))(a1 - 320);
}
return result;
}