//
// cocos2d::CCFileUtils::loadFilenameLookupDictionaryFromFile from 0x10043d990 to 0x10043dab7 (295 bytes)
//
// 2 xrefs:
// > ??> @ 0x100937fc8
// > ??> @ 0x100980568
//
// 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::CCFileUtils::loadFilenameLookupDictionaryFromFile(cocos2d::CCFileUtils *a1, const char *a2)
{
const char *v3; // rdi
cocos2d::CCDictionary *v4; // r14
__int64 v5; // r15
cocos2d::CCString *v6; // rax
int v7; // r15d
__int64 v8; // rax
char v9; // [rsp+8h] [rbp-48h] BYREF
char v10; // [rsp+9h] [rbp-47h] BYREF
__int64 v11; // [rsp+10h] [rbp-40h]
void *v12; // [rsp+18h] [rbp-38h]
char v13; // [rsp+20h] [rbp-30h] BYREF
char v14[15]; // [rsp+21h] [rbp-2Fh] BYREF
void *__p; // [rsp+30h] [rbp-20h]
((void (__fastcall *)(char *, cocos2d::CCFileUtils *, const char *, _QWORD))a1->createCCArrayWithContentsOfFile)(
&v9,
a1,
a2,
0);
if ( (v9 & 1) != 0 )
{
if ( !v11 )
goto LABEL_14;
v3 = (const char *)v12;
}
else
{
if ( !v9 )
goto LABEL_14;
v3 = &v10;
}
v4 = cocos2d::CCDictionary::createWithContentsOfFile(v3);
if ( v4 )
{
v13 = 16;
strcpy(v14, "metadata");
v5 = cocos2d::CCDictionary::objectForKey_1((__int64)v4, &v13);
if ( (v13 & 1) != 0 )
operator delete(__p);
v13 = 14;
strcpy(v14, "version");
v6 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey_1(v5, &v13);
v7 = cocos2d::CCString::intValue(v6);
if ( (v13 & 1) != 0 )
operator delete(__p);
if ( v7 == 1 )
{
v13 = 18;
strcpy(v14, "filenames");
v8 = cocos2d::CCDictionary::objectForKey_1((__int64)v4, &v13);
((void (__fastcall *)(cocos2d::CCFileUtils *, __int64))a1->fullPathFromRelativeFile)(a1, v8);
if ( (v13 & 1) != 0 )
operator delete(__p);
}
}
LABEL_14:
if ( (v9 & 1) != 0 )
operator delete(v12);
}