//
// sub_100667EE0 from 0x100667ee0 to 0x100667f16 (54 bytes)
//
// 1 xrefs:
// > sub_100720280 @ 0x100720289
//
// 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_100667EE0(__int64 a1, unsigned int a2)
{
__int64 result; // rax
cocos2d::CCObject *v4; // rdi
__int64 v5; // rcx
result = *(_QWORD *)(a1 + 16);
v4 = *(cocos2d::CCObject **)(result + 8LL * a2);
if ( v4 )
{
cocos2d::CCObject::release(v4);
result = *(_QWORD *)(a1 + 16);
}
v5 = (unsigned int)(*(_DWORD *)a1 - 1);
*(_DWORD *)a1 = v5;
*(_QWORD *)(result + 8LL * a2) = *(_QWORD *)(result + 8 * v5);
return result;
}