//
// cocos2d::CCFileUtilsMac::createCCDictionaryWithContentsOfFile from 0x10060c100 to 0x10060c377 (631 bytes)
//
// 1 xrefs:
// > ??> @ 0x100980618
//
// 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 cocos2d::CCFileUtilsMac::createCCDictionaryWithContentsOfFile(__int64 a1, __int64 a2)
{
__int64 v3; // rsi
__int64 v4; // rbx
cocos2d::CCFileUtils *v5; // r15
NSString *v6; // rax
void *v7; // rbx
id v8; // r14
id v9; // r13
__int64 v10; // rbx
void *i; // r14
__int64 v12; // r15
id v13; // rax
__int128 v15; // [rsp+0h] [rbp-120h] BYREF
__int128 v16; // [rsp+10h] [rbp-110h]
__int128 v17; // [rsp+20h] [rbp-100h]
__int128 v18; // [rsp+30h] [rbp-F0h]
char v19; // [rsp+40h] [rbp-E0h] BYREF
char v20[15]; // [rsp+41h] [rbp-DFh] BYREF
void *__p; // [rsp+50h] [rbp-D0h]
id v22; // [rsp+58h] [rbp-C8h]
void *v23; // [rsp+60h] [rbp-C0h]
id obj; // [rsp+68h] [rbp-B8h]
_BYTE v25[128]; // [rsp+70h] [rbp-B0h] BYREF
v3 = qword_1009A4FA0;
if ( qword_1009A4FA0 )
{
if ( (*(_BYTE *)a2 & 1) != 0 )
{
LABEL_3:
v4 = *(_QWORD *)(a2 + 16);
goto LABEL_6;
}
}
else
{
v5 = (cocos2d::CCFileUtils *)operator new(0x88u);
*(_OWORD *)&v5->__vftable = 0;
*(_OWORD *)&v5[2].__vftable = 0;
*(_OWORD *)&v5[4].__vftable = 0;
*(_OWORD *)&v5[6].__vftable = 0;
*(_OWORD *)&v5[8].__vftable = 0;
*(_OWORD *)&v5[10].__vftable = 0;
*(_OWORD *)&v5[12].__vftable = 0;
*(_OWORD *)&v5[14].__vftable = 0;
v5[16].__vftable = nullptr;
cocos2d::CCFileUtils::CCFileUtils((__int64)v5);
v5->__vftable = (cocos2d::CCFileUtils_vtbl *)off_100980528;
qword_1009A4FA0 = (__int64)v5;
cocos2d::CCFileUtils::init(v5);
v3 = qword_1009A4FA0;
if ( (*(_BYTE *)a2 & 1) != 0 )
goto LABEL_3;
}
v4 = a2 + 1;
LABEL_6:
(*(void (__fastcall **)(char *, __int64, __int64, _QWORD))(*(_QWORD *)v3 + 48LL))(&v19, v3, v4, 0);
if ( (v19 & 1) != 0 )
v6 = +[NSString stringWithUTF8String:](&OBJC_CLASS___NSString, "stringWithUTF8String:", __p);
else
v6 = +[NSString stringWithUTF8String:](&OBJC_CLASS___NSString, "stringWithUTF8String:", v20);
v22 = +[NSDictionary dictionaryWithContentsOfFile:](&OBJC_CLASS___NSDictionary, "dictionaryWithContentsOfFile:", v6);
v7 = operator new(0x48u);
cocos2d::CCDictionary::CCDictionary((__int64)v7);
v23 = v7;
v18 = 0;
v17 = 0;
v16 = 0;
v15 = 0;
v8 = objc_msgSend(v22, "allKeys");
v9 = objc_msgSend(v8, "countByEnumeratingWithState:objects:count:", &v15, v25, 16);
if ( v9 )
{
v10 = *(_QWORD *)v16;
obj = v8;
do
{
for ( i = nullptr; i != v9; i = (char *)i + 1 )
{
if ( *(_QWORD *)v16 != v10 )
objc_enumerationMutation(obj);
v12 = *(_QWORD *)(*((_QWORD *)&v15 + 1) + 8LL * (_QWORD)i);
v13 = objc_msgSend(v22, "objectForKey:", v12);
sub_10060C3E0(v12, v13, v23);
}
v9 = objc_msgSend(obj, "countByEnumeratingWithState:objects:count:", &v15, v25, 16);
}
while ( v9 );
}
if ( (v19 & 1) != 0 )
operator delete(__p);
return v23;
}