//
// DS_Dictionary::loadRootSubDictFromCompressedFile from 0x5fed5c to 0x5fee7c (288 bytes)
//
// 1 xrefs:
// > GManager::tryLoadData @ 0x2f01f0
//
// 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::loadRootSubDictFromCompressedFile(DS_Dictionary *a1, const char *a2)
{
char **p_dictTree; // r11
int v5; // r1
cocos2d::CCFileUtils *v6; // r0
cocos2d *v7; // r8
int v8; // r4
_DWORD *v10; // r7
_DWORD v11[4]; // [sp+8h] [bp-14h] BYREF
int v12; // [sp+18h] [bp-4h] BYREF
char *v13; // [sp+1Ch] [bp+0h] BYREF
int v14; // [sp+20h] [bp+4h] BYREF
int v15; // [sp+24h] [bp+8h] BYREF
pugi::xml_node v16[3]; // [sp+28h] [bp+Ch] BYREF
p_dictTree = (char **)&a1->dictTree;
a1->dictTree.m_finish = a1->dictTree.m_start;
pugi::xml_node::xml_node(v16);
std::vector
::emplace_back(p_dictTree, v16);
sub_776584((int)&v12, (char *)&unk_939830);
FileOperation::getFilePath((FileOperation *)&v13, v5);
sub_774544((int)&v13, (char *)a2);
sub_7753D4((int)&v12, v13);
v14 = 0;
v6 = cocos2d::CCFileUtils::sharedFileUtils();
v7 = (cocos2d *)((int (__fastcall *)(cocos2d::CCFileUtils *, int, __int16 *, int *))v6->addSearchResolutionsOrder)(
v6,
v12,
&aO1i2r3e45s7t89[4],
&v14);
pugi::xml_parse_result::xml_parse_result((pugi::xml_parse_result *)v16);
if ( v7 )
{
cocos2d::ZipUtils::decompressString2((cocos2d::ZipUtils *)&v15, v7, 1, (const unsigned __int8 *)v14, 11);
pugi::xml_document::load_buffer((int)v11, &a1->doc, v15, *(_DWORD *)(v15 - 12), 116, 0);
v16[0] = (pugi::xml_node)v11[0];
v16[1] = (pugi::xml_node)v11[1];
v16[2] = (pugi::xml_node)v11[2];
sub_774008(&v15);
}
v8 = pugi::xml_parse_result::operator bool(v16);
if ( v8 )
{
if ( v7 )
{
v10 = (_DWORD *)std::vector::back((int)p_dictTree);
v15 = pugi::xml_node::child(&a1->doc, "plist");
*v10 = pugi::xml_node::child((pugi::xml_node *)&v15, "dict");
operator delete[](v7);
DS_Dictionary::checkCompatibility(a1);
}
else
{
LOBYTE(v8) = 0;
}
}
sub_774008(&v13);
sub_774008(&v12);
return v8;
}