//
// DS_Dictionary::getObjectForKey from 0x5ff6a0 to 0x5ff7e2 (322 bytes)
//
// 1 xrefs:
// > DS_Dictionary::getArrayForKey @ 0x5ff86c
//
// 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
//
cocos2d::CCObject *DS_Dictionary::getObjectForKey(DS_Dictionary *a1, const char *a2)
{
char **p_dictTree; // r8
pugi::xml_node *v5; // r0
const char *v6; // r1
cocos2d::CCObject *v7; // r0
const char *v8; // r0
pugi::xml_node_struct *v9; // r0
_BOOL4 compatible; // r3
const char *v11; // r9
const char *v12; // r0
_BOOL4 BoolForKey; // r5
int IntegerForKey; // r3
const char *v15; // r4
const char *v16; // r0
char *v17; // r1
cocos2d::CCObject *v18; // r5
const char *v19; // r1
pugi::xml_node v21; // [sp+8h] [bp-10h] BYREF
pugi::xml_node v22; // [sp+Ch] [bp-Ch] BYREF
_BYTE v23[4]; // [sp+10h] [bp-8h] BYREF
p_dictTree = (char **)&a1->dictTree;
v5 = (pugi::xml_node *)std::vector
::back((int)&a1->dictTree);
if ( a1->compatible )
v6 = "key";
else
v6 = "k";
for ( v21._root = (pugi::xml_node_struct *)pugi::xml_node::child(v5, v6);
;
v21._root = (pugi::xml_node_struct *)pugi::xml_node::next_sibling(&v21, v19) )
{
v7 = (cocos2d::CCObject *)pugi::xml_node::operator void (*)(pugi::xml_node***)(&v21);
if ( !v7 )
return v7;
v8 = (const char *)pugi::xml_node::child_value(&v21);
if ( !strcmp(a2, v8) )
break;
if ( a1->compatible )
v19 = "key";
else
v19 = "k";
}
v9 = (pugi::xml_node_struct *)pugi::xml_node::next_sibling(&v21);
compatible = a1->compatible;
v22._root = v9;
if ( compatible )
v11 = "dict";
else
v11 = "d";
v12 = (const char *)pugi::xml_node::name(&v22);
if ( !strcmp(v11, v12) )
{
std::vector::push_back(p_dictTree, &v22);
BoolForKey = DS_Dictionary::getBoolForKey(a1, "_isArr");
IntegerForKey = DS_Dictionary::getIntegerForKey(a1, "kCEK");
if ( IntegerForKey )
return DS_Dictionary::decodeObjectForKey(a1, a2, 1, IntegerForKey);
if ( BoolForKey )
return DS_Dictionary::getArrayForKey(a1, a2, 1);
return DS_Dictionary::getDictForKey(a1, a2, 1);
}
if ( a1->compatible )
v15 = "true";
else
v15 = (const char *)&aO1i2r3e45s7t89[11];
v16 = (const char *)pugi::xml_node::name(&v22);
if ( !strcmp(v15, v16) )
v17 = (char *)&aO1i2r3e45s7t89[1];
else
v17 = (char *)pugi::xml_node::child_value(&v22);
sub_776584((int)v23, v17);
v18 = cocos2d::CCString::create();
sub_774008(v23);
return v18;
}