{"type": "func", "start": 6442959152, "end": 6442959526, "name": "sub_18007C130", "pseudocode": "// \n// sub_18007C130 from 0x18007c130 to 0x18007c2a6 (374 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x1801ac290\n// > <???> @ 0x1801ae0c0\n// > <???> @ 0x1801f9ec4\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 sub_18007C130(__int64 **a1, unsigned int a2, __int64 a3, __int64 a4, int a5, int a6)\n{\n  __int64 *v7; // rbx\n  __int64 v10; // rax\n  unsigned int v11; // edi\n  int v12; // eax\n  __int64 v13; // rax\n  __int64 v14; // rax\n  int v15; // ecx\n  __int64 v17; // rdx\n  int v18; // [rsp+50h] [rbp+8h] BYREF\n\n  v7 = *a1;\n  if ( a6 == 1 )\n  {\n    if ( !*((_BYTE *)v7 + 49) || a2 )\n    {\n      v11 = 0;\n      if ( a3 && a4 )\n      {\n        if ( v7[84] )\n        {\n          **(_DWORD **)(a4 + 8) = *((unsigned __int16 *)v7 + 140);\n          v12 = sub_18007C870(*((unsigned __int16 *)v7 + 140));\n          if ( v12 != 1 )\n            *(_DWORD *)(a4 + 32) = v12;\n        }\n        else\n        {\n          sub_180097620(*(_QWORD *)(v7[85] + 96), &a6, 0, 0);\n          v13 = v7[85];\n          if ( !v13 )\n            return 6;\n          v14 = *(_QWORD *)(v13 + 96);\n          if ( !*(_QWORD *)(v14 + 296) || a6 )\n            return 6;\n          *(_QWORD *)(v14 + 176) = v14;\n          v11 = (*(__int64 (__fastcall **)(__int64, _QWORD, __int64, __int64, int, int))(*(_QWORD *)(v7[85] + 96) + 296LL))(\n                  *(_QWORD *)(v7[85] + 96) + 176LL,\n                  a2,\n                  a3,\n                  a4,\n                  a5,\n                  1);\n          if ( *((_WORD *)v7 + 140) )\n            v15 = *((unsigned __int16 *)v7 + 140);\n          else\n            v15 = *(_DWORD *)(v7[21] + 1748);\n          if ( **(_DWORD **)(a4 + 8) != v15 )\n            return 6;\n        }\n      }\n    }\n    else\n    {\n      v10 = *v7;\n      *((_BYTE *)v7 + 49) = 0;\n      (*(void (__fastcall **)(__int64 *, __int64, _QWORD))(v10 + 40))(v7, 1, 0);\n      return a2 + 9;\n    }\n  }\n  else\n  {\n    v17 = **(_QWORD **)(a4 + 24);\n    v18 = **(_DWORD **)(a4 + 8);\n    return (unsigned int)sub_18007C8F0(v7, v17, &v18, a2);\n  }\n  return v11;\n}", "assembly": "; \n; sub_18007C130 from 0x18007c130 to 0x18007c2a6 (374 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x1801ac290\n; > <???> @ 0x1801ae0c0\n; > <???> @ 0x1801f9ec4\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, 0x18007c130\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x18007c135\npush    rsi                                                            ; +0xa, 0x18007c13a\npush    rdi                                                            ; +0xb, 0x18007c13b\npush    r14                                                            ; +0xc, 0x18007c13c\nsub     rsp, 30h                                                       ; +0xe, 0x18007c13e\ncmp     [rsp+48h+arg_28], 1                                            ; +0x12, 0x18007c142\nmov     rsi, r9                                                        ; +0x17, 0x18007c147\nmov     rbx, [rcx]                                                     ; +0x1a, 0x18007c14a\nmov     r14, r8                                                        ; +0x1d, 0x18007c14d\nmov     ebp, edx                                                       ; +0x20, 0x18007c150\njnz     loc_18007C26E                                                  ; +0x22, 0x18007c152\ncmp     byte ptr [rbx+31h], 0                                          ; +0x28, 0x18007c158\njz      short loc_18007C180                                            ; +0x2c, 0x18007c15c\ntest    edx, edx                                                       ; +0x2e, 0x18007c15e\njnz     short loc_18007C180                                            ; +0x30, 0x18007c160\nmov     rax, [rbx]                                                     ; +0x32, 0x18007c162\nmov     r9b, 1                                                         ; +0x35, 0x18007c165\nmov     [rbx+31h], dl                                                  ; +0x38, 0x18007c168\nxor     r8d, r8d                                                       ; +0x3b, 0x18007c16b\nmovzx   edx, r9b                                                       ; +0x3e, 0x18007c16e\nmov     rcx, rbx                                                       ; +0x42, 0x18007c172\ncall    qword ptr [rax+28h]                                            ; +0x45, 0x18007c175\nlea     edi, [rbp+9]                                                   ; +0x48, 0x18007c178\njmp     loc_18007C291                                                  ; +0x4b, 0x18007c17b\nxor     edi, edi                                                       ; +0x50, 0x18007c180\ntest    r14, r14                                                       ; +0x52, 0x18007c182\njz      loc_18007C291                                                  ; +0x55, 0x18007c185\ntest    rsi, rsi                                                       ; +0x5b, 0x18007c18b\njz      loc_18007C291                                                  ; +0x5e, 0x18007c18e\ncmp     [rbx+2A0h], rdi                                                ; +0x64, 0x18007c194\njz      short loc_18007C1C7                                            ; +0x6b, 0x18007c19b\nmovzx   ecx, word ptr [rbx+118h]                                       ; +0x6d, 0x18007c19d\nmov     rax, [r9+8]                                                    ; +0x74, 0x18007c1a4\nmov     [rax], ecx                                                     ; +0x78, 0x18007c1a8\nmovzx   ecx, word ptr [rbx+118h]                                       ; +0x7a, 0x18007c1aa\ncall    sub_18007C870                                                  ; +0x81, 0x18007c1b1\ncmp     eax, 1                                                         ; +0x86, 0x18007c1b6\njz      loc_18007C291                                                  ; +0x89, 0x18007c1b9\nmov     [rsi+20h], eax                                                 ; +0x8f, 0x18007c1bf\njmp     loc_18007C291                                                  ; +0x92, 0x18007c1c2\nmov     rcx, [rbx+2A8h]                                                ; +0x97, 0x18007c1c7\nlea     rdx, [rsp+48h+arg_28]                                          ; +0x9e, 0x18007c1ce\nxor     r9d, r9d                                                       ; +0xa3, 0x18007c1d3\nxor     r8d, r8d                                                       ; +0xa6, 0x18007c1d6\nmov     rcx, [rcx+60h]                                                 ; +0xa9, 0x18007c1d9\ncall    sub_180097620                                                  ; +0xad, 0x18007c1dd\nmov     rax, [rbx+2A8h]                                                ; +0xb2, 0x18007c1e2\ntest    rax, rax                                                       ; +0xb9, 0x18007c1e9\njz      short loc_18007C267                                            ; +0xbc, 0x18007c1ec\nmov     rax, [rax+60h]                                                 ; +0xbe, 0x18007c1ee\ncmp     [rax+128h], rdi                                                ; +0xc2, 0x18007c1f2\njz      short loc_18007C267                                            ; +0xc9, 0x18007c1f9\ncmp     [rsp+48h+arg_28], edi                                          ; +0xcb, 0x18007c1fb\njnz     short loc_18007C267                                            ; +0xcf, 0x18007c1ff\nmov     [rax+0B0h], rax                                                ; +0xd1, 0x18007c201\nmov     r9, rsi                                                        ; +0xd8, 0x18007c208\nmov     rax, [rbx+2A8h]                                                ; +0xdb, 0x18007c20b\nmov     r8, r14                                                        ; +0xe2, 0x18007c212\nmov     [rsp+48h+var_20], 1                                            ; +0xe5, 0x18007c215\nmov     edx, ebp                                                       ; +0xed, 0x18007c21d\nmov     r10, [rax+60h]                                                 ; +0xef, 0x18007c21f\nmov     eax, [rsp+48h+arg_20]                                          ; +0xf3, 0x18007c223\nmov     [rsp+48h+var_28], eax                                          ; +0xf7, 0x18007c227\nlea     rcx, [r10+0B0h]                                                ; +0xfb, 0x18007c22b\ncall    qword ptr [r10+128h]                                           ; +0x102, 0x18007c232\nmov     edi, eax                                                       ; +0x109, 0x18007c239\nmovzx   eax, word ptr [rbx+118h]                                       ; +0x10b, 0x18007c23b\ntest    ax, ax                                                         ; +0x112, 0x18007c242\njz      short loc_18007C24B                                            ; +0x115, 0x18007c245\nmov     ecx, eax                                                       ; +0x117, 0x18007c247\njmp     short loc_18007C258                                            ; +0x119, 0x18007c249\nmov     rax, [rbx+0A8h]                                                ; +0x11b, 0x18007c24b\nmov     ecx, [rax+6D4h]                                                ; +0x122, 0x18007c252\nmov     rax, [rsi+8]                                                   ; +0x128, 0x18007c258\ncmp     [rax], ecx                                                     ; +0x12c, 0x18007c25c\njz      short loc_18007C291                                            ; +0x12e, 0x18007c25e\nmov     edi, 6                                                         ; +0x130, 0x18007c260\njmp     short loc_18007C291                                            ; +0x135, 0x18007c265\nmov     eax, 6                                                         ; +0x137, 0x18007c267\njmp     short loc_18007C293                                            ; +0x13c, 0x18007c26c\nmov     rax, [r9+18h]                                                  ; +0x13e, 0x18007c26e\nlea     r8, [rsp+48h+arg_0]                                            ; +0x142, 0x18007c272\nmov     rdx, [rax]                                                     ; +0x147, 0x18007c277\nmov     rax, [r9+8]                                                    ; +0x14a, 0x18007c27a\nmov     r9d, ebp                                                       ; +0x14e, 0x18007c27e\nmov     ecx, [rax]                                                     ; +0x151, 0x18007c281\nmov     [rsp+48h+arg_0], ecx                                           ; +0x153, 0x18007c283\nmov     rcx, rbx                                                       ; +0x157, 0x18007c287\ncall    sub_18007C8F0                                                  ; +0x15a, 0x18007c28a\nmov     edi, eax                                                       ; +0x15f, 0x18007c28f\nmov     eax, edi                                                       ; +0x161, 0x18007c291\nmov     rbx, [rsp+48h+arg_8]                                           ; +0x163, 0x18007c293\nmov     rbp, [rsp+48h+arg_10]                                          ; +0x168, 0x18007c298\nadd     rsp, 30h                                                       ; +0x16d, 0x18007c29d\npop     r14                                                            ; +0x171, 0x18007c2a1\npop     rdi                                                            ; +0x173, 0x18007c2a3\npop     rsi                                                            ; +0x174, 0x18007c2a4\nretn                                                                   ; +0x175, 0x18007c2a5", "xrefs": ["<???> @ 0x1801ac290", "<???> @ 0x1801ae0c0", "<???> @ 0x1801f9ec4"], "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"}