{"type": "func", "start": 6278504, "end": 6278638, "name": "DS_Dictionary::getIndexOfKeyWithClosestAlphaNumericalMatch", "pseudocode": "// \n// DS_Dictionary::getIndexOfKeyWithClosestAlphaNumericalMatch from 0x5fcd68 to 0x5fcdee (134 bytes)\n// \n// 0 xrefs:\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::getIndexOfKeyWithClosestAlphaNumericalMatch(DS_Dictionary *a1, const char *a2)\n{\n  pugi::xml_node *v4; // r0\n  const char *v5; // r1\n  unsigned int v6; // r6\n  unsigned int result; // r0\n  const char *v8; // r0\n  const char *v9; // r1\n  pugi::xml_node v10[2]; // [sp+0h] [bp-8h] BYREF\n\n  v10[0]._root = (pugi::xml_node_struct *)a1;\n  v10[1]._root = (pugi::xml_node_struct *)a2;\n  v4 = (pugi::xml_node *)std::vector<pugi::xml_node>::back((int)&a1->dictTree);\n  if ( a1->compatible )\n    v5 = \"key\";\n  else\n    v5 = \"k\";\n  v6 = 0;\n  for ( v10[0]._root = (pugi::xml_node_struct *)pugi::xml_node::child(v4, v5);\n        ;\n        v10[0]._root = (pugi::xml_node_struct *)pugi::xml_node::next_sibling(v10, v9) )\n  {\n    result = pugi::xml_node::operator void (*)(pugi::xml_node***)(v10);\n    if ( !result )\n      break;\n    v8 = (const char *)pugi::xml_node::child_value(v10);\n    if ( alphaNumericallyLessThan(a2, v8) )\n      return v6;\n    ++v6;\n    if ( a1->compatible )\n      v9 = \"key\";\n    else\n      v9 = \"k\";\n  }\n  return result;\n}", "assembly": "; \n; DS_Dictionary::getIndexOfKeyWithClosestAlphaNumericalMatch from 0x5fcd68 to 0x5fcdee (134 bytes)\n; \n; 0 xrefs:\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          {R0,R1,R4-R10,LR}                                      ; +0x0, 0x5fcd68\nMOV             R7, R0                                                 ; +0x4, 0x5fcd6c\nLDR             R5, =(__stack_chk_guard_ptr - 0x5FCD78)                ; +0x6, 0x5fcd6e\nADDS            R0, #0xC8                                              ; +0x8, 0x5fcd70\nMOV             R8, R1                                                 ; +0xa, 0x5fcd72\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xc, 0x5fcd74\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xe, 0x5fcd76\nLDR             R3, [R5]                                               ; +0x10, 0x5fcd78\nSTR             R3, [SP,#8+var_4]                                      ; +0x12, 0x5fcd7a\nBL              _ZNSt6vectorIN4pugi8xml_nodeESaIS1_EE4backEv; std::vector<pugi::xml_node>::back(void) ; +0x14, 0x5fcd7c\nLDRB.W          R3, [R7,#0xD4]                                         ; +0x18, 0x5fcd80\nCBNZ            R3, loc_5FCD8C                                         ; +0x1c, 0x5fcd84\nLDR             R1, =(aK_0 - 0x5FCD8C); \"k\"                            ; +0x1e, 0x5fcd86\nADD             R1, PC; \"k\"                                            ; +0x20, 0x5fcd88\nB               loc_5FCD90                                             ; +0x22, 0x5fcd8a\nLDR             R1, =(aKey - 0x5FCD92); \"key\"                          ; +0x24, 0x5fcd8c\nADD             R1, PC; \"key\"                                          ; +0x26, 0x5fcd8e\nBL              _ZNK4pugi8xml_node5childEPKc; pugi::xml_node::child(char const*) ; +0x28, 0x5fcd90\nLDR.W           R9, =(aKey - 0x5FCDA2); \"key\"                          ; +0x2c, 0x5fcd94\nLDR.W           R10, =(aK_0 - 0x5FCDA6); \"k\"                           ; +0x30, 0x5fcd98\nADD             R4, SP, #8+var_s0                                      ; +0x34, 0x5fcd9c\nADD             R9, PC; \"key\"                                          ; +0x36, 0x5fcd9e\nMOVS            R6, #0                                                 ; +0x38, 0x5fcda0\nADD             R10, PC; \"k\"                                           ; +0x3a, 0x5fcda2\nSTR.W           R0, [R4,#-8]!                                          ; +0x3c, 0x5fcda4\nMOV             R0, R4                                                 ; +0x40, 0x5fcda8\nBL              _ZNK4pugi8xml_nodecvPFvPPPS0_EEv; pugi::xml_node::operator void (*)(pugi::xml_node***)(void) ; +0x42, 0x5fcdaa\nCBZ             R0, loc_5FCDDC                                         ; +0x46, 0x5fcdae\nMOV             R0, R4; this                                           ; +0x48, 0x5fcdb0\nBL              _ZNK4pugi8xml_node11child_valueEv; pugi::xml_node::child_value(void) ; +0x4a, 0x5fcdb2\nMOV             R1, R0; char *                                         ; +0x4e, 0x5fcdb6\nMOV             R0, R8; char *                                         ; +0x50, 0x5fcdb8\nBL              _Z24alphaNumericallyLessThanPKcS0_; alphaNumericallyLessThan(char const*,char const*) ; +0x52, 0x5fcdba\nCBZ             R0, loc_5FCDC4                                         ; +0x56, 0x5fcdbe\nMOV             R0, R6                                                 ; +0x58, 0x5fcdc0\nB               loc_5FCDDC                                             ; +0x5a, 0x5fcdc2\nLDRB.W          R3, [R7,#0xD4]                                         ; +0x5c, 0x5fcdc4\nMOV             R0, R4; this                                           ; +0x60, 0x5fcdc8\nADDS            R6, #1                                                 ; +0x62, 0x5fcdca\nCMP             R3, #0                                                 ; +0x64, 0x5fcdcc\nITE NE                                                                 ; +0x66, 0x5fcdce\nMOVNE           R1, R9                                                 ; +0x68, 0x5fcdd0\nMOVEQ           R1, R10; char *                                        ; +0x6a, 0x5fcdd2\nBL              _ZNK4pugi8xml_node12next_siblingEPKc; pugi::xml_node::next_sibling(char const*) ; +0x6c, 0x5fcdd4\nSTR             R0, [SP,#8+var_8]                                      ; +0x70, 0x5fcdd8\nB               loc_5FCDA8                                             ; +0x72, 0x5fcdda\nLDR             R2, [SP,#8+var_4]                                      ; +0x74, 0x5fcddc\nLDR             R3, [R5]                                               ; +0x76, 0x5fcdde\nCMP             R2, R3                                                 ; +0x78, 0x5fcde0\nBEQ             loc_5FCDE8                                             ; +0x7a, 0x5fcde2\nBLX             __stack_chk_fail                                       ; +0x7c, 0x5fcde4\nADD             SP, SP, #8                                             ; +0x80, 0x5fcde8\nPOP.W           {R4-R10,PC}                                            ; +0x82, 0x5fcdea", "xrefs": [], "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"}