{"type": "func", "start": 6443297184, "end": 6443297670, "name": "sub_1800CE9A0", "pseudocode": "// \n// sub_1800CE9A0 from 0x1800ce9a0 to 0x1800ceb86 (486 bytes)\n// \n// 3 xrefs:\n// > sub_1800CE980 @ 0x1800ce996\n// > sub_1800E4E00 @ 0x1800e57a7\n// > <???> @ 0x1801fe880\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_1800CE9A0(__int64 a1, __int64 a2, char a3, char a4)\n{\n  _DWORD *v4; // r11\n  _QWORD *v6; // r10\n  __int64 v7; // rax\n  __int64 result; // rax\n  _DWORD *v9; // rdi\n  __int64 v10; // rdx\n  __int64 v11; // rdx\n  __int64 v12; // rdx\n  int v13; // [rsp+28h] [rbp-10h]\n  __int64 v14; // [rsp+40h] [rbp+8h] BYREF\n\n  v4 = *(_DWORD **)(a1 + 32);\n  if ( v4 )\n  {\n    v6 = (_QWORD *)(a1 + 512);\n    if ( (_QWORD *)*v6 == v6 && *(_QWORD *)(a1 + 520) == a1 + 512 )\n      return 0;\n    --v4[119];\n    **(_QWORD **)(a1 + 520) = *(_QWORD *)(a1 + 512);\n    *(_QWORD *)(*(_QWORD *)(a1 + 512) + 8LL) = *(_QWORD *)(a1 + 520);\n    *(_QWORD *)(a1 + 520) = a1 + 512;\n    *v6 = v6;\n  }\n  *(_QWORD *)(a1 + 32) = a2;\n  *(_QWORD *)(a1 + 528) = a1;\n  if ( !a2 )\n    return 0;\n  v7 = *(_QWORD *)(a2 + 424);\n  *(_QWORD *)(a1 + 512) = v7;\n  *(_QWORD *)(a1 + 520) = a2 + 424;\n  *(_QWORD *)(v7 + 8) = a1 + 512;\n  **(_QWORD **)(a1 + 520) = a1 + 512;\n  ++*(_DWORD *)(*(_QWORD *)(a1 + 32) + 476LL);\n  if ( !*(_QWORD *)(a1 + 472) )\n    return 30;\n  if ( !a3 )\n    return 0;\n  v9 = *(_DWORD **)(a1 + 32);\n  if ( v4 == v9 && !a4\n    || (!v4\n     || (result = (*(__int64 (__fastcall **)(_DWORD *, __int64, __int64 *))(*(_QWORD *)v4 + 288LL))(\n                    v4,\n                    4294967293LL,\n                    &v14),\n         !(_DWORD)result)\n     && (!v14 || (result = sub_180096490(v14, *(_QWORD *)(a1 + 96), 0, 0), !(_DWORD)result)))\n    && (!v9\n     || (result = (*(__int64 (__fastcall **)(_DWORD *, __int64, __int64 *))(*(_QWORD *)v9 + 288LL))(\n                    v9,\n                    4294967293LL,\n                    &v14),\n         !(_DWORD)result)\n     && (!v14 || (result = sub_1800923A0(v14, *(_QWORD *)(a1 + 96), nullptr, 0, 0, nullptr), !(_DWORD)result))) )\n  {\n    v10 = *(_DWORD *)(a1 + 72) >> 1;\n    LOBYTE(v10) = (*(_DWORD *)(a1 + 72) & 2) != 0;\n    result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 88LL))(a1, v10);\n    if ( !(_DWORD)result )\n    {\n      result = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 16LL))(a1, *(_BYTE *)(a1 + 72) & 1);\n      if ( !(_DWORD)result )\n      {\n        (*(void (__fastcall **)(__int64, __int64, _QWORD))(*(_QWORD *)a1 + 32LL))(a1, v11, 0);\n        if ( (*(_BYTE *)(*(_QWORD *)(a1 + 472) + 56LL) & 0x10) == 0 )\n        {\n          LOBYTE(v13) = 0;\n          (*(void (__fastcall **)(__int64, _QWORD, _QWORD, _QWORD, _DWORD, int))(*(_QWORD *)a1 + 200LL))(\n            a1,\n            *(_QWORD *)(a1 + 64),\n            (unsigned int)*(__int16 *)(a1 + 58),\n            (unsigned int)*(__int16 *)(a1 + 56),\n            0,\n            v13);\n        }\n        sub_1800CEE10(a1, v12);\n        return 0;\n      }\n    }\n  }\n  return result;\n}", "assembly": "; \n; sub_1800CE9A0 from 0x1800ce9a0 to 0x1800ceb86 (486 bytes)\n; \n; 3 xrefs:\n; > sub_1800CE980 @ 0x1800ce996\n; > sub_1800E4E00 @ 0x1800e57a7\n; > <???> @ 0x1801fe880\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, 0x1800ce9a0\npush    rdi                                                            ; +0x5, 0x1800ce9a5\nsub     rsp, 30h                                                       ; +0x6, 0x1800ce9a6\nmov     r11, [rcx+20h]                                                 ; +0xa, 0x1800ce9aa\nmov     rbx, rcx                                                       ; +0xe, 0x1800ce9ae\ntest    r11, r11                                                       ; +0x11, 0x1800ce9b1\njz      short loc_1800CE9EF                                            ; +0x14, 0x1800ce9b4\nlea     r10, [rcx+200h]                                                ; +0x16, 0x1800ce9b6\ncmp     [r10], r10                                                     ; +0x1d, 0x1800ce9bd\njnz     short loc_1800CE9CC                                            ; +0x20, 0x1800ce9c0\ncmp     [r10+8], r10                                                   ; +0x22, 0x1800ce9c2\njz      loc_1800CEB79                                                  ; +0x26, 0x1800ce9c6\ndec     dword ptr [r11+1DCh]                                           ; +0x2c, 0x1800ce9cc\nmov     rcx, [r10+8]                                                   ; +0x33, 0x1800ce9d3\nmov     rax, [r10]                                                     ; +0x37, 0x1800ce9d7\nmov     [rcx], rax                                                     ; +0x3a, 0x1800ce9da\nmov     rcx, [r10]                                                     ; +0x3d, 0x1800ce9dd\nmov     rax, [r10+8]                                                   ; +0x40, 0x1800ce9e0\nmov     [rcx+8], rax                                                   ; +0x44, 0x1800ce9e4\nmov     [r10+8], r10                                                   ; +0x48, 0x1800ce9e8\nmov     [r10], r10                                                     ; +0x4c, 0x1800ce9ec\nmov     [rbx+20h], rdx                                                 ; +0x4f, 0x1800ce9ef\nmov     [rbx+210h], rbx                                                ; +0x53, 0x1800ce9f3\ntest    rdx, rdx                                                       ; +0x5a, 0x1800ce9fa\njz      loc_1800CEB79                                                  ; +0x5d, 0x1800ce9fd\nlea     rcx, [rdx+1A8h]                                                ; +0x63, 0x1800cea03\nmov     rax, [rcx]                                                     ; +0x6a, 0x1800cea0a\nlea     rdx, [rbx+200h]                                                ; +0x6d, 0x1800cea0d\nmov     [rdx], rax                                                     ; +0x74, 0x1800cea14\nmov     [rdx+8], rcx                                                   ; +0x77, 0x1800cea17\nmov     [rax+8], rdx                                                   ; +0x7b, 0x1800cea1b\nmov     rax, [rdx+8]                                                   ; +0x7f, 0x1800cea1f\nmov     [rax], rdx                                                     ; +0x83, 0x1800cea23\nmov     rax, [rbx+20h]                                                 ; +0x86, 0x1800cea26\ninc     dword ptr [rax+1DCh]                                           ; +0x8a, 0x1800cea2a\ncmp     qword ptr [rbx+1D8h], 0                                        ; +0x90, 0x1800cea30\njnz     short loc_1800CEA4A                                            ; +0x98, 0x1800cea38\nmov     eax, 1Eh                                                       ; +0x9a, 0x1800cea3a\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x9f, 0x1800cea3f\nadd     rsp, 30h                                                       ; +0xa4, 0x1800cea44\npop     rdi                                                            ; +0xa8, 0x1800cea48\nretn                                                                   ; +0xa9, 0x1800cea49\ntest    r8b, r8b                                                       ; +0xaa, 0x1800cea4a\njz      loc_1800CEB79                                                  ; +0xad, 0x1800cea4d\nmov     rdi, [rbx+20h]                                                 ; +0xb3, 0x1800cea53\ncmp     r11, rdi                                                       ; +0xb7, 0x1800cea57\njnz     short loc_1800CEA65                                            ; +0xba, 0x1800cea5a\ntest    r9b, r9b                                                       ; +0xbc, 0x1800cea5c\njz      loc_1800CEAFA                                                  ; +0xbf, 0x1800cea5f\ntest    r11, r11                                                       ; +0xc5, 0x1800cea65\njz      short loc_1800CEAA9                                            ; +0xc8, 0x1800cea68\nmov     rax, [r11]                                                     ; +0xca, 0x1800cea6a\nlea     r8, [rsp+38h+arg_0]                                            ; +0xcd, 0x1800cea6d\nmov     edx, 0FFFFFFFDh                                                ; +0xd2, 0x1800cea72\nmov     rcx, r11                                                       ; +0xd7, 0x1800cea77\ncall    qword ptr [rax+120h]                                           ; +0xda, 0x1800cea7a\ntest    eax, eax                                                       ; +0xe0, 0x1800cea80\njnz     loc_1800CEB7B                                                  ; +0xe2, 0x1800cea82\nmov     rcx, [rsp+38h+arg_0]                                           ; +0xe8, 0x1800cea88\ntest    rcx, rcx                                                       ; +0xed, 0x1800cea8d\njz      short loc_1800CEAA9                                            ; +0xf0, 0x1800cea90\nmov     rdx, [rbx+60h]                                                 ; +0xf2, 0x1800cea92\nxor     r9d, r9d                                                       ; +0xf6, 0x1800cea96\nxor     r8d, r8d                                                       ; +0xf9, 0x1800cea99\ncall    sub_180096490                                                  ; +0xfc, 0x1800cea9c\ntest    eax, eax                                                       ; +0x101, 0x1800ceaa1\njnz     loc_1800CEB7B                                                  ; +0x103, 0x1800ceaa3\ntest    rdi, rdi                                                       ; +0x109, 0x1800ceaa9\njz      short loc_1800CEAFA                                            ; +0x10c, 0x1800ceaac\nmov     rax, [rdi]                                                     ; +0x10e, 0x1800ceaae\nlea     r8, [rsp+38h+arg_0]                                            ; +0x111, 0x1800ceab1\nmov     edx, 0FFFFFFFDh                                                ; +0x116, 0x1800ceab6\nmov     rcx, rdi                                                       ; +0x11b, 0x1800ceabb\ncall    qword ptr [rax+120h]                                           ; +0x11e, 0x1800ceabe\ntest    eax, eax                                                       ; +0x124, 0x1800ceac4\njnz     loc_1800CEB7B                                                  ; +0x126, 0x1800ceac6\nmov     rcx, [rsp+38h+arg_0]                                           ; +0x12c, 0x1800ceacc\ntest    rcx, rcx                                                       ; +0x131, 0x1800cead1\njz      short loc_1800CEAFA                                            ; +0x134, 0x1800cead4\nmov     rdx, [rbx+60h]                                                 ; +0x136, 0x1800cead6\nxor     r9d, r9d                                                       ; +0x13a, 0x1800ceada\nmov     qword ptr [rsp+38h+var_10], 0                                  ; +0x13d, 0x1800ceadd\nxor     r8d, r8d                                                       ; +0x146, 0x1800ceae6\nmov     byte ptr [rsp+38h+var_18], al                                  ; +0x149, 0x1800ceae9\ncall    sub_1800923A0                                                  ; +0x14d, 0x1800ceaed\ntest    eax, eax                                                       ; +0x152, 0x1800ceaf2\njnz     loc_1800CEB7B                                                  ; +0x154, 0x1800ceaf4\nmov     edx, [rbx+48h]                                                 ; +0x15a, 0x1800ceafa\nmov     rcx, rbx                                                       ; +0x15d, 0x1800ceafd\nmov     r8, [rbx]                                                      ; +0x160, 0x1800ceb00\nshr     edx, 1                                                         ; +0x163, 0x1800ceb03\nand     dl, 1                                                          ; +0x165, 0x1800ceb05\ncall    qword ptr [r8+58h]                                             ; +0x168, 0x1800ceb08\ntest    eax, eax                                                       ; +0x16c, 0x1800ceb0c\njnz     short loc_1800CEB7B                                            ; +0x16e, 0x1800ceb0e\nmovzx   edx, byte ptr [rbx+48h]                                        ; +0x170, 0x1800ceb10\nmov     rcx, rbx                                                       ; +0x174, 0x1800ceb14\nmov     rax, [rbx]                                                     ; +0x177, 0x1800ceb17\nand     dl, 1                                                          ; +0x17a, 0x1800ceb1a\ncall    qword ptr [rax+10h]                                            ; +0x17d, 0x1800ceb1d\ntest    eax, eax                                                       ; +0x180, 0x1800ceb20\njnz     short loc_1800CEB7B                                            ; +0x182, 0x1800ceb22\nmov     rax, [rbx]                                                     ; +0x184, 0x1800ceb24\nxor     r8d, r8d                                                       ; +0x187, 0x1800ceb27\nmovss   xmm1, dword ptr [rbx+30h]                                      ; +0x18a, 0x1800ceb2a\nmov     rcx, rbx                                                       ; +0x18f, 0x1800ceb2f\ncall    qword ptr [rax+20h]                                            ; +0x192, 0x1800ceb32\nmov     rax, [rbx+1D8h]                                                ; +0x195, 0x1800ceb35\ntest    byte ptr [rax+38h], 10h                                        ; +0x19c, 0x1800ceb3c\njnz     short loc_1800CEB69                                            ; +0x1a0, 0x1800ceb40\nmov     rax, [rbx]                                                     ; +0x1a2, 0x1800ceb42\nmov     rcx, rbx                                                       ; +0x1a5, 0x1800ceb45\nmovsx   r9d, word ptr [rbx+38h]                                        ; +0x1a8, 0x1800ceb48\nmovsx   r8d, word ptr [rbx+3Ah]                                        ; +0x1ad, 0x1800ceb4d\nmov     rdx, [rbx+40h]                                                 ; +0x1b2, 0x1800ceb52\nmov     byte ptr [rsp+38h+var_10], 0                                   ; +0x1b6, 0x1800ceb56\nmov     [rsp+38h+var_18], 0                                            ; +0x1bb, 0x1800ceb5b\ncall    qword ptr [rax+0C8h]                                           ; +0x1c3, 0x1800ceb63\nmovss   xmm1, dword ptr [rbx+22Ch]                                     ; +0x1c9, 0x1800ceb69\nmov     rcx, rbx                                                       ; +0x1d1, 0x1800ceb71\ncall    sub_1800CEE10                                                  ; +0x1d4, 0x1800ceb74\nxor     eax, eax                                                       ; +0x1d9, 0x1800ceb79\nmov     rbx, [rsp+38h+arg_8]                                           ; +0x1db, 0x1800ceb7b\nadd     rsp, 30h                                                       ; +0x1e0, 0x1800ceb80\npop     rdi                                                            ; +0x1e4, 0x1800ceb84\nretn                                                                   ; +0x1e5, 0x1800ceb85", "xrefs": ["sub_1800CE980 @ 0x1800ce996", "sub_1800E4E00 @ 0x1800e57a7", "<???> @ 0x1801fe880"], "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"}