//
// cocos2d::CCFileUtilsMac::createCCDictionaryWithContentsOfFile from 0x1006e58e0 to 0x1006e5b57 (631 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b93fe8
//
// This function is hookable on this platform (idp: pc, 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 12:35:47 +0000
//
void *__fastcall cocos2d::CCFileUtilsMac::createCCDictionaryWithContentsOfFile(__int64 a1, __int64 a2)
{
__int64 v3; // rsi
__int64 v4; // rbx
_OWORD *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_100BE8BA0;
if ( qword_100BE8BA0 )
{
if ( (*(_BYTE *)a2 & 1) != 0 )
{
LABEL_3:
v4 = *(_QWORD *)(a2 + 16);
goto LABEL_6;
}
}
else
{
v5 = operator new(0x88u);
*v5 = 0;
v5[1] = 0;
v5[2] = 0;
v5[3] = 0;
v5[4] = 0;
v5[5] = 0;
v5[6] = 0;
v5[7] = 0;
*((_QWORD *)v5 + 16) = 0;
cocos2d::CCFileUtils::CCFileUtils((__int64)v5);
*(_QWORD *)v5 = off_100B93EF8;
qword_100BE8BA0 = (__int64)v5;
cocos2d::CCFileUtils::init((__int64)v5);
v3 = qword_100BE8BA0;
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_1006E5BC0(v12, v13, v23);
}
v9 = objc_msgSend(obj, "countByEnumeratingWithState:objects:count:", &v15, v25, 16);
}
while ( v9 );
}
if ( (v19 & 1) != 0 )
operator delete(__p);
return v23;
}