{"type": "func", "start": 6443125136, "end": 6443125637, "name": "sub_1800A4990", "pseudocode": "// \n// sub_1800A4990 from 0x1800a4990 to 0x1800a4b85 (501 bytes)\n// \n// 2 xrefs:\n// > sub_1800A6260 @ 0x1800a62c3\n// > <???> @ 0x1801fb6d0\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 10:53:53 +0000\n// \n\n__int64 __fastcall sub_1800A4990(__int64 *a1)\n{\n  __int64 v1; // rbx\n  int v3; // esi\n  LPVOID *v4; // rdi\n  __int64 v5; // rcx\n  __int64 result; // rax\n  __int64 v7; // rcx\n  _QWORD *v8; // rdi\n  __int64 v9; // rsi\n  _QWORD *v10; // rdi\n  __int64 v11; // rsi\n  __int64 v12; // rcx\n  __int64 v13; // rcx\n  void *v14; // rcx\n  void *v15; // rcx\n  __int64 v16; // rcx\n\n  v1 = *a1;\n  if ( !*a1 )\n    return 0;\n  if ( *(_QWORD *)(v1 + 712) )\n  {\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)(v1 + 704) + 56LL))(*(_QWORD *)(v1 + 704));\n    sub_1800B6AA0(\n      *((_QWORD *)off_1801AED20 + 52),\n      *(_QWORD *)(v1 + 712),\n      \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_output_winsonic.cpp\",\n      833,\n      1);\n    *(_QWORD *)(v1 + 712) = 0;\n  }\n  v3 = 0;\n  if ( *(int *)(v1 + 720) > 0 )\n  {\n    v4 = (LPVOID *)(v1 + 728);\n    do\n    {\n      CoTaskMemFree(*v4);\n      *v4++ = nullptr;\n      ++v3;\n    }\n    while ( v3 < *(_DWORD *)(v1 + 720) );\n  }\n  v5 = *(_QWORD *)(v1 + 704);\n  *(_DWORD *)(v1 + 720) = 0;\n  if ( v5 )\n  {\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 16LL))(v5);\n    *(_QWORD *)(v1 + 704) = 0;\n  }\n  result = sub_1800A48C0(a1);\n  if ( !(_DWORD)result )\n  {\n    if ( *(_QWORD *)v1 )\n    {\n      ((void (__fastcall *)(_QWORD, const char *, __int64))a1[3])(\n        *(_QWORD *)v1,\n        \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_output_winsonic.cpp\",\n        856);\n      *(_QWORD *)v1 = 0;\n    }\n    v7 = *(_QWORD *)(v1 + 8);\n    if ( v7 )\n    {\n      ((void (__fastcall *)(__int64, const char *, __int64))a1[3])(\n        v7,\n        \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_output_winsonic.cpp\",\n        862);\n      *(_QWORD *)(v1 + 8) = 0;\n    }\n    v8 = (_QWORD *)(v1 + 56);\n    v9 = 12;\n    do\n    {\n      if ( *v8 )\n      {\n        (*(void (__fastcall **)(_QWORD))(*(_QWORD *)*v8 + 16LL))(*v8);\n        *v8 = 0;\n      }\n      ++v8;\n      --v9;\n    }\n    while ( v9 );\n    v10 = (_QWORD *)(v1 + 152);\n    v11 = 2;\n    do\n    {\n      if ( *v10 )\n      {\n        (*(void (__fastcall **)(_QWORD))(*(_QWORD *)*v10 + 16LL))(*v10);\n        *v10 = 0;\n      }\n      ++v10;\n      --v11;\n    }\n    while ( v11 );\n    v12 = *(_QWORD *)(v1 + 48);\n    if ( v12 )\n    {\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)v12 + 16LL))(v12);\n      *(_QWORD *)(v1 + 48) = 0;\n    }\n    v13 = *(_QWORD *)(v1 + 40);\n    if ( v13 )\n    {\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)v13 + 16LL))(v13);\n      *(_QWORD *)(v1 + 40) = 0;\n    }\n    v14 = *(void **)(v1 + 24);\n    if ( v14 )\n    {\n      CloseHandle(v14);\n      *(_QWORD *)(v1 + 24) = 0;\n    }\n    v15 = *(void **)(v1 + 16);\n    if ( v15 )\n    {\n      CloseHandle(v15);\n      *(_QWORD *)(v1 + 16) = 0;\n    }\n    v16 = *(_QWORD *)(v1 + 32);\n    if ( v16 )\n    {\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)v16 + 16LL))(v16);\n      *(_QWORD *)(v1 + 32) = 0;\n    }\n    ((void (__fastcall *)(__int64, const char *, __int64))a1[3])(\n      *a1,\n      \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_output_winsonic.cpp\",\n      914);\n    *a1 = 0;\n    return 0;\n  }\n  return result;\n}", "assembly": "; \n; sub_1800A4990 from 0x1800a4990 to 0x1800a4b85 (501 bytes)\n; \n; 2 xrefs:\n; > sub_1800A6260 @ 0x1800a62c3\n; > <???> @ 0x1801fb6d0\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 10:53:53 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800a4990\nmov     [rsp+arg_8], rbp                                               ; +0x5, 0x1800a4995\nmov     [rsp+arg_10], rsi                                              ; +0xa, 0x1800a499a\nmov     [rsp+arg_18], rdi                                              ; +0xf, 0x1800a499f\npush    r14                                                            ; +0x14, 0x1800a49a4\nsub     rsp, 30h                                                       ; +0x16, 0x1800a49a6\nmov     rbx, [rcx]                                                     ; +0x1a, 0x1800a49aa\nmov     r14, rcx                                                       ; +0x1d, 0x1800a49ad\ntest    rbx, rbx                                                       ; +0x20, 0x1800a49b0\njz      loc_1800A4B68                                                  ; +0x23, 0x1800a49b3\nmov     rdx, [rbx+2C8h]                                                ; +0x29, 0x1800a49b9\nxor     ebp, ebp                                                       ; +0x30, 0x1800a49c0\ntest    rdx, rdx                                                       ; +0x32, 0x1800a49c2\njz      short loc_1800A4A07                                            ; +0x35, 0x1800a49c5\nmov     rcx, [rbx+2C0h]                                                ; +0x37, 0x1800a49c7\nmov     rax, [rcx]                                                     ; +0x3e, 0x1800a49ce\ncall    qword ptr [rax+38h]                                            ; +0x41, 0x1800a49d1\nmov     rcx, cs:off_1801AED20                                          ; +0x44, 0x1800a49d4\nlea     r8, aCBuildagent1Wo_30; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x4b, 0x1800a49db\nmov     rdx, [rbx+2C8h]                                                ; +0x52, 0x1800a49e2\nmov     r9d, 341h                                                      ; +0x59, 0x1800a49e9\nmov     [rsp+38h+var_18], 1                                            ; +0x5f, 0x1800a49ef\nmov     rcx, [rcx+1A0h]                                                ; +0x64, 0x1800a49f4\ncall    sub_1800B6AA0                                                  ; +0x6b, 0x1800a49fb\nmov     [rbx+2C8h], rbp                                                ; +0x70, 0x1800a4a00\nmov     esi, ebp                                                       ; +0x77, 0x1800a4a07\ncmp     [rbx+2D0h], ebp                                                ; +0x79, 0x1800a4a09\njle     short loc_1800A4A3A                                            ; +0x7f, 0x1800a4a0f\nlea     rdi, [rbx+2D8h]                                                ; +0x81, 0x1800a4a11\nnop     dword ptr [rax+rax+00000000h]                                  ; +0x88, 0x1800a4a18\nmov     rcx, [rdi]; pv                                                 ; +0x90, 0x1800a4a20\ncall    cs:CoTaskMemFree                                               ; +0x93, 0x1800a4a23\nmov     [rdi], rbp                                                     ; +0x99, 0x1800a4a29\nlea     rdi, [rdi+8]                                                   ; +0x9c, 0x1800a4a2c\ninc     esi                                                            ; +0xa0, 0x1800a4a30\ncmp     esi, [rbx+2D0h]                                                ; +0xa2, 0x1800a4a32\njl      short loc_1800A4A20                                            ; +0xa8, 0x1800a4a38\nmov     rcx, [rbx+2C0h]                                                ; +0xaa, 0x1800a4a3a\nmov     [rbx+2D0h], ebp                                                ; +0xb1, 0x1800a4a41\ntest    rcx, rcx                                                       ; +0xb7, 0x1800a4a47\njz      short loc_1800A4A59                                            ; +0xba, 0x1800a4a4a\nmov     rax, [rcx]                                                     ; +0xbc, 0x1800a4a4c\ncall    qword ptr [rax+10h]                                            ; +0xbf, 0x1800a4a4f\nmov     [rbx+2C0h], rbp                                                ; +0xc2, 0x1800a4a52\nmov     rcx, r14                                                       ; +0xc9, 0x1800a4a59\ncall    sub_1800A48C0                                                  ; +0xcc, 0x1800a4a5c\ntest    eax, eax                                                       ; +0xd1, 0x1800a4a61\njnz     loc_1800A4B6A                                                  ; +0xd3, 0x1800a4a63\nmov     rcx, [rbx]                                                     ; +0xd9, 0x1800a4a69\ntest    rcx, rcx                                                       ; +0xdc, 0x1800a4a6c\njz      short loc_1800A4A85                                            ; +0xdf, 0x1800a4a6f\nmov     r8d, 358h                                                      ; +0xe1, 0x1800a4a71\nlea     rdx, aCBuildagent1Wo_30; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0xe7, 0x1800a4a77\ncall    qword ptr [r14+18h]                                            ; +0xee, 0x1800a4a7e\nmov     [rbx], rbp                                                     ; +0xf2, 0x1800a4a82\nmov     rcx, [rbx+8]                                                   ; +0xf5, 0x1800a4a85\ntest    rcx, rcx                                                       ; +0xf9, 0x1800a4a89\njz      short loc_1800A4AA3                                            ; +0xfc, 0x1800a4a8c\nmov     r8d, 35Eh                                                      ; +0xfe, 0x1800a4a8e\nlea     rdx, aCBuildagent1Wo_30; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x104, 0x1800a4a94\ncall    qword ptr [r14+18h]                                            ; +0x10b, 0x1800a4a9b\nmov     [rbx+8], rbp                                                   ; +0x10f, 0x1800a4a9f\nlea     rdi, [rbx+38h]                                                 ; +0x113, 0x1800a4aa3\nmov     esi, 0Ch                                                       ; +0x117, 0x1800a4aa7\nnop     dword ptr [rax+00h]                                            ; +0x11c, 0x1800a4aac\nmov     rcx, [rdi]                                                     ; +0x120, 0x1800a4ab0\ntest    rcx, rcx                                                       ; +0x123, 0x1800a4ab3\njz      short loc_1800A4AC1                                            ; +0x126, 0x1800a4ab6\nmov     rax, [rcx]                                                     ; +0x128, 0x1800a4ab8\ncall    qword ptr [rax+10h]                                            ; +0x12b, 0x1800a4abb\nmov     [rdi], rbp                                                     ; +0x12e, 0x1800a4abe\nadd     rdi, 8                                                         ; +0x131, 0x1800a4ac1\nsub     rsi, 1                                                         ; +0x135, 0x1800a4ac5\njnz     short loc_1800A4AB0                                            ; +0x139, 0x1800a4ac9\nlea     rdi, [rbx+98h]                                                 ; +0x13b, 0x1800a4acb\nmov     esi, 2                                                         ; +0x142, 0x1800a4ad2\nmov     rcx, [rdi]                                                     ; +0x147, 0x1800a4ad7\ntest    rcx, rcx                                                       ; +0x14a, 0x1800a4ada\njz      short loc_1800A4AE8                                            ; +0x14d, 0x1800a4add\nmov     rax, [rcx]                                                     ; +0x14f, 0x1800a4adf\ncall    qword ptr [rax+10h]                                            ; +0x152, 0x1800a4ae2\nmov     [rdi], rbp                                                     ; +0x155, 0x1800a4ae5\nadd     rdi, 8                                                         ; +0x158, 0x1800a4ae8\nsub     rsi, 1                                                         ; +0x15c, 0x1800a4aec\njnz     short loc_1800A4AD7                                            ; +0x160, 0x1800a4af0\nmov     rcx, [rbx+30h]                                                 ; +0x162, 0x1800a4af2\ntest    rcx, rcx                                                       ; +0x166, 0x1800a4af6\njz      short loc_1800A4B05                                            ; +0x169, 0x1800a4af9\nmov     rax, [rcx]                                                     ; +0x16b, 0x1800a4afb\ncall    qword ptr [rax+10h]                                            ; +0x16e, 0x1800a4afe\nmov     [rbx+30h], rbp                                                 ; +0x171, 0x1800a4b01\nmov     rcx, [rbx+28h]                                                 ; +0x175, 0x1800a4b05\ntest    rcx, rcx                                                       ; +0x179, 0x1800a4b09\njz      short loc_1800A4B18                                            ; +0x17c, 0x1800a4b0c\nmov     rax, [rcx]                                                     ; +0x17e, 0x1800a4b0e\ncall    qword ptr [rax+10h]                                            ; +0x181, 0x1800a4b11\nmov     [rbx+28h], rbp                                                 ; +0x184, 0x1800a4b14\nmov     rcx, [rbx+18h]; hObject                                        ; +0x188, 0x1800a4b18\ntest    rcx, rcx                                                       ; +0x18c, 0x1800a4b1c\njz      short loc_1800A4B2B                                            ; +0x18f, 0x1800a4b1f\ncall    cs:CloseHandle                                                 ; +0x191, 0x1800a4b21\nmov     [rbx+18h], rbp                                                 ; +0x197, 0x1800a4b27\nmov     rcx, [rbx+10h]; hObject                                        ; +0x19b, 0x1800a4b2b\ntest    rcx, rcx                                                       ; +0x19f, 0x1800a4b2f\njz      short loc_1800A4B3E                                            ; +0x1a2, 0x1800a4b32\ncall    cs:CloseHandle                                                 ; +0x1a4, 0x1800a4b34\nmov     [rbx+10h], rbp                                                 ; +0x1aa, 0x1800a4b3a\nmov     rcx, [rbx+20h]                                                 ; +0x1ae, 0x1800a4b3e\ntest    rcx, rcx                                                       ; +0x1b2, 0x1800a4b42\njz      short loc_1800A4B51                                            ; +0x1b5, 0x1800a4b45\nmov     rax, [rcx]                                                     ; +0x1b7, 0x1800a4b47\ncall    qword ptr [rax+10h]                                            ; +0x1ba, 0x1800a4b4a\nmov     [rbx+20h], rbp                                                 ; +0x1bd, 0x1800a4b4d\nmov     rcx, [r14]                                                     ; +0x1c1, 0x1800a4b51\nlea     rdx, aCBuildagent1Wo_30; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x1c4, 0x1800a4b54\nmov     r8d, 392h                                                      ; +0x1cb, 0x1800a4b5b\ncall    qword ptr [r14+18h]                                            ; +0x1d1, 0x1800a4b61\nmov     [r14], rbp                                                     ; +0x1d5, 0x1800a4b65\nxor     eax, eax                                                       ; +0x1d8, 0x1800a4b68\nmov     rbx, [rsp+38h+arg_0]                                           ; +0x1da, 0x1800a4b6a\nmov     rbp, [rsp+38h+arg_8]                                           ; +0x1df, 0x1800a4b6f\nmov     rsi, [rsp+38h+arg_10]                                          ; +0x1e4, 0x1800a4b74\nmov     rdi, [rsp+38h+arg_18]                                          ; +0x1e9, 0x1800a4b79\nadd     rsp, 30h                                                       ; +0x1ee, 0x1800a4b7e\npop     r14                                                            ; +0x1f2, 0x1800a4b82\nretn                                                                   ; +0x1f4, 0x1800a4b84", "xrefs": ["sub_1800A6260 @ 0x1800a62c3", "<???> @ 0x1801fb6d0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}