{"type": "func", "start": 6443255904, "end": 6443256388, "name": "sub_1800C4860", "pseudocode": "// \n// sub_1800C4860 from 0x1800c4860 to 0x1800c4a44 (484 bytes)\n// \n// 2 xrefs:\n// > sub_1800C4A50 @ 0x1800c4a61\n// > <???> @ 0x1801fde84\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:54:04 +0000\n// \n\n__int64 __fastcall sub_1800C4860(__int64 a1, int *a2)\n{\n  unsigned int v3; // ebx\n  _QWORD *v5; // rdi\n  unsigned __int16 *v6; // rcx\n  __int64 v7; // rax\n  __int64 v8; // r8\n  int v9; // eax\n  LPVOID pv[2]; // [rsp+40h] [rbp-38h] BYREF\n  _QWORD v12[5]; // [rsp+50h] [rbp-28h] BYREF\n  int v13; // [rsp+90h] [rbp+18h] BYREF\n  int v14; // [rsp+98h] [rbp+20h] BYREF\n\n  v3 = 0;\n  v12[0] = 0;\n  *(_OWORD *)pv = 0;\n  v5 = sub_1800B6880(\n         *((_QWORD *)off_1801AED20 + 52),\n         24,\n         \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\platforms\\\\win\\\\src\\\\fmod_output_wasapi.cpp\",\n         830,\n         0);\n  if ( v5 )\n  {\n    v7 = *a2;\n    *((_QWORD *)a2 + 5) = v5;\n    if ( (*(int (__fastcall **)(_QWORD, _QWORD, _QWORD *))(**(_QWORD **)(a1 + 1824) + 40LL))(\n           *(_QWORD *)(a1 + 1824),\n           *(_QWORD *)(a1 + 24 * (v7 + 79)),\n           v12) < 0\n      || (*(int (__fastcall **)(_QWORD, void *, __int64))(*(_QWORD *)v12[0] + 24LL))(v12[0], &unk_18016A080, 23) < 0\n      || (**(int (__fastcall ***)(_QWORD, void *, LPVOID *))v12[0])(v12[0], &unk_18016A0C8, &pv[1]) < 0\n      || (*(int (__fastcall **)(LPVOID, int *))(*(_QWORD *)pv[1] + 24LL))(pv[1], &v13) < 0\n      || (*(int (__fastcall **)(_QWORD, LPVOID *))(*(_QWORD *)*v5 + 64LL))(*v5, pv) < 0 )\n    {\n      goto LABEL_14;\n    }\n    v8 = 0;\n    if ( !v13 )\n      v8 = 0x20000;\n    if ( (*(int (__fastcall **)(_QWORD, _QWORD, __int64, __int64, _QWORD, LPVOID, _QWORD))(*(_QWORD *)*v5 + 24LL))(\n           *v5,\n           0,\n           v8,\n           800000,\n           0,\n           pv[0],\n           0) >= 0\n      && (*(int (__fastcall **)(_QWORD, void *, _QWORD *))(*(_QWORD *)*v5 + 112LL))(*v5, &unk_18016A0A0, v5 + 1) >= 0\n      && (*(int (__fastcall **)(_QWORD))(*(_QWORD *)*v5 + 80LL))(*v5) >= 0\n      && (*(int (__fastcall **)(_QWORD, int *))(*(_QWORD *)*v5 + 32LL))(*v5, &v14) >= 0 )\n    {\n      v6 = (unsigned __int16 *)pv[0];\n      a2[7] = *((_DWORD *)pv[0] + 1);\n      a2[8] = v6[1];\n      v9 = 2 * v14;\n      a2[6] = 5;\n      a2[9] = v9;\n    }\n    else\n    {\nLABEL_14:\n      v6 = (unsigned __int16 *)pv[0];\n      v3 = 57;\n    }\n  }\n  else\n  {\n    v6 = (unsigned __int16 *)pv[0];\n    v3 = 38;\n  }\n  if ( v6 )\n    CoTaskMemFree(v6);\n  if ( pv[1] )\n    (*(void (__fastcall **)(LPVOID))(*(_QWORD *)pv[1] + 16LL))(pv[1]);\n  if ( v12[0] )\n    (*(void (__fastcall **)(_QWORD))(*(_QWORD *)v12[0] + 16LL))(v12[0]);\n  return v3;\n}", "assembly": "; \n; sub_1800C4860 from 0x1800c4860 to 0x1800c4a44 (484 bytes)\n; \n; 2 xrefs:\n; > sub_1800C4A50 @ 0x1800c4a61\n; > <???> @ 0x1801fde84\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:54:04 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800c4860\npush    rsi                                                            ; +0x5, 0x1800c4865\npush    rdi                                                            ; +0x6, 0x1800c4866\npush    r14                                                            ; +0x7, 0x1800c4867\nsub     rsp, 60h                                                       ; +0x9, 0x1800c4869\nmov     r14, rcx                                                       ; +0xd, 0x1800c486d\nlea     r8, aCBuildagent1Wo_48; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x10, 0x1800c4870\nmov     rcx, cs:off_1801AED20                                          ; +0x17, 0x1800c4877\nxor     ebx, ebx                                                       ; +0x1e, 0x1800c487e\nxorps   xmm0, xmm0                                                     ; +0x20, 0x1800c4880\nmov     [rsp+78h+var_28], rbx                                          ; +0x23, 0x1800c4883\nmov     rsi, rdx                                                       ; +0x28, 0x1800c4888\nmov     dword ptr [rsp+78h+var_58], ebx                                ; +0x2b, 0x1800c488b\nmovdqu  xmmword ptr [rsp+78h+pv], xmm0                                 ; +0x2f, 0x1800c488f\nmov     rcx, [rcx+1A0h]                                                ; +0x35, 0x1800c4895\nlea     edx, [rbx+18h]                                                 ; +0x3c, 0x1800c489c\nmov     r9d, 33Eh                                                      ; +0x3f, 0x1800c489f\ncall    sub_1800B6880                                                  ; +0x45, 0x1800c48a5\nmov     rdi, rax                                                       ; +0x4a, 0x1800c48aa\ntest    rax, rax                                                       ; +0x4d, 0x1800c48ad\njnz     short loc_1800C48BF                                            ; +0x50, 0x1800c48b0\nmov     rcx, [rsp+78h+pv]                                              ; +0x52, 0x1800c48b2\nlea     ebx, [rax+26h]                                                 ; +0x57, 0x1800c48b7\njmp     loc_1800C4A06                                                  ; +0x5a, 0x1800c48ba\nmovsxd  rax, dword ptr [rsi]                                           ; +0x5f, 0x1800c48bf\nlea     r8, [rsp+78h+var_28]                                           ; +0x62, 0x1800c48c2\nmov     [rsi+28h], rdi                                                 ; +0x67, 0x1800c48c7\nadd     rax, 4Fh ; 'O'                                                 ; +0x6b, 0x1800c48cb\nmov     rcx, [r14+720h]                                                ; +0x6f, 0x1800c48cf\nlea     rdx, [rax+rax*2]                                               ; +0x76, 0x1800c48d6\nmov     r9, [rcx]                                                      ; +0x7a, 0x1800c48da\nmov     rdx, [r14+rdx*8]                                               ; +0x7d, 0x1800c48dd\ncall    qword ptr [r9+28h]                                             ; +0x81, 0x1800c48e1\ntest    eax, eax                                                       ; +0x85, 0x1800c48e5\njs      loc_1800C49D5                                                  ; +0x87, 0x1800c48e7\nmov     rcx, [rsp+78h+var_28]                                          ; +0x8d, 0x1800c48ed\nlea     rdx, unk_18016A080                                             ; +0x92, 0x1800c48f2\nxor     r9d, r9d                                                       ; +0x99, 0x1800c48f9\nmov     [rsp+78h+var_58], rdi                                          ; +0x9c, 0x1800c48fc\nmov     rax, [rcx]                                                     ; +0xa1, 0x1800c4901\nlea     r8d, [r9+17h]                                                  ; +0xa4, 0x1800c4904\ncall    qword ptr [rax+18h]                                            ; +0xa8, 0x1800c4908\ntest    eax, eax                                                       ; +0xab, 0x1800c490b\njs      loc_1800C49D5                                                  ; +0xad, 0x1800c490d\nmov     rcx, [rsp+78h+var_28]                                          ; +0xb3, 0x1800c4913\nlea     r8, [rsp+78h+pv+8]                                             ; +0xb8, 0x1800c4918\nlea     rdx, unk_18016A0C8                                             ; +0xbd, 0x1800c491d\nmov     rax, [rcx]                                                     ; +0xc4, 0x1800c4924\ncall    qword ptr [rax]                                                ; +0xc7, 0x1800c4927\ntest    eax, eax                                                       ; +0xc9, 0x1800c4929\njs      loc_1800C49D5                                                  ; +0xcb, 0x1800c492b\nmov     rcx, [rsp+78h+pv+8]                                            ; +0xd1, 0x1800c4931\nlea     rdx, [rsp+78h+arg_10]                                          ; +0xd6, 0x1800c4936\nmov     rax, [rcx]                                                     ; +0xde, 0x1800c493e\ncall    qword ptr [rax+18h]                                            ; +0xe1, 0x1800c4941\ntest    eax, eax                                                       ; +0xe4, 0x1800c4944\njs      loc_1800C49D5                                                  ; +0xe6, 0x1800c4946\nmov     rcx, [rdi]                                                     ; +0xec, 0x1800c494c\nlea     rdx, [rsp+78h+pv]                                              ; +0xef, 0x1800c494f\nmov     rax, [rcx]                                                     ; +0xf4, 0x1800c4954\ncall    qword ptr [rax+40h]                                            ; +0xf7, 0x1800c4957\ntest    eax, eax                                                       ; +0xfa, 0x1800c495a\njs      short loc_1800C49D5                                            ; +0xfc, 0x1800c495c\nmov     rcx, [rdi]                                                     ; +0xfe, 0x1800c495e\nmov     r8d, ebx                                                       ; +0x101, 0x1800c4961\ncmp     [rsp+78h+arg_10], ebx                                          ; +0x104, 0x1800c4964\nmov     eax, 20000h                                                    ; +0x10b, 0x1800c496b\nmov     [rsp+78h+var_48], rbx                                          ; +0x110, 0x1800c4970\nmov     r9d, 0C3500h                                                   ; +0x115, 0x1800c4975\ncmovz   r8d, eax                                                       ; +0x11b, 0x1800c497b\nmov     rax, [rsp+78h+pv]                                              ; +0x11f, 0x1800c497f\nmov     r10, [rcx]                                                     ; +0x124, 0x1800c4984\nxor     edx, edx                                                       ; +0x127, 0x1800c4987\nmov     [rsp+78h+var_50], rax                                          ; +0x129, 0x1800c4989\nmov     [rsp+78h+var_58], rbx                                          ; +0x12e, 0x1800c498e\ncall    qword ptr [r10+18h]                                            ; +0x133, 0x1800c4993\ntest    eax, eax                                                       ; +0x137, 0x1800c4997\njs      short loc_1800C49D5                                            ; +0x139, 0x1800c4999\nmov     rcx, [rdi]                                                     ; +0x13b, 0x1800c499b\nlea     r8, [rdi+8]                                                    ; +0x13e, 0x1800c499e\nlea     rdx, unk_18016A0A0                                             ; +0x142, 0x1800c49a2\nmov     rax, [rcx]                                                     ; +0x149, 0x1800c49a9\ncall    qword ptr [rax+70h]                                            ; +0x14c, 0x1800c49ac\ntest    eax, eax                                                       ; +0x14f, 0x1800c49af\njs      short loc_1800C49D5                                            ; +0x151, 0x1800c49b1\nmov     rcx, [rdi]                                                     ; +0x153, 0x1800c49b3\nmov     rax, [rcx]                                                     ; +0x156, 0x1800c49b6\ncall    qword ptr [rax+50h]                                            ; +0x159, 0x1800c49b9\ntest    eax, eax                                                       ; +0x15c, 0x1800c49bc\njs      short loc_1800C49D5                                            ; +0x15e, 0x1800c49be\nmov     rcx, [rdi]                                                     ; +0x160, 0x1800c49c0\nlea     rdx, [rsp+78h+arg_18]                                          ; +0x163, 0x1800c49c3\nmov     rax, [rcx]                                                     ; +0x16b, 0x1800c49cb\ncall    qword ptr [rax+20h]                                            ; +0x16e, 0x1800c49ce\ntest    eax, eax                                                       ; +0x171, 0x1800c49d1\njns     short loc_1800C49E1                                            ; +0x173, 0x1800c49d3\nmov     rcx, [rsp+78h+pv]                                              ; +0x175, 0x1800c49d5\nmov     ebx, 39h ; '9'                                                 ; +0x17a, 0x1800c49da\njmp     short loc_1800C4A06                                            ; +0x17f, 0x1800c49df\nmov     rcx, [rsp+78h+pv]; pv                                          ; +0x181, 0x1800c49e1\nmov     eax, [rcx+4]                                                   ; +0x186, 0x1800c49e6\nmov     [rsi+1Ch], eax                                                 ; +0x189, 0x1800c49e9\nmovzx   eax, word ptr [rcx+2]                                          ; +0x18c, 0x1800c49ec\nmov     [rsi+20h], eax                                                 ; +0x190, 0x1800c49f0\nmov     eax, [rsp+78h+arg_18]                                          ; +0x193, 0x1800c49f3\nadd     eax, eax                                                       ; +0x19a, 0x1800c49fa\nmov     dword ptr [rsi+18h], 5                                         ; +0x19c, 0x1800c49fc\nmov     [rsi+24h], eax                                                 ; +0x1a3, 0x1800c4a03\ntest    rcx, rcx                                                       ; +0x1a6, 0x1800c4a06\njz      short loc_1800C4A11                                            ; +0x1a9, 0x1800c4a09\ncall    cs:CoTaskMemFree                                               ; +0x1ab, 0x1800c4a0b\nmov     rcx, [rsp+78h+pv+8]                                            ; +0x1b1, 0x1800c4a11\ntest    rcx, rcx                                                       ; +0x1b6, 0x1800c4a16\njz      short loc_1800C4A21                                            ; +0x1b9, 0x1800c4a19\nmov     rdx, [rcx]                                                     ; +0x1bb, 0x1800c4a1b\ncall    qword ptr [rdx+10h]                                            ; +0x1be, 0x1800c4a1e\nmov     rcx, [rsp+78h+var_28]                                          ; +0x1c1, 0x1800c4a21\ntest    rcx, rcx                                                       ; +0x1c6, 0x1800c4a26\njz      short loc_1800C4A31                                            ; +0x1c9, 0x1800c4a29\nmov     rdx, [rcx]                                                     ; +0x1cb, 0x1800c4a2b\ncall    qword ptr [rdx+10h]                                            ; +0x1ce, 0x1800c4a2e\nmov     eax, ebx                                                       ; +0x1d1, 0x1800c4a31\nmov     rbx, [rsp+78h+arg_0]                                           ; +0x1d3, 0x1800c4a33\nadd     rsp, 60h                                                       ; +0x1db, 0x1800c4a3b\npop     r14                                                            ; +0x1df, 0x1800c4a3f\npop     rdi                                                            ; +0x1e1, 0x1800c4a41\npop     rsi                                                            ; +0x1e2, 0x1800c4a42\nretn                                                                   ; +0x1e3, 0x1800c4a43", "xrefs": ["sub_1800C4A50 @ 0x1800c4a61", "<???> @ 0x1801fde84"], "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"}