{"type": "func", "start": 6442558944, "end": 6442559374, "name": "DS_Dictionary::getIndexOfKeyWithClosestAlphaNumericalMatch", "pseudocode": "// \n// DS_Dictionary::getIndexOfKeyWithClosestAlphaNumericalMatch from 0x18001a5e0 to 0x18001a78e (430 bytes)\n// \n// 2 xrefs:\n// > <???> @ 0x1801438a8\n// > <???> @ 0x1801ae9ec\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\n__int64 __fastcall DS_Dictionary::getIndexOfKeyWithClosestAlphaNumericalMatch(DS_Dictionary *this, const char *a2)\n{\n  DS_Dictionary *v2; // rsi\n  const char *v4; // r8\n  unsigned int v5; // r13d\n  bool v6; // zf\n  std::_Vector_val<std::_Simple_types<pugi::xml_node>>::pointer Mylast; // rcx\n  const char *v8; // rbx\n  const char *v9; // rdi\n  int v10; // r15d\n  int v11; // eax\n  int v12; // r14d\n  int v13; // eax\n  int v14; // ebp\n  int v15; // esi\n  int v16; // ecx\n  int v17; // ecx\n  int v18; // ecx\n  const char *v19; // r8\n  __int64 v22; // [rsp+70h] [rbp+18h] BYREF\n  char v23; // [rsp+78h] [rbp+20h] BYREF\n\n  v2 = this;\n  v4 = \"k\";\n  v5 = 0;\n  v6 = !this->compatible;\n  Mylast = this->dictTree._Mypair._Myval2._Mylast;\n  if ( !v6 )\n    v4 = \"key\";\n  sub_18007FB10(&Mylast[-1], &v22, v4);\n  if ( !sub_18007F4E0(&v22) )\n    return 0;\n  while ( 1 )\n  {\n    v8 = (const char *)sub_18007FB70(&v22);\n    v9 = a2;\n    v10 = sub_18001C1A0(a2);\n    v11 = sub_18001C1A0(v8);\n    v12 = v11;\n    if ( !v10 )\n    {\n      if ( v11 )\n        return v5;\n      v13 = stricmp(a2, v8);\n      goto LABEL_21;\n    }\n    if ( !v11 )\n      return v5;\n    v14 = 0;\n    v15 = 0;\n    if ( v10 > 0 )\n    {\n      while ( v15 < v12 )\n      {\n        if ( !isdigit(*v9) )\n        {\n          do\n            v16 = *++v9;\n          while ( !isdigit(v16) );\n        }\n        if ( !isdigit(*v8) )\n        {\n          do\n            v17 = *++v8;\n          while ( !isdigit(v17) );\n        }\n        if ( *v9 != *v8 )\n        {\n          v2 = this;\n          v18 = *v9 - *v8;\n          goto LABEL_22;\n        }\n        ++v9;\n        ++v8;\n        ++v14;\n        ++v15;\n        if ( v14 >= v10 )\n          goto LABEL_19;\n      }\n      if ( v14 < v10 )\n        return v5;\n    }\nLABEL_19:\n    if ( v15 < v12 )\n      return v5;\n    v13 = stricmp(v9, v8);\n    v2 = this;\nLABEL_21:\n    v18 = v13;\nLABEL_22:\n    if ( v18 )\n      return v5;\n    ++v5;\n    v19 = \"k\";\n    if ( v2->compatible )\n      v19 = \"key\";\n    v22 = *(_QWORD *)sub_180081A50(&v22, &v23, v19);\n    if ( !sub_18007F4E0(&v22) )\n      return 0;\n  }\n}", "assembly": "; \n; DS_Dictionary::getIndexOfKeyWithClosestAlphaNumericalMatch from 0x18001a5e0 to 0x18001a78e (430 bytes)\n; \n; 2 xrefs:\n; > <???> @ 0x1801438a8\n; > <???> @ 0x1801ae9ec\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x18001a5e0\nmov     [rsp+arg_0], rcx                                               ; +0x5, 0x18001a5e5\npush    rbp                                                            ; +0xa, 0x18001a5ea\npush    rsi                                                            ; +0xb, 0x18001a5eb\npush    rdi                                                            ; +0xc, 0x18001a5ec\npush    r12                                                            ; +0xd, 0x18001a5ed\npush    r13                                                            ; +0xf, 0x18001a5ef\npush    r14                                                            ; +0x11, 0x18001a5f1\npush    r15                                                            ; +0x13, 0x18001a5f3\nsub     rsp, 20h                                                       ; +0x15, 0x18001a5f5\nmov     rsi, rcx                                                       ; +0x19, 0x18001a5f9\nlea     rbp, aKey; \"key\"                                               ; +0x1c, 0x18001a5fc\nmov     r12, rdx                                                       ; +0x23, 0x18001a603\nlea     r8, aK; \"k\"                                                    ; +0x26, 0x18001a606\nxor     r13d, r13d                                                     ; +0x2d, 0x18001a60d\nlea     rdx, [rsp+58h+arg_10]                                          ; +0x30, 0x18001a610\ncmp     [rcx+0E8h], r13b                                               ; +0x35, 0x18001a615\nmov     rcx, [rcx+0D8h]                                                ; +0x3c, 0x18001a61c\ncmovnz  r8, rbp                                                        ; +0x43, 0x18001a623\nsub     rcx, 8                                                         ; +0x47, 0x18001a627\ncall    sub_18007FB10                                                  ; +0x4b, 0x18001a62b\nlea     rcx, [rsp+58h+arg_10]                                          ; +0x50, 0x18001a630\ncall    sub_18007F4E0                                                  ; +0x55, 0x18001a635\ntest    rax, rax                                                       ; +0x5a, 0x18001a63a\njz      loc_18001A772                                                  ; +0x5d, 0x18001a63d\nlea     rcx, [rsp+58h+arg_10]                                          ; +0x63, 0x18001a643\ncall    sub_18007FB70                                                  ; +0x68, 0x18001a648\nmov     rcx, r12                                                       ; +0x6d, 0x18001a64d\nmov     rbx, rax                                                       ; +0x70, 0x18001a650\nmov     rdi, r12                                                       ; +0x73, 0x18001a653\ncall    sub_18001C1A0                                                  ; +0x76, 0x18001a656\nmov     rcx, rbx                                                       ; +0x7b, 0x18001a65b\nmov     r15d, eax                                                      ; +0x7e, 0x18001a65e\ncall    sub_18001C1A0                                                  ; +0x81, 0x18001a661\nmov     r14d, eax                                                      ; +0x86, 0x18001a666\ntest    r15d, r15d                                                     ; +0x89, 0x18001a669\njnz     short loc_18001A687                                            ; +0x8c, 0x18001a66c\ntest    eax, eax                                                       ; +0x8e, 0x18001a66e\njnz     loc_18001A789                                                  ; +0x90, 0x18001a670\nmov     rdx, rbx; String2                                              ; +0x96, 0x18001a676\nmov     rcx, r12; String1                                              ; +0x99, 0x18001a679\ncall    cs:_stricmp                                                    ; +0x9c, 0x18001a67c\njmp     loc_18001A72E                                                  ; +0xa2, 0x18001a682\ntest    r14d, r14d                                                     ; +0xa7, 0x18001a687\njz      loc_18001A789                                                  ; +0xaa, 0x18001a68a\nxor     ebp, ebp                                                       ; +0xb0, 0x18001a690\nxor     esi, esi                                                       ; +0xb2, 0x18001a692\ntest    r15d, r15d                                                     ; +0xb4, 0x18001a694\njle     short loc_18001A711                                            ; +0xb7, 0x18001a697\nnop     dword ptr [rax+00000000h]                                      ; +0xb9, 0x18001a699\ncmp     esi, r14d                                                      ; +0xc0, 0x18001a6a0\njge     short loc_18001A70C                                            ; +0xc3, 0x18001a6a3\nmovsx   ecx, byte ptr [rdi]; C                                         ; +0xc5, 0x18001a6a5\ncall    cs:isdigit                                                     ; +0xc8, 0x18001a6a8\ntest    eax, eax                                                       ; +0xce, 0x18001a6ae\njnz     short loc_18001A6C3                                            ; +0xd0, 0x18001a6b0\nmovsx   ecx, byte ptr [rdi+1]; C                                       ; +0xd2, 0x18001a6b2\ninc     rdi                                                            ; +0xd6, 0x18001a6b6\ncall    cs:isdigit                                                     ; +0xd9, 0x18001a6b9\ntest    eax, eax                                                       ; +0xdf, 0x18001a6bf\njz      short loc_18001A6B2                                            ; +0xe1, 0x18001a6c1\nmovsx   ecx, byte ptr [rbx]; C                                         ; +0xe3, 0x18001a6c3\ncall    cs:isdigit                                                     ; +0xe6, 0x18001a6c6\ntest    eax, eax                                                       ; +0xec, 0x18001a6cc\njnz     short loc_18001A6E1                                            ; +0xee, 0x18001a6ce\nmovsx   ecx, byte ptr [rbx+1]; C                                       ; +0xf0, 0x18001a6d0\ninc     rbx                                                            ; +0xf4, 0x18001a6d4\ncall    cs:isdigit                                                     ; +0xf7, 0x18001a6d7\ntest    eax, eax                                                       ; +0xfd, 0x18001a6dd\njz      short loc_18001A6D0                                            ; +0xff, 0x18001a6df\nmovsx   ecx, byte ptr [rdi]                                            ; +0x101, 0x18001a6e1\nmovsx   eax, byte ptr [rbx]                                            ; +0x104, 0x18001a6e4\ncmp     cl, al                                                         ; +0x107, 0x18001a6e7\njnz     short loc_18001A6FC                                            ; +0x109, 0x18001a6e9\ninc     rdi                                                            ; +0x10b, 0x18001a6eb\ninc     rbx                                                            ; +0x10e, 0x18001a6ee\ninc     ebp                                                            ; +0x111, 0x18001a6f1\ninc     esi                                                            ; +0x113, 0x18001a6f3\ncmp     ebp, r15d                                                      ; +0x115, 0x18001a6f5\njl      short loc_18001A6A0                                            ; +0x118, 0x18001a6f8\njmp     short loc_18001A711                                            ; +0x11a, 0x18001a6fa\nmov     rsi, [rsp+58h+arg_0]                                           ; +0x11c, 0x18001a6fc\nlea     rbp, aKey; \"key\"                                               ; +0x121, 0x18001a701\nsub     ecx, eax                                                       ; +0x128, 0x18001a708\njmp     short loc_18001A730                                            ; +0x12a, 0x18001a70a\ncmp     ebp, r15d                                                      ; +0x12c, 0x18001a70c\njl      short loc_18001A789                                            ; +0x12f, 0x18001a70f\ncmp     esi, r14d                                                      ; +0x131, 0x18001a711\njl      short loc_18001A789                                            ; +0x134, 0x18001a714\nmov     rdx, rbx; String2                                              ; +0x136, 0x18001a716\nmov     rcx, rdi; String1                                              ; +0x139, 0x18001a719\ncall    cs:_stricmp                                                    ; +0x13c, 0x18001a71c\nmov     rsi, [rsp+58h+arg_0]                                           ; +0x142, 0x18001a722\nlea     rbp, aKey; \"key\"                                               ; +0x147, 0x18001a727\nmov     ecx, eax                                                       ; +0x14e, 0x18001a72e\ntest    ecx, ecx                                                       ; +0x150, 0x18001a730\njnz     short loc_18001A789                                            ; +0x152, 0x18001a732\ninc     r13d                                                           ; +0x154, 0x18001a734\nlea     r8, aK; \"k\"                                                    ; +0x157, 0x18001a737\ncmp     [rsi+0E8h], cl                                                 ; +0x15e, 0x18001a73e\nlea     rdx, [rsp+58h+arg_18]                                          ; +0x164, 0x18001a744\nlea     rcx, [rsp+58h+arg_10]                                          ; +0x169, 0x18001a749\ncmovnz  r8, rbp                                                        ; +0x16e, 0x18001a74e\ncall    sub_180081A50                                                  ; +0x172, 0x18001a752\nmov     rcx, [rax]                                                     ; +0x177, 0x18001a757\nmov     [rsp+58h+arg_10], rcx                                          ; +0x17a, 0x18001a75a\nlea     rcx, [rsp+58h+arg_10]                                          ; +0x17f, 0x18001a75f\ncall    sub_18007F4E0                                                  ; +0x184, 0x18001a764\ntest    rax, rax                                                       ; +0x189, 0x18001a769\njnz     loc_18001A643                                                  ; +0x18c, 0x18001a76c\nxor     eax, eax                                                       ; +0x192, 0x18001a772\nmov     rbx, [rsp+58h+arg_8]                                           ; +0x194, 0x18001a774\nadd     rsp, 20h                                                       ; +0x199, 0x18001a779\npop     r15                                                            ; +0x19d, 0x18001a77d\npop     r14                                                            ; +0x19f, 0x18001a77f\npop     r13                                                            ; +0x1a1, 0x18001a781\npop     r12                                                            ; +0x1a3, 0x18001a783\npop     rdi                                                            ; +0x1a5, 0x18001a785\npop     rsi                                                            ; +0x1a6, 0x18001a786\npop     rbp                                                            ; +0x1a7, 0x18001a787\nretn                                                                   ; +0x1a8, 0x18001a788\nmov     eax, r13d                                                      ; +0x1a9, 0x18001a789\njmp     short loc_18001A774                                            ; +0x1ac, 0x18001a78c", "xrefs": ["<???> @ 0x1801438a8", "<???> @ 0x1801ae9ec"], "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"}