//
// cocos2d::CCDictMaker::startElement from 0x7e8e2c to 0x7e91ae (898 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:00:56 +0000
//
int __fastcall cocos2d::CCDictMaker::startElement(
cocos2d::CCDictMaker *this,
void *a2,
const char *a3,
const char **a4)
{
size_t v6; // r0
int v7; // r7
const char *v8; // r8
cocos2d::CCDictionary *v9; // r7
int v10; // r3
int v11; // r2
int v12; // r3
cocos2d::CCObject *v13; // r9
unsigned int v14; // r3
int v15; // r10
bool v16; // nf
size_t v17; // r0
int v18; // r3
int v19; // r0
unsigned int v20; // r3
int v21; // r2
unsigned int v22; // r1
bool v23; // zf
int v24; // r3
int v25; // r3
size_t v26; // r7
cocos2d::CCArray *v27; // r7
int v28; // r3
int v29; // r2
int v30; // r3
int v31; // r10
bool v32; // nf
cocos2d::CCObject *v33; // r9
size_t v34; // r0
unsigned int v35; // r3
int v36; // r3
int v37; // r0
unsigned int v38; // r3
int v39; // r2
unsigned int v40; // r1
bool v41; // zf
int v42; // r3
int v44; // [sp+Ch] [bp-1Ch] BYREF
size_t v45; // [sp+10h] [bp-18h]
int v46; // [sp+14h] [bp-14h]
int v47; // [sp+18h] [bp-10h] BYREF
int v48; // [sp+1Ch] [bp-Ch]
int v49; // [sp+20h] [bp-8h]
v44 = 0;
v45 = 0;
v46 = 0;
v6 = strlen(a3);
std::string::__init(&v44, a3, v6);
v7 = (unsigned __int8)v44;
v8 = (const char *)(v44 & 1);
if ( v8 )
{
if ( v45 != 4 )
goto LABEL_31;
}
else if ( (int)(unsigned __int8)v44 >> 1 != 4 )
{
goto LABEL_33;
}
if ( !std::string::compare((unsigned __int8 *)&v44, 0, 0xFFFFFFFF, "dict", 4u) )
{
v9 = (cocos2d::CCDictionary *)operator new(0x3Cu);
cocos2d::CCDictionary::CCDictionary(v9);
v10 = *((_DWORD *)this + 1);
*((_DWORD *)this + 4) = v9;
if ( v10 == 1 && !*((_DWORD *)this + 3) )
{
*((_DWORD *)this + 3) = v9;
cocos2d::CCObject::retain((int)v9);
}
v11 = *((_DWORD *)this + 30);
*((_DWORD *)this + 17) = 2;
if ( v11 )
{
v12 = *(_DWORD *)(*(_DWORD *)(*((_DWORD *)this + 26) + 4
* ((unsigned int)(*((_DWORD *)this + 29) - 1 + v11) >> 10))
+ 4 * ((*((_DWORD *)this + 29) - 1 + v11) & 0x3FF));
if ( v12 == 6 )
{
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 18), *((cocos2d::CCObject **)this + 4));
}
else if ( v12 == 2 )
{
v13 = *((cocos2d::CCObject **)this + 4);
v14 = *((_DWORD *)this + 10) + *((_DWORD *)this + 9) - 1;
v15 = *(_DWORD *)(*(_DWORD *)(*((_DWORD *)this + 6) + 4 * (v14 >> 10)) + 4 * (v14 & 0x3FF));
v16 = (*((_BYTE *)this + 44) & 1) != 0;
if ( (*((_BYTE *)this + 44) & 1) == 0 )
v8 = (char *)this + 45;
v47 = 0;
if ( v16 )
v8 = *((const char **)this + 13);
v48 = 0;
v49 = 0;
v17 = strlen(v8);
std::string::__init(&v47, v8, v17);
cocos2d::CCDictionary::setObject(v15, v13, (int)&v47);
std::string::~string((int)&v47);
}
}
cocos2d::CCObject::release(*((_DWORD **)this + 4));
std::deque::push_back((_DWORD *)this + 25, (_DWORD *)this + 17);
v18 = (*((_DWORD *)this + 7) - *((_DWORD *)this + 6)) >> 2;
if ( v18 )
v18 = (v18 << 10) - 1;
if ( v18 == *((_DWORD *)this + 9) + *((_DWORD *)this + 10) )
std::deque::__add_back_capacity((int)this + 20);
v19 = *((_DWORD *)this + 7);
v20 = *((_DWORD *)this + 9) + *((_DWORD *)this + 10);
v21 = *((_DWORD *)this + 6);
v22 = v20 >> 10;
v23 = v19 == v21;
if ( v19 == v21 )
{
v24 = 0;
}
else
{
v24 = v20 & 0x3FF;
v21 = *(_DWORD *)(v21 + 4 * v22);
}
if ( !v23 )
v24 = v21 + 4 * v24;
if ( v24 )
*(_DWORD *)v24 = *((_DWORD *)this + 4);
++*((_DWORD *)this + 10);
return std::string::~string((int)&v44);
}
if ( v8 )
{
LABEL_31:
if ( v45 != 3 )
goto LABEL_37;
goto LABEL_34;
}
LABEL_33:
if ( v7 >> 1 != 3 )
goto LABEL_39;
LABEL_34:
if ( !std::string::compare((unsigned __int8 *)&v44, 0, 0xFFFFFFFF, "key", 3u) )
{
v25 = 1;
LABEL_84:
*((_DWORD *)this + 17) = v25;
return std::string::~string((int)&v44);
}
if ( !v8 )
{
LABEL_39:
if ( v7 >> 1 != 7 )
goto LABEL_45;
goto LABEL_40;
}
LABEL_37:
if ( v45 != 7 )
goto LABEL_43;
LABEL_40:
if ( !std::string::compare((unsigned __int8 *)&v44, 0, 0xFFFFFFFF, "integer", 7u) )
{
v25 = 3;
goto LABEL_84;
}
if ( v8 )
{
LABEL_43:
if ( v45 != 4 )
goto LABEL_49;
goto LABEL_46;
}
LABEL_45:
if ( v7 >> 1 != 4 )
goto LABEL_51;
LABEL_46:
if ( !std::string::compare((unsigned __int8 *)&v44, 0, 0xFFFFFFFF, "real", 4u) )
{
*((_DWORD *)this + 17) = 4;
return std::string::~string((int)&v44);
}
if ( !v8 )
{
LABEL_51:
if ( v7 >> 1 != 6 )
goto LABEL_56;
goto LABEL_52;
}
LABEL_49:
if ( v45 == 6 )
{
LABEL_52:
if ( !std::string::compare((unsigned __int8 *)&v44, 0, 0xFFFFFFFF, "string", 6u) )
{
v25 = 5;
goto LABEL_84;
}
if ( v8 )
goto LABEL_55;
LABEL_56:
v26 = v7 >> 1;
goto LABEL_57;
}
LABEL_55:
v26 = v45;
LABEL_57:
if ( v26 != 5 || std::string::compare((unsigned __int8 *)&v44, 0, 0xFFFFFFFF, "array", 5u) )
{
v25 = 0;
goto LABEL_84;
}
*((_DWORD *)this + 17) = 6;
v27 = (cocos2d::CCArray *)operator new(0x38u);
cocos2d::CCArray::CCArray(v27);
v28 = *((_DWORD *)this + 1);
*((_DWORD *)this + 18) = v27;
if ( v28 == 2 && !*((_DWORD *)this + 2) )
{
*((_DWORD *)this + 2) = v27;
cocos2d::CCObject::retain((int)v27);
}
v29 = *((_DWORD *)this + 30);
if ( v29 )
{
v30 = *(_DWORD *)(*(_DWORD *)(*((_DWORD *)this + 26) + 4 * ((unsigned int)(*((_DWORD *)this + 29) - 1 + v29) >> 10))
+ 4 * ((*((_DWORD *)this + 29) - 1 + v29) & 0x3FF));
if ( v30 == 2 )
{
v31 = *((_DWORD *)this + 4);
v32 = (*((_BYTE *)this + 44) & 1) != 0;
if ( (*((_BYTE *)this + 44) & 1) == 0 )
v8 = (char *)this + 45;
v47 = 0;
if ( v32 )
v8 = *((const char **)this + 13);
v48 = 0;
v49 = 0;
v33 = *((cocos2d::CCObject **)this + 18);
v34 = strlen(v8);
std::string::__init(&v47, v8, v34);
cocos2d::CCDictionary::setObject(v31, v33, (int)&v47);
std::string::~string((int)&v47);
}
else if ( v30 == 6 )
{
v35 = *((_DWORD *)this + 24) + *((_DWORD *)this + 23) - 1;
cocos2d::CCArray::addObject(
*(cocos2d::CCArray **)(*(_DWORD *)(*((_DWORD *)this + 20) + 4 * (v35 >> 10)) + 4 * (v35 & 0x3FF)),
*((cocos2d::CCObject **)this + 18));
}
}
cocos2d::CCObject::release(*((_DWORD **)this + 18));
std::deque::push_back((_DWORD *)this + 25, (_DWORD *)this + 17);
v36 = (*((_DWORD *)this + 21) - *((_DWORD *)this + 20)) >> 2;
if ( v36 )
v36 = (v36 << 10) - 1;
if ( v36 == *((_DWORD *)this + 23) + *((_DWORD *)this + 24) )
std::deque::__add_back_capacity((int)this + 76);
v37 = *((_DWORD *)this + 21);
v38 = *((_DWORD *)this + 23) + *((_DWORD *)this + 24);
v39 = *((_DWORD *)this + 20);
v40 = v38 >> 10;
v41 = v37 == v39;
if ( v37 == v39 )
{
v42 = 0;
}
else
{
v42 = v38 & 0x3FF;
v39 = *(_DWORD *)(v39 + 4 * v40);
}
if ( !v41 )
v42 = v39 + 4 * v42;
if ( v42 )
*(_DWORD *)v42 = *((_DWORD *)this + 18);
++*((_DWORD *)this + 24);
return std::string::~string((int)&v44);
}