//
// cocos2d::CCArray::copyWithZone from 0x1800068d0 to 0x1800069b3 (227 bytes)
//
// 3 xrefs:
// > ??> @ 0x1800e62c0
// > ??> @ 0x1801438a8
// > ??> @ 0x1801ad90c
//
// 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
//
// Hidden C++ exception states: #wind=2
struct cocos2d::CCObject *__fastcall cocos2d::CCArray::copyWithZone(cocos2d::CCArray *this, struct cocos2d::CCZone *a2)
{
cocos2d::CCObject *v3; // rax
_QWORD *v4; // rsi
unsigned int num; // edi
cocos2d::ccArray *data; // rbx
__int64 v7; // rax
cocos2d::CCObject **arr; // rbx
cocos2d::CCObject **i; // rbp
cocos2d::CCObject *v10; // rdi
v3 = (cocos2d::CCObject *)operator new(0x40u);
v4 = &v3->__vftable;
num = 1;
if ( v3 )
{
cocos2d::CCObject::CCObject(v3);
*v4 = &cocos2d::CCArray::`vftable';
v4[7] = 0;
sub_18009DA50(v4 + 7);
v4[7] = sub_18009DC90(1u);
}
else
{
v4 = nullptr;
}
if ( this->data->num )
num = this->data->num;
sub_18009DA50(v4 + 7);
v4[7] = sub_18009DC90(num);
data = this->data;
v7 = data->num;
if ( (_DWORD)v7 )
{
arr = data->arr;
for ( i = &arr[v7 - 1]; arr <= i; ++arr )
{
if ( !*arr )
break;
v10 = cocos2d::CCObject::copy(*arr);
sub_18009D610(v4[7], v10);
cocos2d::CCObject::release(v10);
}
}
return (struct cocos2d::CCObject *)v4;
}