//
// DS_Dictionary::stepBackToRootSubDict from 0x1800211f0 to 0x18002129e (174 bytes)
//
// 4 xrefs:
// > ??> @ 0x180133090
// > ??> @ 0x1801330a0
// > ??> @ 0x1801438a8
// > ??> @ 0x1801aedb8
//
// 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
//
void __fastcall DS_Dictionary::stepBackToRootSubDict(DS_Dictionary *this)
{
std::vector
*p_dictTree; // rbx
std::_Simple_types::value_type *Myfirst; // rdx
_QWORD *v4; // rax
_BYTE *Mylast; // rdx
std::_Vector_val>::pointer v6; // rbx
__int64 v7; // rax
cocos2d::CCThread v8; // [rsp+30h] [rbp+8h] BYREF
char v9; // [rsp+38h] [rbp+10h] BYREF
p_dictTree = &this->dictTree;
Myfirst = this->dictTree._Mypair._Myval2._Myfirst;
if ( (unsigned __int64)(this->dictTree._Mypair._Myval2._Mylast - Myfirst) > 1 )
{
if ( Myfirst != this->dictTree._Mypair._Myval2._Mylast )
this->dictTree._Mypair._Myval2._Mylast = Myfirst;
v4 = (_QWORD *)pugi::xml_node::xml_node(&v8);
Mylast = p_dictTree->_Mypair._Myval2._Mylast;
if ( Mylast == (_BYTE *)p_dictTree->_Mypair._Myval2._Myend )
{
sub_180015D80((const void **)&p_dictTree->_Mypair._Myval2._Myfirst, Mylast, v4);
}
else
{
*(_QWORD *)Mylast = *v4;
++p_dictTree->_Mypair._Myval2._Mylast;
}
v6 = this->dictTree._Mypair._Myval2._Mylast;
v7 = sub_18007FB10(this, &v8, "plist");
v6[-1]._root = *(pugi::xml_node_struct **)sub_18007FB10(v7, &v9, "dict");
}
}