//
// sub_1002D3284 from 0x1002d3284 to 0x1002d3658 (980 bytes)
//
// 3 xrefs:
// > cocos2d::CCFileUtilsIOS::createCCDictionaryWithContentsOfFile @ 0x1002d31b8
// > sub_1002D3284 @ 0x1002d338c
// > sub_1002D3AA4 @ 0x1002d3c4c
//
// 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 11:02:39 +0000
//
void __fastcall sub_1002D3284(void *a1, void *a2, __int64 a3)
{
__int64 v6; // x0
__int64 v7; // x0
_DWORD *v8; // x21
void *v9; // x22
void *v10; // x23
__int64 v11; // x25
void *i; // x26
char *v13; // x1
__int64 v14; // x0
char *v15; // x1
__int64 v16; // x0
void *v17; // x21
_DWORD *v18; // x20
char *v19; // x1
__int64 v20; // x0
_DWORD *v21; // x21
void *v22; // x22
__int64 v23; // x23
void *j; // x24
char *v25; // x1
__int128 v26; // [xsp+0h] [xbp-210h] BYREF
__int128 v27; // [xsp+10h] [xbp-200h]
__int128 v28; // [xsp+20h] [xbp-1F0h]
__int128 v29; // [xsp+30h] [xbp-1E0h]
void *__p[2]; // [xsp+48h] [xbp-1C8h] BYREF
char v31; // [xsp+5Fh] [xbp-1B1h]
__int128 v32; // [xsp+60h] [xbp-1B0h] BYREF
__int128 v33; // [xsp+70h] [xbp-1A0h]
__int128 v34; // [xsp+80h] [xbp-190h]
__int128 v35; // [xsp+90h] [xbp-180h]
void *v36[2]; // [xsp+A0h] [xbp-170h] BYREF
char v37; // [xsp+B7h] [xbp-159h]
_BYTE v38[128]; // [xsp+B8h] [xbp-158h] BYREF
_BYTE v39[128]; // [xsp+138h] [xbp-D8h] BYREF
v6 = objc_opt_class(&OBJC_CLASS___NSString);
objc_opt_isKindOfClass(a1, v6);
sub_100009900(v36, (char *)objc_msgSend(a1, "UTF8String"));
v7 = objc_opt_class(&OBJC_CLASS___NSDictionary);
if ( (objc_opt_isKindOfClass(a2, v7) & 1) != 0 )
{
v8 = operator new(0x48u);
cocos2d::CCDictionary::CCDictionary();
v34 = 0u;
v35 = 0u;
v32 = 0u;
v33 = 0u;
v9 = objc_msgSend(a2, "allKeys");
v10 = objc_msgSend(v9, "countByEnumeratingWithState:objects:count:", &v32, v39, 16);
if ( v10 )
{
v11 = *(_QWORD *)v33;
do
{
for ( i = nullptr; i != v10; i = (char *)i + 1 )
{
if ( *(_QWORD *)v33 != v11 )
objc_enumerationMutation(v9);
sub_1002D3284(
*(_QWORD *)(*((_QWORD *)&v32 + 1) + 8LL * (_QWORD)i),
objc_msgSend(a2, "objectForKey:", *(_QWORD *)(*((_QWORD *)&v32 + 1) + 8LL * (_QWORD)i)),
v8);
}
v10 = objc_msgSend(v9, "countByEnumeratingWithState:objects:count:", &v32, v39, 16);
}
while ( v10 );
}
if ( v37 >= 0 )
v13 = (char *)v36;
else
v13 = (char *)v36[0];
sub_100009900(__p, v13);
cocos2d::CCDictionary::setObject(a3, v8, __p);
if ( v31 < 0 )
operator delete(__p[0]);
LABEL_14:
cocos2d::CCObject::release(v8);
goto LABEL_43;
}
v14 = objc_opt_class(&OBJC_CLASS___NSString);
if ( (objc_opt_isKindOfClass(a2, v14) & 1) != 0 )
{
v8 = operator new(0x50u);
sub_10030611C(v8, objc_msgSend(a2, "UTF8String"));
if ( v37 >= 0 )
v15 = (char *)v36;
else
v15 = (char *)v36[0];
sub_100009900(__p, v15);
cocos2d::CCDictionary::setObject(a3, v8, __p);
if ( v31 < 0 )
operator delete(__p[0]);
goto LABEL_14;
}
v16 = objc_opt_class(&OBJC_CLASS___NSNumber);
if ( (objc_opt_isKindOfClass(a2, v16) & 1) != 0 )
{
v17 = objc_msgSend(a2, "stringValue");
v18 = operator new(0x50u);
sub_10030611C(v18, objc_msgSend(v17, "UTF8String"));
if ( v37 >= 0 )
v19 = (char *)v36;
else
v19 = (char *)v36[0];
sub_100009900(__p, v19);
cocos2d::CCDictionary::setObject(a3, v18, __p);
if ( v31 < 0 )
operator delete(__p[0]);
cocos2d::CCObject::release(v18);
}
else
{
v20 = objc_opt_class(&OBJC_CLASS___NSArray);
if ( (objc_opt_isKindOfClass(a2, v20) & 1) != 0 )
{
v21 = operator new(0x40u);
sub_1002E7330();
sub_1002E72FC(v21);
v28 = 0u;
v29 = 0u;
v26 = 0u;
v27 = 0u;
v22 = objc_msgSend(a2, "countByEnumeratingWithState:objects:count:", &v26, v38, 16);
if ( v22 )
{
v23 = *(_QWORD *)v27;
do
{
for ( j = nullptr; j != v22; j = (char *)j + 1 )
{
if ( *(_QWORD *)v27 != v23 )
objc_enumerationMutation(a2);
sub_1002D3AA4(*(_QWORD *)(*((_QWORD *)&v26 + 1) + 8LL * (_QWORD)j), v21);
}
v22 = objc_msgSend(a2, "countByEnumeratingWithState:objects:count:", &v26, v38, 16);
}
while ( v22 );
}
if ( v37 >= 0 )
v25 = (char *)v36;
else
v25 = (char *)v36[0];
sub_100009900(__p, v25);
cocos2d::CCDictionary::setObject(a3, v21, __p);
if ( v31 < 0 )
operator delete(__p[0]);
cocos2d::CCObject::release(v21);
}
}
LABEL_43:
if ( v37 < 0 )
operator delete(v36[0]);
}