//
// cocos2d::CCArray::copyWithZone from 0xad44ec to 0xad4590 (164 bytes)
//
// 3 xrefs:
// > ??> @ 0x79ef0
// > ??> @ 0x11f9760
// > ??> @ 0x1200bf0
//
// 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
//
cocos2d::CCArray *__fastcall cocos2d::CCArray::copyWithZone(cocos2d::CCArray *this, cocos2d::CCZone *a2)
{
cocos2d::CCArray *v3; // x22
unsigned __int64 v4; // x1
cocos2d::ccArray *data; // x1
cocos2d::CCObject **arr; // x19
cocos2d::CCObject **v7; // x21
cocos2d::_ccArray *v8; // x20
cocos2d::CCObject *v9; // x2
v3 = (cocos2d::CCArray *)operator new(0x40u);
cocos2d::CCArray::CCArray(v3);
LODWORD(v4) = this->data->num;
if ( (_DWORD)v4 )
v4 = (unsigned int)v4;
else
v4 = 1;
cocos2d::CCArray::initWithCapacity(v3, (cocos2d::_ccArray **)v4);
data = this->data;
if ( data->num )
{
arr = data->arr;
v7 = &arr[data->num - 1];
while ( v7 >= arr )
{
if ( !*arr )
break;
v8 = (cocos2d::_ccArray *)cocos2d::CCObject::copy(*arr++);
cocos2d::CCArray::addObject(v3, v8, v9);
cocos2d::CCObject::release((cocos2d::CCObject *)v8);
}
}
return v3;
}