//
// DS_Dictionary::loadRootSubDictFromFile from 0x5fec10 to 0x5fed46 (310 bytes)
//
// 4 xrefs:
// > CCAnimateFrameCache::addSpriteFramesWithFile @ 0x2e4c52
// > CCAnimateFrameCache::addCustomSpriteFramesWithFile @ 0x2e5072
// > CCContentManager::addDict @ 0x5fc3ec
// > CCContentManager::addDictDS @ 0x5fc48c
//
// 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
//
bool DS_Dictionary::loadRootSubDictFromFile(DS_Dictionary *a1, const char *a2)
{
char **p_dictTree; // r9
cocos2d::CCFileUtils *v5; // r0
cocos2d::CCFileUtils *v6; // r0
int v7; // r7
int v8; // r1
int v9; // r4
cocos2d::CCFileUtils *v11; // r0
_DWORD *v12; // r7
_DWORD v13[5]; // [sp+10h] [bp-34h] BYREF
int v14; // [sp+24h] [bp-20h] BYREF
int v15; // [sp+28h] [bp-1Ch] BYREF
pugi::xml_node v16; // [sp+2Ch] [bp-18h] BYREF
pugi::xml_node v17[3]; // [sp+30h] [bp-14h] BYREF
p_dictTree = (char **)&a1->dictTree;
a1->dictTree.m_finish = a1->dictTree.m_start;
pugi::xml_node::xml_node(v17);
std::vector
::emplace_back(p_dictTree, v17);
v5 = cocos2d::CCFileUtils::sharedFileUtils();
((void (__fastcall *)(int *, cocos2d::CCFileUtils *, const char *, _DWORD))v5->createCCArrayWithContentsOfFile)(
&v14,
v5,
a2,
0);
v15 = 0;
v6 = cocos2d::CCFileUtils::sharedFileUtils();
v7 = ((int (__fastcall *)(cocos2d::CCFileUtils *, int, __int16 *, int *))v6->addSearchResolutionsOrder)(
v6,
v14,
&aO1i2r3e45s7t89[4],
&v15);
pugi::xml_document::load_buffer((int)v17, &a1->doc, v7, v15, 116, 0);
if ( !pugi::xml_parse_result::operator bool(v17) || !v7 )
{
FileOperation::getFilePath((FileOperation *)&v16, v8);
sub_774544((int)&v16, (char *)a2);
v15 = 0;
v11 = cocos2d::CCFileUtils::sharedFileUtils();
v7 = ((int (__fastcall *)(cocos2d::CCFileUtils *, pugi::xml_node_struct *, __int16 *, int *))v11->addSearchResolutionsOrder)(
v11,
v16._root,
&aO1i2r3e45s7t89[4],
&v15);
pugi::xml_document::load_buffer((int)v13, &a1->doc, v7, v15, 116, 0);
v17[0] = (pugi::xml_node)v13[0];
v17[1] = (pugi::xml_node)v13[1];
v17[2] = (pugi::xml_node)v13[2];
sub_774008(&v16);
}
v9 = pugi::xml_parse_result::operator bool(v17);
if ( v9 )
{
if ( v7 )
{
v12 = (_DWORD *)std::vector::back((int)p_dictTree);
v16._root = (pugi::xml_node_struct *)pugi::xml_node::child(&a1->doc, "plist");
*v12 = pugi::xml_node::child(&v16, "dict");
DS_Dictionary::checkCompatibility(a1);
}
else
{
LOBYTE(v9) = 0;
}
}
sub_774008(&v14);
return v9;
}