{"type": "func", "start": 6289056, "end": 6289378, "name": "DS_Dictionary::getObjectForKey", "pseudocode": "// \n// DS_Dictionary::getObjectForKey from 0x5ff6a0 to 0x5ff7e2 (322 bytes)\n// \n// 1 xrefs:\n// > DS_Dictionary::getArrayForKey @ 0x5ff86c\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\ncocos2d::CCObject *DS_Dictionary::getObjectForKey(DS_Dictionary *a1, const char *a2)\n{\n  char **p_dictTree; // r8\n  pugi::xml_node *v5; // r0\n  const char *v6; // r1\n  cocos2d::CCObject *v7; // r0\n  const char *v8; // r0\n  pugi::xml_node_struct *v9; // r0\n  _BOOL4 compatible; // r3\n  const char *v11; // r9\n  const char *v12; // r0\n  _BOOL4 BoolForKey; // r5\n  int IntegerForKey; // r3\n  const char *v15; // r4\n  const char *v16; // r0\n  char *v17; // r1\n  cocos2d::CCObject *v18; // r5\n  const char *v19; // r1\n  pugi::xml_node v21; // [sp+8h] [bp-10h] BYREF\n  pugi::xml_node v22; // [sp+Ch] [bp-Ch] BYREF\n  _BYTE v23[4]; // [sp+10h] [bp-8h] BYREF\n\n  p_dictTree = (char **)&a1->dictTree;\n  v5 = (pugi::xml_node *)std::vector<pugi::xml_node>::back((int)&a1->dictTree);\n  if ( a1->compatible )\n    v6 = \"key\";\n  else\n    v6 = \"k\";\n  for ( v21._root = (pugi::xml_node_struct *)pugi::xml_node::child(v5, v6);\n        ;\n        v21._root = (pugi::xml_node_struct *)pugi::xml_node::next_sibling(&v21, v19) )\n  {\n    v7 = (cocos2d::CCObject *)pugi::xml_node::operator void (*)(pugi::xml_node***)(&v21);\n    if ( !v7 )\n      return v7;\n    v8 = (const char *)pugi::xml_node::child_value(&v21);\n    if ( !strcmp(a2, v8) )\n      break;\n    if ( a1->compatible )\n      v19 = \"key\";\n    else\n      v19 = \"k\";\n  }\n  v9 = (pugi::xml_node_struct *)pugi::xml_node::next_sibling(&v21);\n  compatible = a1->compatible;\n  v22._root = v9;\n  if ( compatible )\n    v11 = \"dict\";\n  else\n    v11 = \"d\";\n  v12 = (const char *)pugi::xml_node::name(&v22);\n  if ( !strcmp(v11, v12) )\n  {\n    std::vector<pugi::xml_node>::push_back(p_dictTree, &v22);\n    BoolForKey = DS_Dictionary::getBoolForKey(a1, \"_isArr\");\n    IntegerForKey = DS_Dictionary::getIntegerForKey(a1, \"kCEK\");\n    if ( IntegerForKey )\n      return DS_Dictionary::decodeObjectForKey(a1, a2, 1, IntegerForKey);\n    if ( BoolForKey )\n      return DS_Dictionary::getArrayForKey(a1, a2, 1);\n    return DS_Dictionary::getDictForKey(a1, a2, 1);\n  }\n  if ( a1->compatible )\n    v15 = \"true\";\n  else\n    v15 = (const char *)&aO1i2r3e45s7t89[11];\n  v16 = (const char *)pugi::xml_node::name(&v22);\n  if ( !strcmp(v15, v16) )\n    v17 = (char *)&aO1i2r3e45s7t89[1];\n  else\n    v17 = (char *)pugi::xml_node::child_value(&v22);\n  sub_776584((int)v23, v17);\n  v18 = cocos2d::CCString::create();\n  sub_774008(v23);\n  return v18;\n}", "assembly": "; \n; DS_Dictionary::getObjectForKey from 0x5ff6a0 to 0x5ff7e2 (322 bytes)\n; \n; 1 xrefs:\n; > DS_Dictionary::getArrayForKey @ 0x5ff86c\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH.W          {R4-R10,LR}                                            ; +0x0, 0x5ff6a0\nADD.W           R8, R0, #0xC8                                          ; +0x4, 0x5ff6a4\nLDR             R7, =(__stack_chk_guard_ptr - 0x5FF6B4)                ; +0x8, 0x5ff6a8\nSUB             SP, SP, #0x18                                          ; +0xa, 0x5ff6aa\nMOV             R4, R0                                                 ; +0xc, 0x5ff6ac\nMOV             R0, R8                                                 ; +0xe, 0x5ff6ae\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0x10, 0x5ff6b0\nLDR             R7, [R7]; __stack_chk_guard                            ; +0x12, 0x5ff6b2\nMOV             R6, R1                                                 ; +0x14, 0x5ff6b4\nLDR             R3, [R7]                                               ; +0x16, 0x5ff6b6\nSTR             R3, [SP,#0x18+var_4]                                   ; +0x18, 0x5ff6b8\nBL              _ZNSt6vectorIN4pugi8xml_nodeESaIS1_EE4backEv; std::vector<pugi::xml_node>::back(void) ; +0x1a, 0x5ff6ba\nLDRB.W          R3, [R4,#0xD4]                                         ; +0x1e, 0x5ff6be\nCBNZ            R3, loc_5FF6CA                                         ; +0x22, 0x5ff6c2\nLDR             R1, =(aK_0 - 0x5FF6CA); \"k\"                            ; +0x24, 0x5ff6c4\nADD             R1, PC; \"k\"                                            ; +0x26, 0x5ff6c6\nB               loc_5FF6CE                                             ; +0x28, 0x5ff6c8\nLDR             R1, =(aKey - 0x5FF6D0); \"key\"                          ; +0x2a, 0x5ff6ca\nADD             R1, PC; \"key\"                                          ; +0x2c, 0x5ff6cc\nBL              _ZNK4pugi8xml_node5childEPKc; pugi::xml_node::child(char const*) ; +0x2e, 0x5ff6ce\nLDR.W           R9, =(aKey - 0x5FF6E0); \"key\"                          ; +0x32, 0x5ff6d2\nLDR.W           R10, =(aK_0 - 0x5FF6E2); \"k\"                           ; +0x36, 0x5ff6d6\nADD             R5, SP, #0x18+var_s0                                   ; +0x3a, 0x5ff6da\nADD             R9, PC; \"key\"                                          ; +0x3c, 0x5ff6dc\nADD             R10, PC; \"k\"                                           ; +0x3e, 0x5ff6de\nSTR.W           R0, [R5,#-0x10]!                                       ; +0x40, 0x5ff6e0\nMOV             R0, R5                                                 ; +0x44, 0x5ff6e4\nBL              _ZNK4pugi8xml_nodecvPFvPPPS0_EEv; pugi::xml_node::operator void (*)(pugi::xml_node***)(void) ; +0x46, 0x5ff6e6\nCMP             R0, #0                                                 ; +0x4a, 0x5ff6ea\nBEQ             loc_5FF7CC                                             ; +0x4c, 0x5ff6ec\nMOV             R0, R5; this                                           ; +0x4e, 0x5ff6ee\nBL              _ZNK4pugi8xml_node11child_valueEv; pugi::xml_node::child_value(void) ; +0x50, 0x5ff6f0\nMOV             R1, R0; char *                                         ; +0x54, 0x5ff6f4\nMOV             R0, R6; char *                                         ; +0x56, 0x5ff6f6\nBLX             strcmp                                                 ; +0x58, 0x5ff6f8\nCMP             R0, #0                                                 ; +0x5c, 0x5ff6fc\nBNE             loc_5FF7B6                                             ; +0x5e, 0x5ff6fe\nMOV             R0, R5; this                                           ; +0x60, 0x5ff700\nBL              _ZNK4pugi8xml_node12next_siblingEv; pugi::xml_node::next_sibling(void) ; +0x62, 0x5ff702\nLDRB.W          R3, [R4,#0xD4]                                         ; +0x66, 0x5ff706\nSTR             R0, [SP,#0x18+var_C]                                   ; +0x6a, 0x5ff70a\nCBNZ            R3, loc_5FF716                                         ; +0x6c, 0x5ff70c\nLDR.W           R9, =(aD_0 - 0x5FF716); \"d\"                            ; +0x6e, 0x5ff70e\nADD             R9, PC; \"d\"                                            ; +0x72, 0x5ff712\nB               loc_5FF71C                                             ; +0x74, 0x5ff714\nLDR.W           R9, =(aDict_1 - 0x5FF71E); \"dict\"                      ; +0x76, 0x5ff716\nADD             R9, PC; \"dict\"                                         ; +0x7a, 0x5ff71a\nADD             R5, SP, #0x18+var_C                                    ; +0x7c, 0x5ff71c\nMOV             R0, R5; this                                           ; +0x7e, 0x5ff71e\nBL              _ZNK4pugi8xml_node4nameEv; pugi::xml_node::name(void)  ; +0x80, 0x5ff720\nMOV             R1, R0; char *                                         ; +0x84, 0x5ff724\nMOV             R0, R9; char *                                         ; +0x86, 0x5ff726\nBLX             strcmp                                                 ; +0x88, 0x5ff728\nCBNZ            R0, loc_5FF76A                                         ; +0x8c, 0x5ff72c\nMOV             R1, R5                                                 ; +0x8e, 0x5ff72e\nMOV             R0, R8                                                 ; +0x90, 0x5ff730\nBL              _ZNSt6vectorIN4pugi8xml_nodeESaIS1_EE9push_backERKS1_; std::vector<pugi::xml_node>::push_back(pugi::xml_node const&) ; +0x92, 0x5ff732\nLDR             R1, =(aIsarr - 0x5FF73E); \"_isArr\"                     ; +0x96, 0x5ff736\nMOV             R0, R4; this                                           ; +0x98, 0x5ff738\nADD             R1, PC; \"_isArr\"                                       ; +0x9a, 0x5ff73a\nBL              _ZN13DS_Dictionary13getBoolForKeyEPKc; DS_Dictionary::getBoolForKey(char const*) ; +0x9c, 0x5ff73c\nLDR             R1, =(aKcek - 0x5FF746); \"kCEK\"                        ; +0xa0, 0x5ff740\nADD             R1, PC; \"kCEK\"                                         ; +0xa2, 0x5ff742\nMOV             R5, R0                                                 ; +0xa4, 0x5ff744\nMOV             R0, R4; this                                           ; +0xa6, 0x5ff746\nBL              _ZN13DS_Dictionary16getIntegerForKeyEPKc; DS_Dictionary::getIntegerForKey(char const*) ; +0xa8, 0x5ff748\nMOV             R1, R6; char *                                         ; +0xac, 0x5ff74c\nMOVS            R2, #1; bool                                           ; +0xae, 0x5ff74e\nMOV             R3, R0; int                                            ; +0xb0, 0x5ff750\nMOV             R0, R4; this                                           ; +0xb2, 0x5ff752\nCBZ             R3, loc_5FF75C                                         ; +0xb4, 0x5ff754\nBL              _ZN13DS_Dictionary18decodeObjectForKeyEPKcbi; DS_Dictionary::decodeObjectForKey(char const*,bool,int) ; +0xb6, 0x5ff756\nB               loc_5FF7CC                                             ; +0xba, 0x5ff75a\nCBZ             R5, loc_5FF764                                         ; +0xbc, 0x5ff75c\nBL              _ZN13DS_Dictionary14getArrayForKeyEPKcb; DS_Dictionary::getArrayForKey(char const*,bool) ; +0xbe, 0x5ff75e\nB               loc_5FF7CC                                             ; +0xc2, 0x5ff762\nBL              _ZN13DS_Dictionary13getDictForKeyEPKcb; DS_Dictionary::getDictForKey(char const*,bool) ; +0xc4, 0x5ff764\nB               loc_5FF7CC                                             ; +0xc8, 0x5ff768\nLDRB.W          R3, [R4,#0xD4]                                         ; +0xca, 0x5ff76a\nCBNZ            R3, loc_5FF776                                         ; +0xce, 0x5ff76e\nLDR             R4, =(aO1i2r3e45s7t89+0x16 - 0x5FF776); \"t89g\"         ; +0xd0, 0x5ff770\nADD             R4, PC; \"t89g\"                                         ; +0xd2, 0x5ff772\nB               loc_5FF77A                                             ; +0xd4, 0x5ff774\nLDR             R4, =(aTrue - 0x5FF77C); \"true\"                        ; +0xd6, 0x5ff776\nADD             R4, PC; \"true\"                                         ; +0xd8, 0x5ff778\nMOV             R0, R5; this                                           ; +0xda, 0x5ff77a\nADD             R6, SP, #0x18+var_14                                   ; +0xdc, 0x5ff77c\nBL              _ZNK4pugi8xml_node4nameEv; pugi::xml_node::name(void)  ; +0xde, 0x5ff77e\nMOV             R1, R0; char *                                         ; +0xe2, 0x5ff782\nMOV             R0, R4; char *                                         ; +0xe4, 0x5ff784\nBLX             strcmp                                                 ; +0xe6, 0x5ff786\nADD             R4, SP, #0x18+var_8                                    ; +0xea, 0x5ff78a\nCBNZ            R0, loc_5FF796                                         ; +0xec, 0x5ff78c\nLDR             R1, =(aO1i2r3e45s7t89+2 - 0x5FF796); \"1i2r3e45s7t89g\"  ; +0xee, 0x5ff78e\nMOV             R0, R4                                                 ; +0xf0, 0x5ff790\nADD             R1, PC; \"1i2r3e45s7t89g\"                               ; +0xf2, 0x5ff792\nB               loc_5FF7A0                                             ; +0xf4, 0x5ff794\nMOV             R0, R5; this                                           ; +0xf6, 0x5ff796\nBL              _ZNK4pugi8xml_node11child_valueEv; pugi::xml_node::child_value(void) ; +0xf8, 0x5ff798\nMOV             R1, R0; char *                                         ; +0xfc, 0x5ff79c\nMOV             R0, R4; int                                            ; +0xfe, 0x5ff79e\nMOV             R2, R6                                                 ; +0x100, 0x5ff7a0\nBL              sub_776584                                             ; +0x102, 0x5ff7a2\nMOV             R0, R4                                                 ; +0x106, 0x5ff7a6\nBL              _ZN7cocos2d8CCString6createERKSs; cocos2d::CCString::create(std::string const&) ; +0x108, 0x5ff7a8\nMOV             R5, R0                                                 ; +0x10c, 0x5ff7ac\nMOV             R0, R4                                                 ; +0x10e, 0x5ff7ae\nBL              sub_774008                                             ; +0x110, 0x5ff7b0\nB               loc_5FF7CE                                             ; +0x114, 0x5ff7b4\nLDRB.W          R3, [R4,#0xD4]                                         ; +0x116, 0x5ff7b6\nMOV             R0, R5; this                                           ; +0x11a, 0x5ff7ba\nCMP             R3, #0                                                 ; +0x11c, 0x5ff7bc\nITE NE                                                                 ; +0x11e, 0x5ff7be\nMOVNE           R1, R9                                                 ; +0x120, 0x5ff7c0\nMOVEQ           R1, R10; char *                                        ; +0x122, 0x5ff7c2\nBL              _ZNK4pugi8xml_node12next_siblingEPKc; pugi::xml_node::next_sibling(char const*) ; +0x124, 0x5ff7c4\nSTR             R0, [SP,#0x18+var_10]                                  ; +0x128, 0x5ff7c8\nB               loc_5FF6E4                                             ; +0x12a, 0x5ff7ca\nMOV             R5, R0                                                 ; +0x12c, 0x5ff7cc\nLDR             R2, [SP,#0x18+var_4]                                   ; +0x12e, 0x5ff7ce\nMOV             R0, R5                                                 ; +0x130, 0x5ff7d0\nLDR             R3, [R7]                                               ; +0x132, 0x5ff7d2\nCMP             R2, R3                                                 ; +0x134, 0x5ff7d4\nBEQ             loc_5FF7DC                                             ; +0x136, 0x5ff7d6\nBLX             __stack_chk_fail                                       ; +0x138, 0x5ff7d8\nADD             SP, SP, #0x18                                          ; +0x13c, 0x5ff7dc\nPOP.W           {R4-R10,PC}                                            ; +0x13e, 0x5ff7de", "xrefs": ["DS_Dictionary::getArrayForKey @ 0x5ff86c"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}