//
// cocos2d::CCDictionary::copyWithZone from 0x5c080c to 0x5c08d6 (202 bytes)
//
// 0 xrefs:
//
// 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::CCObject *cocos2d::CCDictionary::copyWithZone(cocos2d::CCDictionary *a1, cocos2d::CCZone *a2)
{
cocos2d::CCDictionary *v3; // r7
cocos2d::CCDictionary::CCDictType m_eDictType; // r3
cocos2d::CCDictElement *m_pElements; // r4
cocos2d::CCDictElement *next; // r5
cocos2d::CCObject *v7; // r8
cocos2d::CCDictElement *v8; // r3
cocos2d::CCDictElement *v10; // r4
cocos2d::CCDictElement *v11; // r5
cocos2d::CCObject *v12; // r9
cocos2d::CCDictElement *v13; // r3
const char *v14; // [sp+8h] [bp-8h] BYREF
v3 = (cocos2d::CCDictionary *)operator new(0x3Cu);
cocos2d::CCDictionary::CCDictionary(v3);
m_eDictType = a1->m_eDictType;
if ( m_eDictType == kCCDictInt )
{
m_pElements = a1->m_pElements;
if ( m_pElements )
next = (cocos2d::CCDictElement *)m_pElements->hh.next;
else
next = nullptr;
while ( m_pElements )
{
v7 = (cocos2d::CCObject *)cocos2d::CCObject::copy(m_pElements->m_pObject);
cocos2d::CCDictionary::setObject(v3, v7, m_pElements->m_iKey);
cocos2d::CCObject::release(v7);
if ( next )
v8 = (cocos2d::CCDictElement *)next->hh.next;
else
v8 = nullptr;
m_pElements = next;
next = v8;
}
}
else if ( m_eDictType == kCCDictStr )
{
v10 = a1->m_pElements;
if ( v10 )
v11 = (cocos2d::CCDictElement *)v10->hh.next;
else
v11 = nullptr;
while ( v10 )
{
v12 = (cocos2d::CCObject *)cocos2d::CCObject::copy(v10->m_pObject);
sub_776584((int)&v14, (char *)v10);
cocos2d::CCDictionary::setObject((int)v3, v12, &v14);
sub_774008(&v14);
cocos2d::CCObject::release(v12);
if ( v11 )
v13 = (cocos2d::CCDictElement *)v11->hh.next;
else
v13 = nullptr;
v10 = v11;
v11 = v13;
}
}
return v3;
}