{"type": "func", "start": 11808588, "end": 11808824, "name": "DS_Dictionary::getIndexOfKey", "pseudocode": "// \n// DS_Dictionary::getIndexOfKey from 0xb42f4c to 0xb43038 (236 bytes)\n// \n// 1 xrefs:\n// > <???> @ 0xa5dc8\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\nunsigned int DS_Dictionary::getIndexOfKey(DS_Dictionary *a1, const char *a2)\n{\n  _BOOL4 compatible; // w1\n  pugi::xml_node *v5; // x0\n  const char *v6; // x1\n  int v7; // w20\n  const char *v8; // x0\n  const char *v9; // x1\n  __int64 v10; // x0\n  pugi::xml_node v12; // [xsp+50h] [xbp+50h] BYREF\n\n  compatible = a1->compatible;\n  v5 = a1->dictTree.m_finish - 1;\n  if ( compatible )\n    v6 = \"key\";\n  else\n    v6 = \"k\";\n  v7 = 0;\n  for ( v12._root = (pugi::xml_node_struct *)pugi::xml_node::child(v5, v6);\n        ;\n        v12._root = (pugi::xml_node_struct *)pugi::xml_node::next_sibling(&v12, v9) )\n  {\n    v10 = pugi::xml_node::operator void (*)(pugi::xml_node***)(&v12);\n    if ( !v10 )\n      break;\n    v8 = (const char *)pugi::xml_node::child_value(&v12);\n    if ( !strcmp(v8, a2) )\n    {\n      LODWORD(v10) = v7;\n      return v10;\n    }\n    ++v7;\n    if ( a1->compatible )\n      v9 = \"key\";\n    else\n      v9 = \"k\";\n  }\n  return v10;\n}", "assembly": "; \n; DS_Dictionary::getIndexOfKey from 0xb42f4c to 0xb43038 (236 bytes)\n; \n; 1 xrefs:\n; > <???> @ 0xa5dc8\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\nSTP             X29, X30, [SP,#var_60]!                                ; +0x0, 0xb42f4c\nMOV             X29, SP                                                ; +0x4, 0xb42f50\nSTP             X23, X24, [SP,#0x60+var_30]                            ; +0x8, 0xb42f54\nADRP            X24, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0xb42f58\nSTR             X25, [SP,#0x60+var_20]                                 ; +0x10, 0xb42f5c\nMOV             X25, X1                                                ; +0x14, 0xb42f60\nLDRB            W1, [X0,#0xE8]                                         ; +0x18, 0xb42f64\nMOV             X23, X0                                                ; +0x1c, 0xb42f68\nLDR             X0, [X0,#0xD8]                                         ; +0x20, 0xb42f6c\nLDR             X2, [X24,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x24, 0xb42f70\nSTP             X19, X20, [SP,#0x60+var_50]                            ; +0x28, 0xb42f74\nSTP             X21, X22, [SP,#0x60+var_40]                            ; +0x2c, 0xb42f78\nLDR             X2, [X2]                                               ; +0x30, 0xb42f7c\nSUB             X0, X0, #8; this                                       ; +0x34, 0xb42f80\nSTR             X2, [X29,#0x60+var_8]                                  ; +0x38, 0xb42f84\nCBNZ            W1, loc_B43020                                         ; +0x3c, 0xb42f88\nADRL            X1, (aNoVerifyCookie+0x18); char *                     ; +0x40, 0xb42f8c\nADD             X19, X29, #0x60+arg_0                                  ; +0x48, 0xb42f94\nADRP            X22, #(aExpectingADsaK+0x10)@PAGE; \"key\"               ; +0x4c, 0xb42f98\nADRP            X21, #(aNoVerifyCookie+0x18)@PAGE; \"k\"                 ; +0x50, 0xb42f9c\nBL              _ZNK4pugi8xml_node5childEPKc; pugi::xml_node::child(char const*) ; +0x54, 0xb42fa0\nMOV             W20, #0                                                ; +0x58, 0xb42fa4\nADD             X22, X22, #(aExpectingADsaK+0x10)@PAGEOFF; \"key\"       ; +0x5c, 0xb42fa8\nADD             X21, X21, #(aNoVerifyCookie+0x18)@PAGEOFF; \"k\"         ; +0x60, 0xb42fac\nSTR             X0, [X19,#-0x10]!                                      ; +0x64, 0xb42fb0\nB               loc_B42FE8                                             ; +0x68, 0xb42fb4\nMOV             X0, X19; this                                          ; +0x6c, 0xb42fb8\nBL              _ZNK4pugi8xml_node11child_valueEv; pugi::xml_node::child_value(void) ; +0x70, 0xb42fbc\nMOV             X1, X25; char *                                        ; +0x74, 0xb42fc0\nBL              .strcmp                                                ; +0x78, 0xb42fc4\nCBZ             W0, loc_B4302C                                         ; +0x7c, 0xb42fc8\nLDRB            W1, [X23,#0xE8]                                        ; +0x80, 0xb42fcc\nMOV             X0, X19; this                                          ; +0x84, 0xb42fd0\nADD             W20, W20, #1                                           ; +0x88, 0xb42fd4\nCMP             W1, WZR                                                ; +0x8c, 0xb42fd8\nCSEL            X1, X22, X21, NE; char *                               ; +0x90, 0xb42fdc\nBL              _ZNK4pugi8xml_node12next_siblingEPKc; pugi::xml_node::next_sibling(char const*) ; +0x94, 0xb42fe0\nSTR             X0, [X29,#0x60+var_10]                                 ; +0x98, 0xb42fe4\nMOV             X0, X19                                                ; +0x9c, 0xb42fe8\nBL              _ZNK4pugi8xml_nodecvPFvPPPS0_EEv; pugi::xml_node::operator void (*)(pugi::xml_node***)(void) ; +0xa0, 0xb42fec\nCBNZ            X0, loc_B42FB8                                         ; +0xa4, 0xb42ff0\nLDR             X24, [X24,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0xa8, 0xb42ff4\nLDR             X2, [X29,#0x60+var_8]                                  ; +0xac, 0xb42ff8\nLDR             X1, [X24]                                              ; +0xb0, 0xb42ffc\nCMP             X2, X1                                                 ; +0xb4, 0xb43000\nB.NE            loc_B43034                                             ; +0xb8, 0xb43004\nLDP             X19, X20, [SP,#0x60+var_50]                            ; +0xbc, 0xb43008\nLDP             X21, X22, [SP,#0x60+var_40]                            ; +0xc0, 0xb4300c\nLDP             X23, X24, [SP,#0x60+var_30]                            ; +0xc4, 0xb43010\nLDR             X25, [SP,#0x60+var_20]                                 ; +0xc8, 0xb43014\nLDP             X29, X30, [SP+0x60+var_60],#0x60                       ; +0xcc, 0xb43018\nRET                                                                    ; +0xd0, 0xb4301c\nADRL            X1, (aExpectingADsaK+0x10); \"key\"                      ; +0xd4, 0xb43020\nB               loc_B42F94                                             ; +0xdc, 0xb43028\nMOV             W0, W20                                                ; +0xe0, 0xb4302c\nB               loc_B42FF4                                             ; +0xe4, 0xb43030\nBL              .__stack_chk_fail                                      ; +0xe8, 0xb43034", "xrefs": ["<???> @ 0xa5dc8"], "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"}