{"type": "func", "start": 6443234224, "end": 6443234650, "name": "sub_1800BF3B0", "pseudocode": "// \n// sub_1800BF3B0 from 0x1800bf3b0 to 0x1800bf55a (426 bytes)\n// \n// 2 xrefs:\n// > sub_1800BF5D0 @ 0x1800bf5ec\n// > <???> @ 0x1801fd95c\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:02 +0000\n// \n\n__int64 __fastcall sub_1800BF3B0(\n        _QWORD *a1,\n        int a2,\n        __int64 a3,\n        _DWORD *a4,\n        _DWORD *a5,\n        _DWORD *a6,\n        _DWORD *a7,\n        unsigned int a8,\n        int a9,\n        int a10,\n        LPCCH lpMultiByteStr)\n{\n  __int64 v11; // rax\n  _DWORD *v14; // rax\n  HANDLE *v15; // rbx\n  unsigned __int64 v16; // rdx\n  __int64 v17; // rax\n  const CHAR *v18; // rcx\n  __int64 result; // rax\n  void *v20; // rax\n\n  v11 = (__int64)a1 + 84;\n  if ( !a1 )\n    v11 = 92;\n  *(_DWORD *)v11 = 1;\n  if ( !*a5 )\n  {\n    *a5 = 3;\n    *a6 = 2;\n  }\n  *a7 = *((_DWORD *)&unk_18016BF90 + 4 * a2);\n  v14 = sub_1800B6880(\n          *((_QWORD *)off_1801AED20 + 52),\n          40,\n          \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_output_wavwriter_nrt.cpp\",\n          100,\n          0);\n  *a1 = v14;\n  v15 = (HANDLE *)v14;\n  if ( !v14 )\n    return 38;\n  LODWORD(v16) = a8;\n  *v14 = *a4;\n  v14[1] = *a6;\n  v14[4] = *a7;\n  v14[2] = a8;\n  switch ( *a7 )\n  {\n    case 1:\n      v17 = 8;\n      break;\n    case 2:\n      v17 = 16;\n      break;\n    case 3:\n      v17 = 24;\n      break;\n    default:\n      if ( (unsigned int)(*a7 - 4) > 1 )\n        goto LABEL_15;\n      v17 = 32;\n      break;\n  }\n  v16 = (v17 * (unsigned __int64)a8) >> 3;\nLABEL_15:\n  v18 = off_1801AEC78;\n  if ( lpMultiByteStr )\n    v18 = lpMultiByteStr;\n  *((_DWORD *)v15 + 3) = v16 * *a6;\n  if ( (unsigned int)FMOD_OS_File_Open(v18, 1u) )\n    return 51;\n  result = sub_18003B250(v15[4]);\n  if ( !(_DWORD)result )\n  {\n    v20 = sub_1800B6880(\n            *((_QWORD *)off_1801AED20 + 52),\n            *((unsigned int *)v15 + 3),\n            \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_output_wavwriter_nrt.cpp\",\n            132,\n            0);\n    v15[3] = v20;\n    if ( v20 )\n      return 0;\n    return 38;\n  }\n  return result;\n}", "assembly": "; \n; sub_1800BF3B0 from 0x1800bf3b0 to 0x1800bf55a (426 bytes)\n; \n; 2 xrefs:\n; > sub_1800BF5D0 @ 0x1800bf5ec\n; > <???> @ 0x1801fd95c\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:02 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800bf3b0\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x1800bf3b5\npush    rdi                                                            ; +0xa, 0x1800bf3ba\npush    r14                                                            ; +0xb, 0x1800bf3bb\npush    r15                                                            ; +0xd, 0x1800bf3bd\nsub     rsp, 30h                                                       ; +0xf, 0x1800bf3bf\nmov     rdi, [rsp+48h+arg_28]                                          ; +0x13, 0x1800bf3c3\nlea     rax, [rcx+54h]                                                 ; +0x18, 0x1800bf3c8\nmov     rsi, rcx                                                       ; +0x1c, 0x1800bf3cc\nmov     r15, r9                                                        ; +0x1f, 0x1800bf3cf\ntest    rsi, rsi                                                       ; +0x22, 0x1800bf3d2\nmov     ecx, 5Ch ; '\\'                                                 ; +0x25, 0x1800bf3d5\ncmovz   rax, rcx                                                       ; +0x2a, 0x1800bf3da\nmov     dword ptr [rax], 1                                             ; +0x2e, 0x1800bf3de\nmov     rax, [rsp+48h+arg_20]                                          ; +0x34, 0x1800bf3e4\ncmp     dword ptr [rax], 0                                             ; +0x39, 0x1800bf3e9\njnz     short loc_1800BF3FA                                            ; +0x3c, 0x1800bf3ec\nmov     dword ptr [rax], 3                                             ; +0x3e, 0x1800bf3ee\nmov     dword ptr [rdi], 2                                             ; +0x44, 0x1800bf3f4\nmov     r14, [rsp+48h+arg_30]                                          ; +0x4a, 0x1800bf3fa\nlea     rcx, unk_18016BF90                                             ; +0x52, 0x1800bf402\nmovsxd  rax, edx                                                       ; +0x59, 0x1800bf409\nlea     r8, aCBuildagent1Wo_44; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x5c, 0x1800bf40c\nadd     rax, rax                                                       ; +0x63, 0x1800bf413\nmov     [rsp+48h+var_28], 0                                            ; +0x66, 0x1800bf416\nmov     r9d, 64h ; 'd'                                                 ; +0x6e, 0x1800bf41e\nmov     eax, [rcx+rax*8]                                               ; +0x74, 0x1800bf424\nmov     [r14], eax                                                     ; +0x77, 0x1800bf427\nlea     edx, [r9-3Ch]                                                  ; +0x7a, 0x1800bf42a\nmov     rcx, cs:off_1801AED20                                          ; +0x7e, 0x1800bf42e\nmov     rcx, [rcx+1A0h]                                                ; +0x85, 0x1800bf435\ncall    sub_1800B6880                                                  ; +0x8c, 0x1800bf43c\nmov     [rsi], rax                                                     ; +0x91, 0x1800bf441\nmov     rbx, rax                                                       ; +0x94, 0x1800bf444\ntest    rax, rax                                                       ; +0x97, 0x1800bf447\njz      loc_1800BF541                                                  ; +0x9a, 0x1800bf44a\nmov     ecx, [r15]                                                     ; +0xa0, 0x1800bf450\nmov     edx, [rsp+48h+arg_38]                                          ; +0xa3, 0x1800bf453\nmov     [rax], ecx                                                     ; +0xaa, 0x1800bf45a\nmov     ecx, [rdi]                                                     ; +0xac, 0x1800bf45c\nmov     [rax+4], ecx                                                   ; +0xae, 0x1800bf45e\nmov     ecx, [r14]                                                     ; +0xb1, 0x1800bf461\nmov     [rax+10h], ecx                                                 ; +0xb4, 0x1800bf464\nmov     [rax+8], edx                                                   ; +0xb7, 0x1800bf467\nmov     ecx, [r14]                                                     ; +0xba, 0x1800bf46a\nmov     r8d, [rdi]                                                     ; +0xbd, 0x1800bf46d\nsub     ecx, 1                                                         ; +0xc0, 0x1800bf470\njz      short loc_1800BF49E                                            ; +0xc3, 0x1800bf473\nsub     ecx, 1                                                         ; +0xc5, 0x1800bf475\njz      short loc_1800BF497                                            ; +0xc8, 0x1800bf478\nsub     ecx, 1                                                         ; +0xca, 0x1800bf47a\njz      short loc_1800BF490                                            ; +0xcd, 0x1800bf47d\nsub     ecx, 1                                                         ; +0xcf, 0x1800bf47f\njz      short loc_1800BF489                                            ; +0xd2, 0x1800bf482\ncmp     ecx, 1                                                         ; +0xd4, 0x1800bf484\njnz     short loc_1800BF4AB                                            ; +0xd7, 0x1800bf487\nmov     eax, 20h ; ' '                                                 ; +0xd9, 0x1800bf489\njmp     short loc_1800BF4A3                                            ; +0xde, 0x1800bf48e\nmov     eax, 18h                                                       ; +0xe0, 0x1800bf490\njmp     short loc_1800BF4A3                                            ; +0xe5, 0x1800bf495\nmov     eax, 10h                                                       ; +0xe7, 0x1800bf497\njmp     short loc_1800BF4A3                                            ; +0xec, 0x1800bf49c\nmov     eax, 8                                                         ; +0xee, 0x1800bf49e\nimul    rdx, rax                                                       ; +0xf3, 0x1800bf4a3\nshr     rdx, 3                                                         ; +0xf7, 0x1800bf4a7\nmov     rax, [rsp+48h+lpMultiByteStr]                                  ; +0xfb, 0x1800bf4ab\nlea     r9, [rbx+20h]                                                  ; +0x103, 0x1800bf4b3\nmov     rcx, cs:off_1801AEC78; \"fmodoutput.wav\"                        ; +0x107, 0x1800bf4b7\nimul    r8d, edx                                                       ; +0x10e, 0x1800bf4be\nmov     edx, 1; dwShareMode                                            ; +0x112, 0x1800bf4c2\ntest    rax, rax                                                       ; +0x117, 0x1800bf4c7\ncmovnz  rcx, rax; lpMultiByteStr                                       ; +0x11a, 0x1800bf4ca\nmov     [rbx+0Ch], r8d                                                 ; +0x11e, 0x1800bf4ce\nlea     r8, [rsp+48h+arg_8]                                            ; +0x122, 0x1800bf4d2\nmov     [rsp+48h+arg_8], 0                                             ; +0x127, 0x1800bf4d7\ncall    FMOD_OS_File_Open                                              ; +0x12f, 0x1800bf4df\ntest    eax, eax                                                       ; +0x134, 0x1800bf4e4\njz      short loc_1800BF4EF                                            ; +0x136, 0x1800bf4e6\nmov     eax, 33h ; '3'                                                 ; +0x138, 0x1800bf4e8\njmp     short loc_1800BF546                                            ; +0x13d, 0x1800bf4ed\nmov     eax, [rbx+14h]                                                 ; +0x13f, 0x1800bf4ef\nmov     r9d, [rbx]                                                     ; +0x142, 0x1800bf4f2\nmov     r8d, [rbx+4]                                                   ; +0x145, 0x1800bf4f5\nmov     edx, [rbx+10h]                                                 ; +0x149, 0x1800bf4f9\nmov     rcx, [rbx+20h]; hFile                                          ; +0x14c, 0x1800bf4fc\nmov     [rsp+48h+var_28], eax; int                                     ; +0x150, 0x1800bf500\ncall    sub_18003B250                                                  ; +0x154, 0x1800bf504\ntest    eax, eax                                                       ; +0x159, 0x1800bf509\njnz     short loc_1800BF546                                            ; +0x15b, 0x1800bf50b\nmov     rcx, cs:off_1801AED20                                          ; +0x15d, 0x1800bf50d\nlea     r8, aCBuildagent1Wo_44; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x164, 0x1800bf514\nmov     edx, [rbx+0Ch]                                                 ; +0x16b, 0x1800bf51b\nmov     r9d, 84h                                                       ; +0x16e, 0x1800bf51e\nmov     [rsp+48h+var_28], eax                                          ; +0x174, 0x1800bf524\nmov     rcx, [rcx+1A0h]                                                ; +0x178, 0x1800bf528\ncall    sub_1800B6880                                                  ; +0x17f, 0x1800bf52f\nmov     [rbx+18h], rax                                                 ; +0x184, 0x1800bf534\ntest    rax, rax                                                       ; +0x188, 0x1800bf538\njz      short loc_1800BF541                                            ; +0x18b, 0x1800bf53b\nxor     eax, eax                                                       ; +0x18d, 0x1800bf53d\njmp     short loc_1800BF546                                            ; +0x18f, 0x1800bf53f\nmov     eax, 26h ; '&'                                                 ; +0x191, 0x1800bf541\nmov     rbx, [rsp+48h+arg_0]                                           ; +0x196, 0x1800bf546\nmov     rsi, [rsp+48h+arg_10]                                          ; +0x19b, 0x1800bf54b\nadd     rsp, 30h                                                       ; +0x1a0, 0x1800bf550\npop     r15                                                            ; +0x1a4, 0x1800bf554\npop     r14                                                            ; +0x1a6, 0x1800bf556\npop     rdi                                                            ; +0x1a8, 0x1800bf558\nretn                                                                   ; +0x1a9, 0x1800bf559", "xrefs": ["sub_1800BF5D0 @ 0x1800bf5ec", "<???> @ 0x1801fd95c"], "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"}