//
// sub_100236874 from 0x100236874 to 0x100236c48 (980 bytes)
//
// 3 xrefs:
// > cocos2d::CCFileUtilsIOS::createCCDictionaryWithContentsOfFile @ 0x1002367a8
// > sub_100236874 @ 0x10023697c
// > sub_100237094 @ 0x10023723c
//
// 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
//
void __fastcall sub_100236874(void *a1, void *a2, __int64 a3)
{
cocos2d::CCObject *v6; // x21
void *v7; // x22
void *v8; // x23
__int64 v9; // x25
void *i; // x26
char *v11; // x1
char *v12; // x1
void *v13; // x21
cocos2d::CCObject *v14; // x20
char *v15; // x1
cocos2d::CCObject *v16; // x21
void *v17; // x22
__int64 v18; // x23
void *j; // x24
char *v20; // x1
__int128 v21; // [xsp+0h] [xbp-210h] BYREF
__int128 v22; // [xsp+10h] [xbp-200h]
__int128 v23; // [xsp+20h] [xbp-1F0h]
__int128 v24; // [xsp+30h] [xbp-1E0h]
void *__p[2]; // [xsp+48h] [xbp-1C8h] BYREF
char v26; // [xsp+5Fh] [xbp-1B1h]
__int128 v27; // [xsp+60h] [xbp-1B0h] BYREF
__int128 v28; // [xsp+70h] [xbp-1A0h]
__int128 v29; // [xsp+80h] [xbp-190h]
__int128 v30; // [xsp+90h] [xbp-180h]
void *v31[2]; // [xsp+A0h] [xbp-170h] BYREF
char v32; // [xsp+B7h] [xbp-159h]
_BYTE v33[128]; // [xsp+B8h] [xbp-158h] BYREF
_BYTE v34[128]; // [xsp+138h] [xbp-D8h] BYREF
objc_msgSend(a1, "isKindOfClass:", +[NSString class](&OBJC_CLASS___NSString, "class"));
sub_100009900(v31, (char *)objc_msgSend(a1, "UTF8String"));
if ( (unsigned int)objc_msgSend(a2, "isKindOfClass:", +[NSDictionary class](&OBJC_CLASS___NSDictionary, "class")) )
{
v6 = (cocos2d::CCObject *)operator new(0x48u);
cocos2d::CCDictionary::CCDictionary();
v29 = 0u;
v30 = 0u;
v27 = 0u;
v28 = 0u;
v7 = objc_msgSend(a2, "allKeys");
v8 = objc_msgSend(v7, "countByEnumeratingWithState:objects:count:", &v27, v34, 16);
if ( v8 )
{
v9 = *(_QWORD *)v28;
do
{
for ( i = nullptr; i != v8; i = (char *)i + 1 )
{
if ( *(_QWORD *)v28 != v9 )
objc_enumerationMutation(v7);
sub_100236874(
*(_QWORD *)(*((_QWORD *)&v27 + 1) + 8LL * (_QWORD)i),
objc_msgSend(a2, "objectForKey:", *(_QWORD *)(*((_QWORD *)&v27 + 1) + 8LL * (_QWORD)i)),
v6);
}
v8 = objc_msgSend(v7, "countByEnumeratingWithState:objects:count:", &v27, v34, 16);
}
while ( v8 );
}
if ( v32 >= 0 )
v11 = (char *)v31;
else
v11 = (char *)v31[0];
sub_100009900(__p, v11);
cocos2d::CCDictionary::setObject_1(a3, v6, __p);
if ( v26 < 0 )
operator delete(__p[0]);
LABEL_14:
cocos2d::CCObject::release(v6);
goto LABEL_43;
}
if ( (unsigned int)objc_msgSend(a2, "isKindOfClass:", +[NSString class](&OBJC_CLASS___NSString, "class")) )
{
v6 = (cocos2d::CCObject *)operator new(0x50u);
sub_100268AB8(v6, objc_msgSend(a2, "UTF8String"));
if ( v32 >= 0 )
v12 = (char *)v31;
else
v12 = (char *)v31[0];
sub_100009900(__p, v12);
cocos2d::CCDictionary::setObject_1(a3, v6, __p);
if ( v26 < 0 )
operator delete(__p[0]);
goto LABEL_14;
}
if ( (unsigned int)objc_msgSend(a2, "isKindOfClass:", +[NSNumber class](&OBJC_CLASS___NSNumber, "class")) )
{
v13 = objc_msgSend(a2, "stringValue");
v14 = (cocos2d::CCObject *)operator new(0x50u);
sub_100268AB8(v14, objc_msgSend(v13, "UTF8String"));
if ( v32 >= 0 )
v15 = (char *)v31;
else
v15 = (char *)v31[0];
sub_100009900(__p, v15);
cocos2d::CCDictionary::setObject_1(a3, v14, __p);
if ( v26 < 0 )
operator delete(__p[0]);
cocos2d::CCObject::release(v14);
}
else if ( (unsigned int)objc_msgSend(a2, "isKindOfClass:", +[NSArray class](&OBJC_CLASS___NSArray, "class")) )
{
v16 = (cocos2d::CCObject *)operator new(0x40u);
sub_10024A120();
sub_10024A0EC(v16);
v23 = 0u;
v24 = 0u;
v21 = 0u;
v22 = 0u;
v17 = objc_msgSend(a2, "countByEnumeratingWithState:objects:count:", &v21, v33, 16);
if ( v17 )
{
v18 = *(_QWORD *)v22;
do
{
for ( j = nullptr; j != v17; j = (char *)j + 1 )
{
if ( *(_QWORD *)v22 != v18 )
objc_enumerationMutation(a2);
sub_100237094(*(_QWORD *)(*((_QWORD *)&v21 + 1) + 8LL * (_QWORD)j), v16);
}
v17 = objc_msgSend(a2, "countByEnumeratingWithState:objects:count:", &v21, v33, 16);
}
while ( v17 );
}
if ( v32 >= 0 )
v20 = (char *)v31;
else
v20 = (char *)v31[0];
sub_100009900(__p, v20);
cocos2d::CCDictionary::setObject_1(a3, v16, __p);
if ( v26 < 0 )
operator delete(__p[0]);
cocos2d::CCObject::release(v16);
}
LABEL_43:
if ( v32 < 0 )
operator delete(v31[0]);
}