//
// cocos2d::CCFileUtils::loadFilenameLookupDictionaryFromFile from 0x180072a20 to 0x180072cce (686 bytes)
//
// 4 xrefs:
// > ??> @ 0x1801069c0
// > ??> @ 0x180107770
// > ??> @ 0x18014cf68
// > ??> @ 0x1801be5e4
//
// 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 11:21:57 +0000
//
// 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; // r8
cocos2d::CCString *v7; // rax
int v8; // ebx
void *v9; // r8
__int64 v10; // rbx
__int64 v11; // rax
void *v12; // rcx
char *v13; // rcx
void *v14[2]; // [rsp+30h] [rbp-29h] BYREF
__m128i v15; // [rsp+40h] [rbp-19h]
void *Block[2]; // [rsp+50h] [rbp-9h] BYREF
__m128i si128; // [rsp+60h] [rbp+7h]
char *v18[3]; // [rsp+70h] [rbp+17h] BYREF
unsigned __int64 v19; // [rsp+88h] [rbp+2Fh]
(*(void (__fastcall **)(cocos2d::CCFileUtils *, char **, const char *, _QWORD))(*(_QWORD *)this + 40LL))(
this,
v18,
a2,
0);
if ( v18[2] )
{
v3 = (const char *)v18;
if ( v19 > 0xF )
v3 = v18[0];
v4 = cocos2d::CCDictionary::createWithContentsOfFile(v3);
if ( v4 )
{
Block[1] = nullptr;
si128 = _mm_load_si128((const __m128i *)&xmmword_180106020);
Block[0] = (void *)0x617461646174656DLL;
v5 = cocos2d::CCDictionary::objectForKey((__int64)v4, (__int64)Block);
if ( si128.m128i_i64[1] > 0xFuLL )
{
v6 = Block[0];
if ( (unsigned __int64)(si128.m128i_i64[1] + 1) >= 0x1000 )
{
v6 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v6 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v6);
}
si128 = _mm_load_si128((const __m128i *)&xmmword_1800EC500);
LOBYTE(Block[0]) = 0;
HIWORD(v14[1]) = 0;
v15 = _mm_load_si128((const __m128i *)&xmmword_1800F1920);
qmemcpy(v14, "versio", 6);
*(void **)((char *)v14 + 6) = (void *)(unsigned __int8)aVersion[6];
v7 = (cocos2d::CCString *)cocos2d::CCDictionary::objectForKey(v5, (__int64)v14);
v8 = cocos2d::CCString::uintValue(v7);
if ( v15.m128i_i64[1] > 0xFuLL )
{
v9 = v14[0];
if ( (unsigned __int64)(v15.m128i_i64[1] + 1) >= 0x1000 )
{
v9 = *((void **)v14[0] - 1);
if ( (unsigned __int64)((char *)v14[0] - (char *)v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v9);
}
if ( v8 == 1 )
{
v14[1] = (void *)115;
v15 = _mm_load_si128((const __m128i *)&xmmword_1800F1930);
v14[0] = (void *)0x656D616E656C6966LL;
v10 = *(_QWORD *)this;
v11 = cocos2d::CCDictionary::objectForKey((__int64)v4, (__int64)v14);
(*(void (__fastcall **)(cocos2d::CCFileUtils *, __int64))(v10 + 64))(this, v11);
if ( v15.m128i_i64[1] > 0xFuLL )
{
v12 = v14[0];
if ( (unsigned __int64)(v15.m128i_i64[1] + 1) >= 0x1000 )
{
v12 = *((void **)v14[0] - 1);
if ( (unsigned __int64)((char *)v14[0] - (char *)v12 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v12);
}
}
}
}
if ( v19 > 0xF )
{
v13 = v18[0];
if ( v19 + 1 >= 0x1000 )
{
v13 = *((char **)v18[0] - 1);
if ( (unsigned __int64)(v18[0] - v13 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free_0(v13);
}
}