//
// DS_Dictionary::loadRootSubDictFromFile from 0x80cc08 to 0x80cd6e (358 bytes)
//
// 4 xrefs:
// > CCAnimateFrameCache::addSpriteFramesWithFile @ 0x3c46da
// > CCAnimateFrameCache::addCustomSpriteFramesWithFile @ 0x3c4bca
// > CCContentManager::addDict @ 0x80a19e
// > CCContentManager::addDictDS @ 0x80a24e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:01:33 +0000
//
int __fastcall DS_Dictionary::loadRootSubDictFromFile(DS_Dictionary *this, char *a2)
{
int v4; // r2
int v5; // r5
cocos2d::CCFileUtils *v6; // r0
_DWORD *v7; // r3
int v8; // r0
cocos2d::CCFileUtils *v9; // r0
int v10; // r0
char *v11; // r1
int v12; // r6
cocos2d::CCFileUtils *v13; // r0
int v14; // r0
char *v15; // r1
int v16; // r5
int v18; // r6
_DWORD v19[4]; // [sp+8h] [bp-44h] BYREF
int v20; // [sp+18h] [bp-34h] BYREF
int v21; // [sp+1Ch] [bp-30h] BYREF
char v22; // [sp+20h] [bp-2Ch] BYREF
char v23; // [sp+21h] [bp-2Bh] BYREF
char *v24; // [sp+28h] [bp-24h]
_DWORD v25[3]; // [sp+2Ch] [bp-20h] BYREF
_DWORD v26[3]; // [sp+38h] [bp-14h] BYREF
v4 = *((_DWORD *)this + 50);
while ( 1 )
{
v5 = *((_DWORD *)this + 51);
if ( v4 == v5 )
break;
*((_DWORD *)this + 51) = v5 - 4;
}
v6 = (cocos2d::CCFileUtils *)pugi::xml_node::xml_node((pugi::xml_node *)v25);
v7 = *((_DWORD **)this + 51);
if ( (unsigned int)v7 >= *((_DWORD *)this + 52) )
{
std::vector
::__push_back_slow_path((int *)this + 50, v25);
}
else
{
if ( v7 )
*v7 = v25[0];
*((_DWORD *)this + 51) += 4;
}
v8 = cocos2d::CCFileUtils::sharedFileUtils(v6);
v9 = (cocos2d::CCFileUtils *)(*(int (__fastcall **)(char *, int, char *, _DWORD))(*(_DWORD *)v8 + 24))(
&v22,
v8,
a2,
0);
v20 = 0;
v10 = cocos2d::CCFileUtils::sharedFileUtils(v9);
if ( (v22 & 1) != 0 )
v11 = v24;
else
v11 = &v23;
v12 = (*(int (__fastcall **)(int, char *, __int16 *, int *))(*(_DWORD *)v10 + 16))(v10, v11, &a1i2r3e45s789g[3], &v20);
pugi::xml_document::load_buffer((int)v25, this, v12, v20, 116, 0);
if ( !pugi::xml_parse_result::operator bool(v25) || !v12 )
{
FileOperation::getFilePath((FileOperation *)v26);
v13 = (cocos2d::CCFileUtils *)std::string::append(v26, a2);
v20 = 0;
v14 = cocos2d::CCFileUtils::sharedFileUtils(v13);
if ( (v26[0] & 1) != 0 )
v15 = (char *)v26[2];
else
v15 = (char *)v26 + 1;
v12 = (*(int (__fastcall **)(int, char *, __int16 *, int *))(*(_DWORD *)v14 + 16))(
v14,
v15,
&a1i2r3e45s789g[3],
&v20);
pugi::xml_document::load_buffer((int)v19, this, v12, v20, 116, 0);
v25[0] = v19[0];
v25[1] = v19[1];
v25[2] = v19[2];
std::string::~string((int)v26);
}
v16 = pugi::xml_parse_result::operator bool(v25);
if ( v16 )
{
if ( v12 )
{
v18 = *((_DWORD *)this + 51);
v21 = pugi::xml_node::child(this, "plist");
*(_DWORD *)(v18 - 4) = pugi::xml_node::child((pugi::xml_node *)&v21, "dict");
DS_Dictionary::checkCompatibility(this);
}
else
{
v16 = 0;
}
}
std::string::~string((int)&v22);
return v16;
}