//
// DS_Dictionary::loadRootSubDictFromString from 0xb480ac to 0xb481cc (288 bytes)
//
// 2 xrefs:
// > GManager::loadFromString @ 0x5885dc
// > ??> @ 0x6f3a8
//
// 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, _QWORD *a2)
{
unsigned int v4; // w21
pugi::xml_node *m_finish; // x0
unsigned __int8 v7; // w0
pugi::xml_node *v8; // x22
pugi::xml_node v9; // [xsp+48h] [xbp+48h] BYREF
pugi::xml_node v10[3]; // [xsp+50h] [xbp+50h] BYREF
if ( !*(_QWORD *)(*a2 - 24LL) )
return 0;
a1->dictTree.m_finish = a1->dictTree.m_start;
pugi::xml_node::xml_node(v10);
m_finish = a1->dictTree.m_finish;
if ( m_finish == a1->dictTree.m_reserveEnd )
{
std::vector
::_M_emplace_back_aux((__int64)&a1->dictTree, v10);
}
else
{
if ( m_finish )
m_finish->_root = (pugi::xml_node_struct *)v10[0];
a1->dictTree.m_finish = m_finish + 1;
}
pugi::xml_document::load_buffer(v10, a1, *a2, *(_QWORD *)(*a2 - 24LL), 116, 0);
v7 = pugi::xml_parse_result::operator bool(v10);
v4 = v7;
if ( v7 )
{
v8 = a1->dictTree.m_finish;
v9._root = (pugi::xml_node_struct *)pugi::xml_node::child(&a1->doc, "plist");
v8[-1]._root = (pugi::xml_node_struct *)pugi::xml_node::child(&v9, "dict");
DS_Dictionary::checkCompatibility(a1);
}
else
{
return 0;
}
return v4;
}