//
// cocos2d::CCDictionary::copyWithZone from 0xd4405c to 0xd44198 (316 bytes)
//
// 2 xrefs:
// > ??> @ 0xd80d0
// > ??> @ 0x1516300
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:07:32 +0000
//
cocos2d::CCDictionary *__fastcall cocos2d::CCDictionary::copyWithZone(cocos2d::CCDictionary *this, cocos2d::CCZone *a2)
{
cocos2d::CCDictionary *v3; // x23
int v4; // w0
__int64 v6; // x20
__int64 j; // x21
__int64 v8; // x0
cocos2d::CCObject *v9; // x22
size_t v10; // x0
__int64 v11; // x20
__int64 i; // x19
cocos2d::CCObject *v13; // x21
__int64 v14[2]; // [xsp+40h] [xbp+40h] BYREF
void *v15; // [xsp+50h] [xbp+50h]
v3 = (cocos2d::CCDictionary *)operator new(0x48u);
cocos2d::CCDictionary::CCDictionary(v3);
v4 = *((_DWORD *)this + 16);
if ( v4 == 2 )
{
v11 = *((_QWORD *)this + 7);
if ( v11 )
{
for ( i = *(_QWORD *)(v11 + 288); ; i = *(_QWORD *)(i + 288) )
{
v13 = (cocos2d::CCObject *)cocos2d::CCObject::copy(*(cocos2d::CCObject **)(v11 + 264));
cocos2d::CCDictionary::setObject(v3, v13, *(_QWORD *)(v11 + 256));
cocos2d::CCObject::release(v13);
if ( !i )
break;
v11 = i;
}
}
}
else if ( v4 == 1 )
{
v6 = *((_QWORD *)this + 7);
if ( v6 )
{
for ( j = *(_QWORD *)(v6 + 288); ; j = *(_QWORD *)(j + 288) )
{
v8 = cocos2d::CCObject::copy(*(cocos2d::CCObject **)(v6 + 264));
v14[0] = 0;
v9 = (cocos2d::CCObject *)v8;
v14[1] = 0;
v15 = nullptr;
v10 = strlen((const char *)v6);
std::string::__init(v14, (void *)v6, v10);
cocos2d::CCDictionary::setObject((__int64)v3, v9, (__int64)v14);
if ( (v14[0] & 1) != 0 )
operator delete(v15);
cocos2d::CCObject::release(v9);
if ( !j )
break;
v6 = j;
}
}
}
return v3;
}