{"type": "func", "start": 6443129344, "end": 6443129820, "name": "sub_1800A5A00", "pseudocode": "// \n// sub_1800A5A00 from 0x1800a5a00 to 0x1800a5bdc (476 bytes)\n// \n// 4 xrefs:\n// > sub_1800A5E20 @ 0x1800a5e7c\n// > <???> @ 0x180186b04\n// > <???> @ 0x180186b14\n// > <???> @ 0x1801fb790\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_1800A5A00(__int64 *a1)\n{\n  __int64 v1; // rbx\n  int v2; // esi\n  LPVOID *v3; // rdi\n  int v4; // eax\n  __int64 v5; // rdx\n  unsigned int v6; // edi\n  __int64 v7; // rdx\n  unsigned int v9; // [rsp+50h] [rbp+8h] BYREF\n  __int64 v10; // [rsp+58h] [rbp+10h] BYREF\n  LPVOID pv; // [rsp+60h] [rbp+18h] BYREF\n  __int64 v12; // [rsp+68h] [rbp+20h] BYREF\n\n  v1 = *a1;\n  v2 = 0;\n  if ( *(int *)(*a1 + 720) > 0 )\n  {\n    v3 = (LPVOID *)(v1 + 728);\n    do\n    {\n      CoTaskMemFree(*v3);\n      ++v2;\n      ++v3;\n    }\n    while ( v2 < *(_DWORD *)(v1 + 720) );\n  }\n  *(_DWORD *)(v1 + 720) = 0;\n  v10 = 0;\n  v4 = (*(__int64 (__fastcall **)(_QWORD, __int64, _QWORD, __int64 *))(**(_QWORD **)(v1 + 704) + 32LL))(\n         *(_QWORD *)(v1 + 704),\n         1,\n         0,\n         &v10);\n  if ( v4 != -2147023728 )\n  {\n    if ( v4 < 0 )\n      return 57;\n    v5 = *(int *)(v1 + 720);\n    *(_DWORD *)(v1 + 720) = v5 + 1;\n    if ( (*(int (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 40LL))(v10, v1 + 728 + 8 * v5) < 0 )\n      return 57;\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 16LL))(v10);\n  }\n  v12 = 0;\n  if ( (*(int (__fastcall **)(_QWORD, __int64, __int64, __int64 *))(**(_QWORD **)(v1 + 704) + 24LL))(\n         *(_QWORD *)(v1 + 704),\n         2,\n         1,\n         &v12) < 0 )\n    return 57;\n  v9 = 0;\n  if ( (*(int (__fastcall **)(__int64, unsigned int *))(*(_QWORD *)v12 + 24LL))(v12, &v9) < 0 )\n    return 57;\n  v6 = 0;\n  if ( v9 )\n  {\n    while ( *(int *)(v1 + 720) < 32 )\n    {\n      if ( (*(int (__fastcall **)(__int64, _QWORD, __int64 *))(*(_QWORD *)v12 + 32LL))(v12, v6, &v10) < 0 )\n        return 49;\n      pv = nullptr;\n      if ( (*(int (__fastcall **)(__int64, LPVOID *))(*(_QWORD *)v10 + 40LL))(v10, &pv) < 0 )\n        return 57;\n      if ( *(int *)(v1 + 720) >= 32 || (v7 = *(_QWORD *)(v1 + 728)) != 0 && !(unsigned int)sub_1800B82D0(pv, v7) )\n        CoTaskMemFree(pv);\n      else\n        *(_QWORD *)(v1 + 8LL * (int)(*(_DWORD *)(v1 + 720))++ + 728) = pv;\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)v10 + 16LL))(v10);\n      if ( ++v6 >= v9 )\n        break;\n    }\n  }\n  CoTaskMemFree(nullptr);\n  (*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 16LL))(v12);\n  return 0;\n}", "assembly": "; \n; sub_1800A5A00 from 0x1800a5a00 to 0x1800a5bdc (476 bytes)\n; \n; 4 xrefs:\n; > sub_1800A5E20 @ 0x1800a5e7c\n; > <???> @ 0x180186b04\n; > <???> @ 0x180186b14\n; > <???> @ 0x1801fb790\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    rbx                                                            ; +0x0, 0x1800a5a00\npush    rbp                                                            ; +0x2, 0x1800a5a02\npush    rdi                                                            ; +0x3, 0x1800a5a03\nsub     rsp, 30h                                                       ; +0x4, 0x1800a5a04\nmov     rbx, [rcx]                                                     ; +0x8, 0x1800a5a08\nxor     ebp, ebp                                                       ; +0xb, 0x1800a5a0b\nmov     [rsp+48h+var_20], rsi                                          ; +0xd, 0x1800a5a0d\nmov     esi, ebp                                                       ; +0x12, 0x1800a5a12\ncmp     [rbx+2D0h], ebp                                                ; +0x14, 0x1800a5a14\njle     short loc_1800A5A3A                                            ; +0x1a, 0x1800a5a1a\nlea     rdi, [rbx+2D8h]                                                ; +0x1c, 0x1800a5a1c\nmov     rcx, [rdi]; pv                                                 ; +0x23, 0x1800a5a23\ncall    cs:CoTaskMemFree                                               ; +0x26, 0x1800a5a26\ninc     esi                                                            ; +0x2c, 0x1800a5a2c\nlea     rdi, [rdi+8]                                                   ; +0x2e, 0x1800a5a2e\ncmp     esi, [rbx+2D0h]                                                ; +0x32, 0x1800a5a32\njl      short loc_1800A5A23                                            ; +0x38, 0x1800a5a38\nmov     [rbx+2D0h], ebp                                                ; +0x3a, 0x1800a5a3a\nlea     r9, [rsp+48h+arg_8]                                            ; +0x40, 0x1800a5a40\nmov     [rsp+48h+arg_8], rbp                                           ; +0x45, 0x1800a5a45\nxor     r8d, r8d                                                       ; +0x4a, 0x1800a5a4a\nmov     rcx, [rbx+2C0h]                                                ; +0x4d, 0x1800a5a4d\nlea     edx, [r8+1]                                                    ; +0x54, 0x1800a5a54\nmov     rax, [rcx]                                                     ; +0x58, 0x1800a5a58\ncall    qword ptr [rax+20h]                                            ; +0x5b, 0x1800a5a5b\nmov     rsi, [rsp+48h+var_20]                                          ; +0x5e, 0x1800a5a5e\ncmp     eax, 80070490h                                                 ; +0x63, 0x1800a5a63\njz      short loc_1800A5AAC                                            ; +0x68, 0x1800a5a68\ntest    eax, eax                                                       ; +0x6a, 0x1800a5a6a\njs      loc_1800A5BCF                                                  ; +0x6c, 0x1800a5a6c\nmovsxd  rdx, dword ptr [rbx+2D0h]                                      ; +0x72, 0x1800a5a72\nlea     eax, [rdx+1]                                                   ; +0x79, 0x1800a5a79\nmov     [rbx+2D0h], eax                                                ; +0x7c, 0x1800a5a7c\nlea     rax, [rbx+2D8h]                                                ; +0x82, 0x1800a5a82\nmov     rcx, [rsp+48h+arg_8]                                           ; +0x89, 0x1800a5a89\nlea     rdx, [rax+rdx*8]                                               ; +0x8e, 0x1800a5a8e\nmov     r8, [rcx]                                                      ; +0x92, 0x1800a5a92\ncall    qword ptr [r8+28h]                                             ; +0x95, 0x1800a5a95\ntest    eax, eax                                                       ; +0x99, 0x1800a5a99\njs      loc_1800A5BCF                                                  ; +0x9b, 0x1800a5a9b\nmov     rcx, [rsp+48h+arg_8]                                           ; +0xa1, 0x1800a5aa1\nmov     rax, [rcx]                                                     ; +0xa6, 0x1800a5aa6\ncall    qword ptr [rax+10h]                                            ; +0xa9, 0x1800a5aa9\nmov     [rsp+48h+arg_18], rbp                                          ; +0xac, 0x1800a5aac\nlea     r9, [rsp+48h+arg_18]                                           ; +0xb1, 0x1800a5ab1\nmov     rcx, [rbx+2C0h]                                                ; +0xb6, 0x1800a5ab6\nmov     edx, 2                                                         ; +0xbd, 0x1800a5abd\nmov     rax, [rcx]                                                     ; +0xc2, 0x1800a5ac2\nlea     r8d, [rdx-1]                                                   ; +0xc5, 0x1800a5ac5\ncall    qword ptr [rax+18h]                                            ; +0xc9, 0x1800a5ac9\ntest    eax, eax                                                       ; +0xcc, 0x1800a5acc\njs      loc_1800A5BCF                                                  ; +0xce, 0x1800a5ace\nmov     rcx, [rsp+48h+arg_18]                                          ; +0xd4, 0x1800a5ad4\nlea     rdx, [rsp+48h+arg_0]                                           ; +0xd9, 0x1800a5ad9\nmov     [rsp+48h+arg_0], ebp                                           ; +0xde, 0x1800a5ade\nmov     rax, [rcx]                                                     ; +0xe2, 0x1800a5ae2\ncall    qword ptr [rax+18h]                                            ; +0xe5, 0x1800a5ae5\ntest    eax, eax                                                       ; +0xe8, 0x1800a5ae8\njs      loc_1800A5BCF                                                  ; +0xea, 0x1800a5aea\nmov     edi, ebp                                                       ; +0xf0, 0x1800a5af0\ncmp     [rsp+48h+arg_0], ebp                                           ; +0xf2, 0x1800a5af2\njbe     loc_1800A5BA5                                                  ; +0xf6, 0x1800a5af6\nnop     dword ptr [rax+00h]                                            ; +0xfc, 0x1800a5afc\ncmp     dword ptr [rbx+2D0h], 20h ; ' '                                ; +0x100, 0x1800a5b00\njge     loc_1800A5BA5                                                  ; +0x107, 0x1800a5b07\nmov     rcx, [rsp+48h+arg_18]                                          ; +0x10d, 0x1800a5b0d\nlea     r8, [rsp+48h+arg_8]                                            ; +0x112, 0x1800a5b12\nmov     edx, edi                                                       ; +0x117, 0x1800a5b17\nmov     rax, [rcx]                                                     ; +0x119, 0x1800a5b19\ncall    qword ptr [rax+20h]                                            ; +0x11c, 0x1800a5b1c\ntest    eax, eax                                                       ; +0x11f, 0x1800a5b1f\njs      loc_1800A5BC2                                                  ; +0x121, 0x1800a5b21\nmov     rcx, [rsp+48h+arg_8]                                           ; +0x127, 0x1800a5b27\nlea     rdx, [rsp+48h+pv]                                              ; +0x12c, 0x1800a5b2c\nmov     [rsp+48h+pv], rbp                                              ; +0x131, 0x1800a5b31\nmov     rax, [rcx]                                                     ; +0x136, 0x1800a5b36\ncall    qword ptr [rax+28h]                                            ; +0x139, 0x1800a5b39\ntest    eax, eax                                                       ; +0x13c, 0x1800a5b3c\njs      loc_1800A5BCF                                                  ; +0x13e, 0x1800a5b3e\ncmp     dword ptr [rbx+2D0h], 20h ; ' '                                ; +0x144, 0x1800a5b44\njge     short loc_1800A5B83                                            ; +0x14b, 0x1800a5b4b\nmov     rdx, [rbx+2D8h]                                                ; +0x14d, 0x1800a5b4d\ntest    rdx, rdx                                                       ; +0x154, 0x1800a5b54\njz      short loc_1800A5B67                                            ; +0x157, 0x1800a5b57\nmov     rcx, [rsp+48h+pv]                                              ; +0x159, 0x1800a5b59\ncall    sub_1800B82D0                                                  ; +0x15e, 0x1800a5b5e\ntest    eax, eax                                                       ; +0x163, 0x1800a5b63\njz      short loc_1800A5B83                                            ; +0x165, 0x1800a5b65\nmovsxd  rcx, dword ptr [rbx+2D0h]                                      ; +0x167, 0x1800a5b67\nmov     rax, [rsp+48h+pv]                                              ; +0x16e, 0x1800a5b6e\nmov     [rbx+rcx*8+2D8h], rax                                          ; +0x173, 0x1800a5b73\ninc     dword ptr [rbx+2D0h]                                           ; +0x17b, 0x1800a5b7b\njmp     short loc_1800A5B8E                                            ; +0x181, 0x1800a5b81\nmov     rcx, [rsp+48h+pv]; pv                                          ; +0x183, 0x1800a5b83\ncall    cs:CoTaskMemFree                                               ; +0x188, 0x1800a5b88\nmov     rcx, [rsp+48h+arg_8]                                           ; +0x18e, 0x1800a5b8e\nmov     rax, [rcx]                                                     ; +0x193, 0x1800a5b93\ncall    qword ptr [rax+10h]                                            ; +0x196, 0x1800a5b96\ninc     edi                                                            ; +0x199, 0x1800a5b99\ncmp     edi, [rsp+48h+arg_0]                                           ; +0x19b, 0x1800a5b9b\njb      loc_1800A5B00                                                  ; +0x19f, 0x1800a5b9f\nxor     ecx, ecx; pv                                                   ; +0x1a5, 0x1800a5ba5\ncall    cs:CoTaskMemFree                                               ; +0x1a7, 0x1800a5ba7\nmov     rcx, [rsp+48h+arg_18]                                          ; +0x1ad, 0x1800a5bad\nmov     rax, [rcx]                                                     ; +0x1b2, 0x1800a5bb2\ncall    qword ptr [rax+10h]                                            ; +0x1b5, 0x1800a5bb5\nxor     eax, eax                                                       ; +0x1b8, 0x1800a5bb8\nadd     rsp, 30h                                                       ; +0x1ba, 0x1800a5bba\npop     rdi                                                            ; +0x1be, 0x1800a5bbe\npop     rbp                                                            ; +0x1bf, 0x1800a5bbf\npop     rbx                                                            ; +0x1c0, 0x1800a5bc0\nretn                                                                   ; +0x1c1, 0x1800a5bc1\nmov     eax, 31h ; '1'                                                 ; +0x1c2, 0x1800a5bc2\nadd     rsp, 30h                                                       ; +0x1c7, 0x1800a5bc7\npop     rdi                                                            ; +0x1cb, 0x1800a5bcb\npop     rbp                                                            ; +0x1cc, 0x1800a5bcc\npop     rbx                                                            ; +0x1cd, 0x1800a5bcd\nretn                                                                   ; +0x1ce, 0x1800a5bce\nmov     eax, 39h ; '9'                                                 ; +0x1cf, 0x1800a5bcf\nadd     rsp, 30h                                                       ; +0x1d4, 0x1800a5bd4\npop     rdi                                                            ; +0x1d8, 0x1800a5bd8\npop     rbp                                                            ; +0x1d9, 0x1800a5bd9\npop     rbx                                                            ; +0x1da, 0x1800a5bda\nretn                                                                   ; +0x1db, 0x1800a5bdb", "xrefs": ["sub_1800A5E20 @ 0x1800a5e7c", "<???> @ 0x180186b04", "<???> @ 0x180186b14", "<???> @ 0x1801fb790"], "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"}