//
// cocos2d::CCFileUtils::loadFilenameLookupDictionaryFromFile from 0x180070760 to 0x1800709c8 (616 bytes)
//
// 4 xrefs:
// > ??> @ 0x180100370
// > ??> @ 0x180101098
// > ??> @ 0x1801438a8
// > ??> @ 0x1801b4254
//
// 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
//
// Hidden C++ exception states: #wind=3
void __fastcall cocos2d::CCFileUtils::loadFilenameLookupDictionaryFromFile(cocos2d::CCFileUtils *this, const char *a2)
{
const char *v3; // rcx
struct cocos2d::CCDictionary *v4; // rdi
__int64 v5; // rbx
void *v6; // rcx
cocos2d::CCString *v7; // rax
int v8; // ebx
void *v9; // rcx
cocos2d::CCFileUtils_vtbl *v10; // rbx
__int64 v11; // rax
void *v12; // rcx
char *v13; // rcx
void *v14[2]; // [rsp+20h] [rbp-29h] BYREF
__int64 v15; // [rsp+30h] [rbp-19h]
unsigned __int64 v16; // [rsp+38h] [rbp-11h]
void *Block[2]; // [rsp+40h] [rbp-9h] BYREF
__int64 v18; // [rsp+50h] [rbp+7h]
unsigned __int64 v19; // [rsp+58h] [rbp+Fh]
char *v20[3]; // [rsp+60h] [rbp+17h] BYREF
unsigned __int64 v21; // [rsp+78h] [rbp+2Fh]
((void (__fastcall *)(cocos2d::CCFileUtils *, char **, const char *, _QWORD))this->createCCArrayWithContentsOfFile)(
this,
v20,
a2,
0);
if ( v20[2] )
{
v3 = (const char *)v20;
if ( v21 > 0xF )
v3 = v20[0];
v4 = cocos2d::CCDictionary::createWithContentsOfFile(v3);
if ( v4 )
{
Block[1] = nullptr;
v18 = 8;
v19 = 15;
Block[0] = (void *)0x617461646174656DLL;
v5 = cocos2d::CCDictionary::objectForKey((__int64)v4, (unsigned __int8 *)Block);
if ( v19 > 0xF )
{
v6 = Block[0];
if ( v19 + 1 >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v6);
}
v18 = 0;
v19 = 15;
LOBYTE(Block[0]) = 0;
HIWORD(v14[1]) = 0;
v15 = 7;
v16 = 15;
qmemcpy(v14, "versio", 6);
*(void **)((char *)v14 + 6) = (void *)(unsigned __int8)aVersion[6];
v7 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v5, (unsigned __int8 *)v14);
v8 = cocos2d::CCString::uintValue(v7);
if ( v16 > 0xF )
{
v9 = v14[0];
if ( v16 + 1 >= 0x1000 )
{
v9 = *((void **)v14[0] - 1);
if ( (unsigned __int64)((char *)v14[0] - (char *)v9 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v9);
}
if ( v8 == 1 )
{
v14[1] = (void *)115;
v15 = 9;
v16 = 15;
v14[0] = (void *)0x656D616E656C6966LL;
v10 = this->__vftable;
v11 = cocos2d::CCDictionary::objectForKey((__int64)v4, (unsigned __int8 *)v14);
((void (__fastcall *)(cocos2d::CCFileUtils *, __int64))v10->fullPathFromRelativeFile)(this, v11);
if ( v16 > 0xF )
{
v12 = v14[0];
if ( v16 + 1 >= 0x1000 )
{
v12 = *((void **)v14[0] - 1);
if ( (unsigned __int64)((char *)v14[0] - (char *)v12 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v12);
}
}
}
}
if ( v21 > 0xF )
{
v13 = v20[0];
if ( v21 + 1 >= 0x1000 )
{
v13 = *((char **)v20[0] - 1);
if ( (unsigned __int64)(v20[0] - v13 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free_0(v13);
}
}