//
// sub_1007204B0 from 0x1007204b0 to 0x10072057f (207 bytes)
//
// 2 xrefs:
// > ??> @ 0x100935bb8
// > ??> @ 0x100989a08
//
// 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
//
void *__fastcall sub_1007204B0(__int64 a1)
{
void *v1; // rbx
int v2; // r12d
unsigned int *v3; // rax
__int64 (__fastcall ****v4)(_QWORD, _QWORD); // r12
unsigned __int64 v5; // r13
cocos2d::CCObject *v6; // r15
v1 = operator new(0x40u);
cocos2d::CCObject::CCObject((__int64)v1);
*(_QWORD *)v1 = off_100989A08;
*((_QWORD *)v1 + 7) = 0;
sub_100667290((void **)v1 + 7);
*((_QWORD *)v1 + 7) = sub_100667240(1);
v2 = (**(_DWORD **)(a1 + 56) == 0) + **(_DWORD **)(a1 + 56);
sub_100667290((void **)v1 + 7);
*((_QWORD *)v1 + 7) = sub_100667240(v2);
v3 = *(unsigned int **)(a1 + 56);
if ( *v3 )
{
v4 = *((__int64 (__fastcall *****)(_QWORD, _QWORD))v3 + 2);
v5 = (unsigned __int64)&v4[*v3 - 1];
do
{
if ( !*v4 )
break;
v6 = (cocos2d::CCObject *)sub_10048AAA0(*v4);
sub_1006676C0(*((unsigned int **)v1 + 7), v6);
cocos2d::CCObject::release(v6);
++v4;
}
while ( (unsigned __int64)v4 <= v5 );
}
return v1;
}