//
// DS_Dictionary::getStringArrayForKey from 0xb4762c to 0xb47898 (620 bytes)
//
// 3 xrefs:
// > DS_Dictionary::getRectArrayForKey @ 0xb48e44
// > DS_Dictionary::getVec2ArrayForKey @ 0xb492b8
// > ??> @ 0x757f8
//
// 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
//
std::vector *DS_Dictionary::getStringArrayForKey(
std::vector *__return_ptr retstr,
DS_Dictionary *a2,
const char *a3)
{
_BOOL4 compatible; // w1
pugi::xml_node *v7; // x0
const char *v8; // x1
const char *v9; // x1
const char *v10; // x0
const char *v11; // x1
char *v12; // x0
std::string *v13; // x0
pugi::xml_node_struct *root; // x1
char *v15; // x0
unsigned int *v16; // x1
int v17; // w2
pugi::xml_node v19; // [xsp+78h] [xbp+78h] BYREF
pugi::xml_node v20; // [xsp+80h] [xbp+80h] BYREF
pugi::xml_node v21; // [xsp+88h] [xbp+88h] BYREF
std::string *v22; // [xsp+90h] [xbp+90h] BYREF
std::string *v23; // [xsp+98h] [xbp+98h]
std::string *v24; // [xsp+A0h] [xbp+A0h]
compatible = a2->compatible;
v7 = a2->dictTree.m_finish - 1;
if ( compatible )
v8 = "key";
else
v8 = "k";
for ( v19._root = (pugi::xml_node_struct *)pugi::xml_node::child(v7, v8);
;
v19._root = (pugi::xml_node_struct *)pugi::xml_node::next_sibling(&v19, v9) )
{
if ( !pugi::xml_node::operator void (*)(pugi::xml_node***)(&v19) )
{
retstr->m_start = nullptr;
retstr->m_finish = nullptr;
retstr->m_reserveEnd = nullptr;
return retstr;
}
v10 = (const char *)pugi::xml_node::child_value(&v19);
if ( !strcmp(v10, a3) )
{
v21._root = (pugi::xml_node_struct *)pugi::xml_node::next_sibling(&v19);
v11 = a2->compatible ? "array" : &byte_F7A380;
v22 = (std::string *)pugi::xml_node::next_sibling(&v19, v11);
if ( (unsigned __int8)pugi::xml_node::operator==(&v21, &v22) )
break;
}
if ( a2->compatible )
v9 = "key";
else
v9 = "k";
}
v22 = nullptr;
v23 = nullptr;
v24 = nullptr;
v21._root = (pugi::xml_node_struct *)pugi::xml_node::next_sibling(&v19);
for ( v20._root = (pugi::xml_node_struct *)pugi::xml_node::first_child(&v21);
pugi::xml_node::operator void (*)(pugi::xml_node***)(&v20);
v20._root = (pugi::xml_node_struct *)pugi::xml_node::next_sibling(&v20) )
{
v12 = (char *)pugi::xml_node::child_value(&v20);
sub_D153B8((int)&v21, v12);
v13 = v23;
if ( v23 == v24 )
{
std::vector::_M_emplace_back_aux((__int64)&v22, &v21);
root = v21._root;
}
else
{
root = v21._root;
if ( v23 )
{
v23->m_data.m_data = v21._root;
root = (pugi::xml_node_struct *)&byte_124B6C8;
v21._root = (pugi::xml_node_struct *)&byte_124B6C8;
}
v23 = v13 + 1;
}
v15 = (char *)root - 24;
if ( (__int64 *)((char *)root - 24) != &qword_124B6B0 )
{
if ( &pthread_create )
{
v16 = (unsigned int *)((char *)root - 8);
do
v17 = __ldaxr(v16);
while ( __stlxr(v17 - 1, v16) );
}
else
{
v17 = *((_DWORD *)root - 2);
*((_DWORD *)root - 2) = v17 - 1;
}
if ( v17 <= 0 )
operator delete(v15);
}
}
retstr->m_start = v22;
retstr->m_finish = v23;
retstr->m_reserveEnd = v24;
return retstr;
}