{"type": "func", "start": 6443256624, "end": 6443257351, "name": "sub_1800C4B30", "pseudocode": "// \n// sub_1800C4B30 from 0x1800c4b30 to 0x1800c4e07 (727 bytes)\n// \n// 9 xrefs:\n// > sub_1800C36A0 @ 0x1800c3803\n// > sub_1800C36A0 @ 0x1800c38eb\n// > sub_1800C43E0 @ 0x1800c44ae\n// > sub_1800C43E0 @ 0x1800c45bf\n// > <???> @ 0x18018aa7c\n// > <???> @ 0x18018aa8c\n// > <???> @ 0x18018aaa8\n// > <???> @ 0x18018aadc\n// > <???> @ 0x1801fdea8\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_1800C4B30(__int64 a1, __int64 a2, __int64 a3, __int64 a4, char a5)\n{\n  bool v7; // si\n  unsigned int v8; // ebx\n  const WCHAR *bstrVal; // rbp\n  int v11; // r12d\n  int v12; // eax\n  unsigned int cbMultiByte; // r15d\n  CHAR *lpMultiByteStr; // rax\n  _DWORD *v15; // rcx\n  LPCCH lpDefaultChar; // [rsp+30h] [rbp-78h]\n  PROPVARIANT lpWideCharStr; // [rsp+40h] [rbp-68h] BYREF\n  __int128 v18; // [rsp+58h] [rbp-50h] BYREF\n  LPVOID pv[3]; // [rsp+68h] [rbp-40h] BYREF\n  int v20; // [rsp+C8h] [rbp+20h] BYREF\n\n  if ( a4 )\n  {\n    *(_QWORD *)a3 = a4;\n  }\n  else if ( (*(int (__fastcall **)(__int64, __int64))(*(_QWORD *)a2 + 40LL))(a2, a3) < 0 )\n  {\n    return 51;\n  }\n  v7 = 0;\n  v18 = 0;\n  *(_OWORD *)pv = 0;\n  if ( !a5 )\n    goto LABEL_7;\n  if ( (**(int (__fastcall ***)(__int64, void *, __int128 *))a2)(a2, &unk_18016A0C8, &v18) >= 0\n    && (*(int (__fastcall **)(_QWORD, int *))(*(_QWORD *)v18 + 24LL))(v18, &v20) >= 0 )\n  {\n    v7 = v20 == 0;\nLABEL_7:\n    if ( (*(int (__fastcall **)(__int64, _QWORD, char *))(*(_QWORD *)a2 + 32LL))(a2, 0, (char *)&v18 + 8) >= 0 )\n    {\n      memset(&lpWideCharStr, 0, sizeof(lpWideCharStr));\n      if ( (*(int (__fastcall **)(_QWORD, void *, PROPVARIANT *))(**((_QWORD **)&v18 + 1) + 40LL))(\n             *((_QWORD *)&v18 + 1),\n             &unk_18016FAD0,\n             &lpWideCharStr) >= 0 )\n      {\n        bstrVal = L\"Unknown\";\n        if ( lpWideCharStr.vt == 31 )\n          bstrVal = lpWideCharStr.bstrVal;\n        v8 = 0;\n        if ( v7 )\n          v11 = sub_1800B7F50(\" [loopback]\");\n        else\n          v11 = 0;\n        v12 = WideCharToMultiByte(0xFDE9u, 0, bstrVal, -1, nullptr, 0, nullptr, nullptr);\n        LOBYTE(lpDefaultChar) = 1;\n        cbMultiByte = v11 + v12;\n        lpMultiByteStr = (CHAR *)sub_1800B6530(\n                                   *((_QWORD *)off_1801AED20 + 52),\n                                   (unsigned int)(v11 + v12),\n                                   \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\platforms\\\\win\\\\src\\\\fmod_output_wasapi.cpp\",\n                                   262,\n                                   0,\n                                   0,\n                                   lpDefaultChar);\n        *(_QWORD *)(a3 + 8) = lpMultiByteStr;\n        if ( lpMultiByteStr )\n        {\n          WideCharToMultiByte(0xFDE9u, 0, bstrVal, -1, lpMultiByteStr, cbMultiByte, nullptr, nullptr);\n          if ( v7 )\n            sub_1800B7CC0(*(_BYTE **)(a3 + 8), (__int64)\" [loopback]\", cbMultiByte);\n          if ( PropVariantClear(&lpWideCharStr) >= 0 )\n          {\n            if ( (*(int (__fastcall **)(__int64, void *, __int64))(*(_QWORD *)a2 + 24LL))(a2, &unk_18016A080, 23) >= 0 )\n            {\n              if ( (*(int (__fastcall **)(LPVOID, LPVOID *))(*(_QWORD *)pv[0] + 64LL))(pv[0], &pv[1]) >= 0 )\n              {\n                v15 = pv[1];\n                *(_DWORD *)(a3 + 16) = *((unsigned __int16 *)pv[1] + 1);\n                *(_DWORD *)(a3 + 20) = v15[1];\n              }\n            }\n            else\n            {\n              v8 = 51;\n            }\n          }\n          else\n          {\n            v8 = 51;\n          }\n        }\n        else\n        {\n          v8 = 38;\n        }\n      }\n      else\n      {\n        v8 = 51;\n      }\n    }\n    else\n    {\n      v8 = 51;\n    }\n    goto LABEL_29;\n  }\n  v8 = 57;\nLABEL_29:\n  if ( (_QWORD)v18 )\n    (*(void (__fastcall **)(_QWORD))(*(_QWORD *)v18 + 16LL))(v18);\n  if ( *((_QWORD *)&v18 + 1) )\n    (*(void (__fastcall **)(_QWORD))(**((_QWORD **)&v18 + 1) + 16LL))(*((_QWORD *)&v18 + 1));\n  if ( pv[0] )\n    (*(void (__fastcall **)(LPVOID))(*(_QWORD *)pv[0] + 16LL))(pv[0]);\n  if ( pv[1] )\n    CoTaskMemFree(pv[1]);\n  return v8;\n}", "assembly": "; \n; sub_1800C4B30 from 0x1800c4b30 to 0x1800c4e07 (727 bytes)\n; \n; 9 xrefs:\n; > sub_1800C36A0 @ 0x1800c3803\n; > sub_1800C36A0 @ 0x1800c38eb\n; > sub_1800C43E0 @ 0x1800c44ae\n; > sub_1800C43E0 @ 0x1800c45bf\n; > <???> @ 0x18018aa7c\n; > <???> @ 0x18018aa8c\n; > <???> @ 0x18018aaa8\n; > <???> @ 0x18018aadc\n; > <???> @ 0x1801fdea8\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, 0x1800c4b30\npush    rdi                                                            ; +0x2, 0x1800c4b32\npush    r14                                                            ; +0x3, 0x1800c4b33\nsub     rsp, 90h                                                       ; +0x5, 0x1800c4b35\nmov     r14, r8                                                        ; +0xc, 0x1800c4b3c\nmov     rdi, rdx                                                       ; +0xf, 0x1800c4b3f\ntest    r9, r9                                                         ; +0x12, 0x1800c4b42\njz      loc_1800C4BE6                                                  ; +0x15, 0x1800c4b45\nmov     [r8], r9                                                       ; +0x1b, 0x1800c4b4b\nmov     [rsp+0A8h+arg_0], rbp                                          ; +0x1e, 0x1800c4b4e\nxorps   xmm0, xmm0                                                     ; +0x26, 0x1800c4b56\nmov     [rsp+0A8h+arg_8], rsi                                          ; +0x29, 0x1800c4b59\nxorps   xmm1, xmm1                                                     ; +0x31, 0x1800c4b61\nxor     sil, sil                                                       ; +0x34, 0x1800c4b64\nmov     [rsp+0A8h+var_28], r15                                         ; +0x37, 0x1800c4b67\nmovdqu  [rsp+0A8h+var_50], xmm0                                        ; +0x3f, 0x1800c4b6f\nmovdqu  xmmword ptr [rsp+0A8h+pv], xmm1                                ; +0x45, 0x1800c4b75\ncmp     [rsp+0A8h+arg_20], sil                                         ; +0x4b, 0x1800c4b7b\njz      short loc_1800C4BC8                                            ; +0x53, 0x1800c4b83\nmov     rax, [rdi]                                                     ; +0x55, 0x1800c4b85\nlea     r8, [rsp+0A8h+var_50]                                          ; +0x58, 0x1800c4b88\nlea     rdx, unk_18016A0C8                                             ; +0x5d, 0x1800c4b8d\nmov     rcx, rdi                                                       ; +0x64, 0x1800c4b94\ncall    qword ptr [rax]                                                ; +0x67, 0x1800c4b97\ntest    eax, eax                                                       ; +0x69, 0x1800c4b99\njs      short loc_1800C4C0B                                            ; +0x6b, 0x1800c4b9b\nmov     rcx, qword ptr [rsp+0A8h+var_50]                               ; +0x6d, 0x1800c4b9d\nlea     rdx, [rsp+0A8h+arg_18]                                         ; +0x72, 0x1800c4ba2\nmov     rax, [rcx]                                                     ; +0x7a, 0x1800c4baa\ncall    qword ptr [rax+18h]                                            ; +0x7d, 0x1800c4bad\ntest    eax, eax                                                       ; +0x80, 0x1800c4bb0\njs      short loc_1800C4C0B                                            ; +0x82, 0x1800c4bb2\ncmp     [rsp+0A8h+arg_18], 0                                           ; +0x84, 0x1800c4bb4\nmov     eax, 1                                                         ; +0x8c, 0x1800c4bbc\nmovzx   esi, sil                                                       ; +0x91, 0x1800c4bc1\ncmovz   esi, eax                                                       ; +0x95, 0x1800c4bc5\nmov     rax, [rdi]                                                     ; +0x98, 0x1800c4bc8\nlea     r8, [rsp+0A8h+var_50+8]                                        ; +0x9b, 0x1800c4bcb\nxor     edx, edx                                                       ; +0xa0, 0x1800c4bd0\nmov     rcx, rdi                                                       ; +0xa2, 0x1800c4bd2\ncall    qword ptr [rax+20h]                                            ; +0xa5, 0x1800c4bd5\ntest    eax, eax                                                       ; +0xa8, 0x1800c4bd8\njns     short loc_1800C4C15                                            ; +0xaa, 0x1800c4bda\nmov     ebx, 33h ; '3'                                                 ; +0xac, 0x1800c4bdc\njmp     loc_1800C4DA1                                                  ; +0xb1, 0x1800c4be1\nmov     rax, [rdx]                                                     ; +0xb6, 0x1800c4be6\nmov     rcx, rdi                                                       ; +0xb9, 0x1800c4be9\nmov     rdx, r14                                                       ; +0xbc, 0x1800c4bec\ncall    qword ptr [rax+28h]                                            ; +0xbf, 0x1800c4bef\ntest    eax, eax                                                       ; +0xc2, 0x1800c4bf2\njns     loc_1800C4B4E                                                  ; +0xc4, 0x1800c4bf4\nmov     eax, 33h ; '3'                                                 ; +0xca, 0x1800c4bfa\nadd     rsp, 90h                                                       ; +0xcf, 0x1800c4bff\npop     r14                                                            ; +0xd6, 0x1800c4c06\npop     rdi                                                            ; +0xd8, 0x1800c4c08\npop     rbx                                                            ; +0xd9, 0x1800c4c09\nretn                                                                   ; +0xda, 0x1800c4c0a\nmov     ebx, 39h ; '9'                                                 ; +0xdb, 0x1800c4c0b\njmp     loc_1800C4DA1                                                  ; +0xe0, 0x1800c4c10\nmov     rcx, qword ptr [rsp+0A8h+var_50+8]                             ; +0xe5, 0x1800c4c15\nlea     r8, [rsp+0A8h+lpWideCharStr]                                   ; +0xea, 0x1800c4c1a\nxor     eax, eax                                                       ; +0xef, 0x1800c4c1f\nlea     rdx, unk_18016FAD0                                             ; +0xf1, 0x1800c4c21\nxorps   xmm0, xmm0                                                     ; +0xf8, 0x1800c4c28\nmov     [rsp+0A8h+var_58], rax                                         ; +0xfb, 0x1800c4c2b\nmovups  xmmword ptr [rsp+0A8h+lpWideCharStr], xmm0                     ; +0x100, 0x1800c4c30\nmov     rax, [rcx]                                                     ; +0x105, 0x1800c4c35\ncall    qword ptr [rax+28h]                                            ; +0x108, 0x1800c4c38\ntest    eax, eax                                                       ; +0x10b, 0x1800c4c3b\njns     short loc_1800C4C49                                            ; +0x10d, 0x1800c4c3d\nmov     ebx, 33h ; '3'                                                 ; +0x10f, 0x1800c4c3f\njmp     loc_1800C4DA1                                                  ; +0x114, 0x1800c4c44\ncmp     word ptr [rsp+0A8h+lpWideCharStr], 1Fh                         ; +0x119, 0x1800c4c49\nlea     rbp, aUnknown; \"Unknown\"                                       ; +0x11f, 0x1800c4c4f\nmov     [rsp+0A8h+var_20], r12                                         ; +0x126, 0x1800c4c56\ncmovz   rbp, [rsp+0A8h+lpWideCharStr+8]                                ; +0x12e, 0x1800c4c5e\nxor     ebx, ebx                                                       ; +0x134, 0x1800c4c64\ntest    sil, sil                                                       ; +0x136, 0x1800c4c66\njz      short loc_1800C4C7C                                            ; +0x139, 0x1800c4c69\nlea     rcx, aLoopback; \" [loopback]\"                                  ; +0x13b, 0x1800c4c6b\ncall    sub_1800B7F50                                                  ; +0x142, 0x1800c4c72\nmov     r12d, eax                                                      ; +0x147, 0x1800c4c77\njmp     short loc_1800C4C7F                                            ; +0x14a, 0x1800c4c7a\nmov     r12d, ebx                                                      ; +0x14c, 0x1800c4c7c\nmov     [rsp+0A8h+lpUsedDefaultChar], rbx; lpUsedDefaultChar           ; +0x14f, 0x1800c4c7f\nmov     r9d, 0FFFFFFFFh; cchWideChar                                   ; +0x154, 0x1800c4c84\nmov     [rsp+0A8h+lpDefaultChar], rbx; lpDefaultChar                   ; +0x15a, 0x1800c4c8a\nmov     r8, rbp; lpWideCharStr                                         ; +0x15f, 0x1800c4c8f\nmov     [rsp+0A8h+cbMultiByte], ebx; cbMultiByte                       ; +0x162, 0x1800c4c92\nxor     edx, edx; dwFlags                                              ; +0x166, 0x1800c4c96\nmov     ecx, 0FDE9h; CodePage                                          ; +0x168, 0x1800c4c98\nmov     [rsp+0A8h+lpMultiByteStr], rbx; lpMultiByteStr                 ; +0x16d, 0x1800c4c9d\ncall    cs:WideCharToMultiByte                                         ; +0x172, 0x1800c4ca2\nmov     rcx, cs:off_1801AED20                                          ; +0x178, 0x1800c4ca8\nlea     r8, aCBuildagent1Wo_48; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x17f, 0x1800c4caf\nmov     byte ptr [rsp+0A8h+lpDefaultChar], 1                           ; +0x186, 0x1800c4cb6\nmov     r9d, 106h                                                      ; +0x18b, 0x1800c4cbb\nmov     byte ptr [rsp+0A8h+cbMultiByte], bl                            ; +0x191, 0x1800c4cc1\nlea     r15d, [r12+rax]                                                ; +0x195, 0x1800c4cc5\nmov     dword ptr [rsp+0A8h+lpMultiByteStr], ebx                       ; +0x199, 0x1800c4cc9\nmov     rcx, [rcx+1A0h]                                                ; +0x19d, 0x1800c4ccd\nmov     edx, r15d                                                      ; +0x1a4, 0x1800c4cd4\ncall    sub_1800B6530                                                  ; +0x1a7, 0x1800c4cd7\nmov     r12, [rsp+0A8h+var_20]                                         ; +0x1ac, 0x1800c4cdc\nmov     [r14+8], rax                                                   ; +0x1b4, 0x1800c4ce4\ntest    rax, rax                                                       ; +0x1b8, 0x1800c4ce8\njnz     short loc_1800C4CF5                                            ; +0x1bb, 0x1800c4ceb\nlea     ebx, [rax+26h]                                                 ; +0x1bd, 0x1800c4ced\njmp     loc_1800C4DA1                                                  ; +0x1c0, 0x1800c4cf0\nmov     [rsp+0A8h+lpUsedDefaultChar], rbx; lpUsedDefaultChar           ; +0x1c5, 0x1800c4cf5\nmov     r9d, 0FFFFFFFFh; cchWideChar                                   ; +0x1ca, 0x1800c4cfa\nmov     [rsp+0A8h+lpDefaultChar], rbx; lpDefaultChar                   ; +0x1d0, 0x1800c4d00\nmov     r8, rbp; lpWideCharStr                                         ; +0x1d5, 0x1800c4d05\nmov     [rsp+0A8h+cbMultiByte], r15d; cbMultiByte                      ; +0x1d8, 0x1800c4d08\nxor     edx, edx; dwFlags                                              ; +0x1dd, 0x1800c4d0d\nmov     ecx, 0FDE9h; CodePage                                          ; +0x1df, 0x1800c4d0f\nmov     [rsp+0A8h+lpMultiByteStr], rax; lpMultiByteStr                 ; +0x1e4, 0x1800c4d14\ncall    cs:WideCharToMultiByte                                         ; +0x1e9, 0x1800c4d19\ntest    sil, sil                                                       ; +0x1ef, 0x1800c4d1f\njz      short loc_1800C4D37                                            ; +0x1f2, 0x1800c4d22\nmov     rcx, [r14+8]                                                   ; +0x1f4, 0x1800c4d24\nlea     rdx, aLoopback; \" [loopback]\"                                  ; +0x1f8, 0x1800c4d28\nmov     r8d, r15d                                                      ; +0x1ff, 0x1800c4d2f\ncall    sub_1800B7CC0                                                  ; +0x202, 0x1800c4d32\nlea     rcx, [rsp+0A8h+lpWideCharStr]; pvar                            ; +0x207, 0x1800c4d37\ncall    cs:PropVariantClear                                            ; +0x20c, 0x1800c4d3c\ntest    eax, eax                                                       ; +0x212, 0x1800c4d42\njns     short loc_1800C4D4D                                            ; +0x214, 0x1800c4d44\nmov     ebx, 33h ; '3'                                                 ; +0x216, 0x1800c4d46\njmp     short loc_1800C4DA1                                            ; +0x21b, 0x1800c4d4b\nmov     rax, [rdi]                                                     ; +0x21d, 0x1800c4d4d\nlea     rcx, [rsp+0A8h+pv]                                             ; +0x220, 0x1800c4d50\nxor     r9d, r9d                                                       ; +0x225, 0x1800c4d55\nmov     [rsp+0A8h+lpMultiByteStr], rcx                                 ; +0x228, 0x1800c4d58\nlea     rdx, unk_18016A080                                             ; +0x22d, 0x1800c4d5d\nmov     rcx, rdi                                                       ; +0x234, 0x1800c4d64\nlea     r8d, [r9+17h]                                                  ; +0x237, 0x1800c4d67\ncall    qword ptr [rax+18h]                                            ; +0x23b, 0x1800c4d6b\ntest    eax, eax                                                       ; +0x23e, 0x1800c4d6e\njns     short loc_1800C4D79                                            ; +0x240, 0x1800c4d70\nmov     ebx, 33h ; '3'                                                 ; +0x242, 0x1800c4d72\njmp     short loc_1800C4DA1                                            ; +0x247, 0x1800c4d77\nmov     rcx, [rsp+0A8h+pv]                                             ; +0x249, 0x1800c4d79\nlea     rdx, [rsp+0A8h+pv+8]                                           ; +0x24e, 0x1800c4d7e\nmov     rax, [rcx]                                                     ; +0x253, 0x1800c4d83\ncall    qword ptr [rax+40h]                                            ; +0x256, 0x1800c4d86\ntest    eax, eax                                                       ; +0x259, 0x1800c4d89\njs      short loc_1800C4DA1                                            ; +0x25b, 0x1800c4d8b\nmov     rcx, [rsp+0A8h+pv+8]                                           ; +0x25d, 0x1800c4d8d\nmovzx   eax, word ptr [rcx+2]                                          ; +0x262, 0x1800c4d92\nmov     [r14+10h], eax                                                 ; +0x266, 0x1800c4d96\nmov     eax, [rcx+4]                                                   ; +0x26a, 0x1800c4d9a\nmov     [r14+14h], eax                                                 ; +0x26d, 0x1800c4d9d\nmov     rcx, qword ptr [rsp+0A8h+var_50]                               ; +0x271, 0x1800c4da1\nmov     r15, [rsp+0A8h+var_28]                                         ; +0x276, 0x1800c4da6\nmov     rsi, [rsp+0A8h+arg_8]                                          ; +0x27e, 0x1800c4dae\nmov     rbp, [rsp+0A8h+arg_0]                                          ; +0x286, 0x1800c4db6\ntest    rcx, rcx                                                       ; +0x28e, 0x1800c4dbe\njz      short loc_1800C4DC9                                            ; +0x291, 0x1800c4dc1\nmov     rax, [rcx]                                                     ; +0x293, 0x1800c4dc3\ncall    qword ptr [rax+10h]                                            ; +0x296, 0x1800c4dc6\nmov     rcx, qword ptr [rsp+0A8h+var_50+8]                             ; +0x299, 0x1800c4dc9\ntest    rcx, rcx                                                       ; +0x29e, 0x1800c4dce\njz      short loc_1800C4DD9                                            ; +0x2a1, 0x1800c4dd1\nmov     rax, [rcx]                                                     ; +0x2a3, 0x1800c4dd3\ncall    qword ptr [rax+10h]                                            ; +0x2a6, 0x1800c4dd6\nmov     rcx, [rsp+0A8h+pv]                                             ; +0x2a9, 0x1800c4dd9\ntest    rcx, rcx                                                       ; +0x2ae, 0x1800c4dde\njz      short loc_1800C4DE9                                            ; +0x2b1, 0x1800c4de1\nmov     rdx, [rcx]                                                     ; +0x2b3, 0x1800c4de3\ncall    qword ptr [rdx+10h]                                            ; +0x2b6, 0x1800c4de6\nmov     rcx, [rsp+0A8h+pv+8]; pv                                       ; +0x2b9, 0x1800c4de9\ntest    rcx, rcx                                                       ; +0x2be, 0x1800c4dee\njz      short loc_1800C4DF9                                            ; +0x2c1, 0x1800c4df1\ncall    cs:CoTaskMemFree                                               ; +0x2c3, 0x1800c4df3\nmov     eax, ebx                                                       ; +0x2c9, 0x1800c4df9\nadd     rsp, 90h                                                       ; +0x2cb, 0x1800c4dfb\npop     r14                                                            ; +0x2d2, 0x1800c4e02\npop     rdi                                                            ; +0x2d4, 0x1800c4e04\npop     rbx                                                            ; +0x2d5, 0x1800c4e05\nretn                                                                   ; +0x2d6, 0x1800c4e06", "xrefs": ["sub_1800C36A0 @ 0x1800c3803", "sub_1800C36A0 @ 0x1800c38eb", "sub_1800C43E0 @ 0x1800c44ae", "sub_1800C43E0 @ 0x1800c45bf", "<???> @ 0x18018aa7c", "<???> @ 0x18018aa8c", "<???> @ 0x18018aaa8", "<???> @ 0x18018aadc", "<???> @ 0x1801fdea8"], "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"}