//
// sub_18009D610 from 0x18009d610 to 0x18009d679 (105 bytes)
//
// 13 xrefs:
// > cocos2d::CCNode::addChild @ 0x180002c38
// > cocos2d::CCNode::insertChild @ 0x1800036d2
// > cocos2d::CCArray::addObject @ 0x180006884
// > cocos2d::CCArray::copyWithZone @ 0x180006987
// > cocos2d::CCArray::create @ 0x180006a0a
// > cocos2d::CCArray::create @ 0x180006a27
// > cocos2d::CCArray::createWithObject @ 0x180006e1a
// > cocos2d::CCArray::initWithObject @ 0x180006ff4
// > cocos2d::CCArray::initWithObjects @ 0x180007047
// > cocos2d::CCArray::initWithObjects @ 0x180007066
// > cocos2d::CCParallaxNode::addChild @ 0x1800aabd8
// > ??> @ 0x1801b73d4
// > ??> @ 0x1801b73e0
//
// 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_18009D610(__int64 a1, cocos2d::CCObject *a2)
{
unsigned int i; // ecx
unsigned int v5; // eax
void *v6; // rcx
__int64 result; // rax
for ( i = *(_DWORD *)(a1 + 4); i < *(_DWORD *)a1 + 1; i = *(_DWORD *)(a1 + 4) )
{
v5 = 2 * i;
v6 = *(void **)(a1 + 16);
*(_DWORD *)(a1 + 4) = v5;
*(_QWORD *)(a1 + 16) = realloc(v6, 8LL * v5);
}
cocos2d::CCObject::retain(a2);
result = *(_QWORD *)(a1 + 16);
*(_QWORD *)(result + 8LL * (unsigned int)(*(_DWORD *)a1)++) = a2;
return result;
}