//
// DS_Dictionary::loadRootSubDictFromString from 0x100161058 to 0x10016113c (228 bytes)
//
// 2 xrefs:
// > GManager::loadFromString @ 0x10024a7d4
// > GManager::tryLoadData @ 0x10024acac
//
// 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
//
__int64 __fastcall DS_Dictionary::loadRootSubDictFromString(DS_Dictionary *a1, __int64 *a2)
{
__int64 v2; // x8
__int64 p_dictTree; // x21
int v6; // w9
__int64 *v7; // x1
__int64 v8; // x2
__int64 v9; // x20
__int64 v11; // [xsp+0h] [xbp-40h] BYREF
_QWORD v12[3]; // [xsp+8h] [xbp-38h] BYREF
v2 = *((unsigned __int8 *)a2 + 23);
if ( (v2 & 0x80u) != 0LL )
v2 = a2[1];
if ( !v2 )
return 0;
p_dictTree = (__int64)&a1->dictTree;
a1->dictTree.__end_ = a1->dictTree.__begin_;
pugi::xml_node::xml_node(v12);
sub_1000115B8(p_dictTree, v12);
v6 = *((char *)a2 + 23);
if ( v6 >= 0 )
v7 = a2;
else
v7 = (__int64 *)*a2;
if ( v6 >= 0 )
v8 = *((unsigned __int8 *)a2 + 23);
else
v8 = a2[1];
sub_1003ACD8C(v12, a1, v7, v8, 116, 0);
v9 = sub_1003ACC00(v12);
if ( (_DWORD)v9 )
{
v11 = sub_1003AB464((int)a1, "plist");
a1->dictTree.__end_[-1]._root = (pugi::xml_node_struct *)sub_1003AB464((int)&v11, "dict");
DS_Dictionary::checkCompatibility(a1);
}
return v9;
}