{"type": "func", "start": 6443613888, "end": 6443614458, "name": "sub_18011BEC0", "pseudocode": "// \n// sub_18011BEC0 from 0x18011bec0 to 0x18011c0fa (570 bytes)\n// \n// 4 xrefs:\n// > <???> @ 0x18016e168\n// > <???> @ 0x180191780\n// > <???> @ 0x1801917b4\n// > <???> @ 0x180202168\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:50 +0000\n// \n\n__int64 __fastcall sub_18011BEC0(__int64 a1)\n{\n  struct _RTL_CRITICAL_SECTION *v2; // r14\n  struct _RTL_CRITICAL_SECTION *v3; // rbp\n  __int64 v4; // rax\n  __int64 v5; // r9\n  _UNKNOWN **v6; // rcx\n  bool v7; // si\n  int v8; // edx\n  int *v9; // rax\n  __int64 v10; // rcx\n  __int64 v11; // rdi\n  __int64 v12; // rdx\n  unsigned int v13; // ebx\n\n  v2 = (struct _RTL_CRITICAL_SECTION *)qword_1801F4150[*(unsigned int *)(*(_QWORD *)(a1 + 8) + 69808LL)];\n  FMOD_OS_CriticalSection_Enter(v2);\n  v3 = (struct _RTL_CRITICAL_SECTION *)qword_1801F40D0[2 * *(unsigned int *)(*(_QWORD *)(a1 + 8) + 69808LL)\n                                                     + *(int *)(a1 + 168)];\n  FMOD_OS_CriticalSection_Enter(v3);\n  **(_QWORD **)(a1 + 152) = *(_QWORD *)(a1 + 144);\n  *(_QWORD *)(*(_QWORD *)(a1 + 144) + 8LL) = *(_QWORD *)(a1 + 152);\n  *(_QWORD *)(a1 + 152) = a1 + 144;\n  *(_QWORD *)(a1 + 144) = a1 + 144;\n  v4 = *(unsigned int *)(*(_QWORD *)(a1 + 8) + 69808LL);\n  v5 = 2 * v4;\n  v6 = &off_1801B1320 + 6 * v4 + 3 * *(int *)(a1 + 168);\n  v7 = *v6 == (_UNKNOWN *)v6 && v6[1] == (_UNKNOWN *)v6;\n  if ( *(_QWORD *)(a1 + 120) )\n  {\n    v8 = 0;\n    v9 = &dword_1801F3FD8[8 * v4];\n    v10 = 0;\n    while ( *v9 != *(_DWORD *)(a1 + 36) )\n    {\n      ++v8;\n      ++v10;\n      v9 += 4;\n      if ( v10 >= 2 )\n        goto LABEL_12;\n    }\n    v11 = v8;\n    --dword_1801F3FDC[4 * v5 + 4 * v8];\n    v12 = 2 * (v8 + 2LL * *(unsigned int *)(*(_QWORD *)(a1 + 8) + 69808LL));\n    if ( !dword_1801F3FDC[2 * v12] )\n    {\n      sub_1800B6510(\n        *((_QWORD *)off_1801AED20 + 52),\n        qword_1801F3FD0[v12],\n        (__int64)\"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\\\\core_api\\\\src\\\\fmod_dsp_convolutionreverb_async.cpp\",\n        258);\n      qword_1801F3FD0[4 * *(unsigned int *)(*(_QWORD *)(a1 + 8) + 69808LL) + 2 * v11] = 0;\n      dword_1801F3FD8[8 * *(unsigned int *)(*(_QWORD *)(a1 + 8) + 69808LL) + 4 * v11] = 0;\n    }\nLABEL_12:\n    *(_QWORD *)(a1 + 120) = 0;\n  }\n  FMOD_OS_CriticalSection_Leave(v3);\n  if ( v7 )\n  {\n    sub_1800B8560((__int64)&unk_1801F2A50 + 688 * *(unsigned int *)(*(_QWORD *)(a1 + 8) + 69808LL)\n                                          + 344 * *(int *)(a1 + 168));\n    FMOD_OS_CriticalSection_Free(\n      (LPCRITICAL_SECTION)qword_1801F40D0[2 * *(unsigned int *)(*(_QWORD *)(a1 + 8) + 69808LL) + *(int *)(a1 + 168)],\n      0);\n    qword_1801F40D0[2 * *(unsigned int *)(*(_QWORD *)(a1 + 8) + 69808LL) + *(int *)(a1 + 168)] = 0;\n  }\n  v13 = sub_18011CAC0(a1);\n  FMOD_OS_CriticalSection_Leave(v2);\n  return v13;\n}", "assembly": "; \n; sub_18011BEC0 from 0x18011bec0 to 0x18011c0fa (570 bytes)\n; \n; 4 xrefs:\n; > <???> @ 0x18016e168\n; > <???> @ 0x180191780\n; > <???> @ 0x1801917b4\n; > <???> @ 0x180202168\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:50 +0000\n; \nmov     [rsp+arg_18], rbx                                              ; +0x0, 0x18011bec0\npush    r12                                                            ; +0x5, 0x18011bec5\npush    r14                                                            ; +0x7, 0x18011bec7\npush    r15                                                            ; +0x9, 0x18011bec9\nsub     rsp, 20h                                                       ; +0xb, 0x18011becb\nmov     rax, [rcx+8]                                                   ; +0xf, 0x18011becf\nlea     r12, cs:180000000h                                             ; +0x13, 0x18011bed3\nmov     rbx, rcx                                                       ; +0x1a, 0x18011beda\nmov     [rsp+38h+arg_0], rbp                                           ; +0x1d, 0x18011bedd\nmov     [rsp+38h+arg_8], rsi                                           ; +0x22, 0x18011bee2\nmov     edx, [rax+110B0h]                                              ; +0x27, 0x18011bee7\nmov     r14, rva qword_1801F4150[r12+rdx*8]                            ; +0x2d, 0x18011beed\nmov     rcx, r14                                                       ; +0x35, 0x18011bef5\ncall    FMOD_OS_CriticalSection_Enter                                  ; +0x38, 0x18011bef8\nmov     rax, [rbx+8]                                                   ; +0x3d, 0x18011befd\nmov     edx, [rax+110B0h]                                              ; +0x41, 0x18011bf01\nmovsxd  rax, dword ptr [rbx+0A8h]                                      ; +0x47, 0x18011bf07\nlea     rcx, [rax+rdx*2]                                               ; +0x4e, 0x18011bf0e\nmov     rbp, rva qword_1801F40D0[r12+rcx*8]                            ; +0x52, 0x18011bf12\nmov     rcx, rbp                                                       ; +0x5a, 0x18011bf1a\ncall    FMOD_OS_CriticalSection_Enter                                  ; +0x5d, 0x18011bf1d\nlea     rdx, [rbx+90h]                                                 ; +0x62, 0x18011bf22\nmov     rcx, [rdx+8]                                                   ; +0x69, 0x18011bf29\nmov     rax, [rdx]                                                     ; +0x6d, 0x18011bf2d\nmov     [rcx], rax                                                     ; +0x70, 0x18011bf30\nmov     rcx, [rdx]                                                     ; +0x73, 0x18011bf33\nmov     rax, [rdx+8]                                                   ; +0x76, 0x18011bf36\nmov     [rcx+8], rax                                                   ; +0x7a, 0x18011bf3a\nmov     [rdx+8], rdx                                                   ; +0x7e, 0x18011bf3e\nmov     [rdx], rdx                                                     ; +0x82, 0x18011bf42\nmov     rax, [rbx+8]                                                   ; +0x85, 0x18011bf45\nmovsxd  rcx, dword ptr [rbx+0A8h]                                      ; +0x89, 0x18011bf49\nmov     eax, [rax+110B0h]                                              ; +0x90, 0x18011bf50\nlea     r9, [rax+rax]                                                  ; +0x96, 0x18011bf56\nadd     rcx, r9                                                        ; +0x9a, 0x18011bf5a\nlea     rdx, [rcx+rcx*2]                                               ; +0x9d, 0x18011bf5d\nlea     rcx, rva off_1801B1320[r12]                                    ; +0xa1, 0x18011bf61\nlea     rcx, [rcx+rdx*8]                                               ; +0xa9, 0x18011bf69\ncmp     [rcx], rcx                                                     ; +0xad, 0x18011bf6d\njnz     short loc_18011BF7D                                            ; +0xb0, 0x18011bf70\ncmp     [rcx+8], rcx                                                   ; +0xb2, 0x18011bf72\njnz     short loc_18011BF7D                                            ; +0xb6, 0x18011bf76\nmov     sil, 1                                                         ; +0xb8, 0x18011bf78\njmp     short loc_18011BF80                                            ; +0xbb, 0x18011bf7b\nxor     sil, sil                                                       ; +0xbd, 0x18011bf7d\nxor     r15d, r15d                                                     ; +0xc0, 0x18011bf80\ncmp     [rbx+78h], r15                                                 ; +0xc3, 0x18011bf83\njz      loc_18011C053                                                  ; +0xc7, 0x18011bf87\nmov     r8d, [rbx+24h]                                                 ; +0xcd, 0x18011bf8d\nlea     r10, dword_1801F3FD8                                           ; +0xd1, 0x18011bf91\nshl     rax, 5                                                         ; +0xd8, 0x18011bf98\nmov     edx, r15d                                                      ; +0xdc, 0x18011bf9c\nadd     rax, r10                                                       ; +0xdf, 0x18011bf9f\nmov     ecx, r15d                                                      ; +0xe2, 0x18011bfa2\ncmp     [rax], r8d                                                     ; +0xe5, 0x18011bfa5\njz      short loc_18011BFBE                                            ; +0xe8, 0x18011bfa8\ninc     edx                                                            ; +0xea, 0x18011bfaa\ninc     rcx                                                            ; +0xec, 0x18011bfac\nadd     rax, 10h                                                       ; +0xef, 0x18011bfaf\ncmp     rcx, 2                                                         ; +0xf3, 0x18011bfb3\njl      short loc_18011BFA5                                            ; +0xf7, 0x18011bfb7\njmp     loc_18011C04F                                                  ; +0xf9, 0x18011bfb9\nmov     [rsp+38h+arg_10], rdi                                          ; +0xfe, 0x18011bfbe\nmovsxd  rdi, edx                                                       ; +0x103, 0x18011bfc3\nlea     rax, [r9+rdi]                                                  ; +0x106, 0x18011bfc6\nadd     rax, rax                                                       ; +0x10a, 0x18011bfca\ndec     rva dword_1801F3FDC[r12+rax*8]                                 ; +0x10d, 0x18011bfcd\nmov     rax, [rbx+8]                                                   ; +0x115, 0x18011bfd5\nmov     ecx, [rax+110B0h]                                              ; +0x119, 0x18011bfd9\nlea     rdx, [rdi+rcx*2]                                               ; +0x11f, 0x18011bfdf\nadd     rdx, rdx                                                       ; +0x123, 0x18011bfe3\ncmp     rva dword_1801F3FDC[r12+rdx*8], r15d                           ; +0x126, 0x18011bfe6\njnz     short loc_18011C04A                                            ; +0x12e, 0x18011bfee\nmov     rcx, cs:off_1801AED20                                          ; +0x130, 0x18011bff0\nlea     r8, aCBuildagent1Wo_83; \"C:\\\\buildagent1\\\\work\\\\570ad728b1678096\"... ; +0x137, 0x18011bff7\nmov     rdx, rva qword_1801F3FD0[r12+rdx*8]                            ; +0x13e, 0x18011bffe\nmov     r9d, 102h                                                      ; +0x146, 0x18011c006\nmov     rcx, [rcx+1A0h]                                                ; +0x14c, 0x18011c00c\ncall    sub_1800B6510                                                  ; +0x153, 0x18011c013\nmov     rax, [rbx+8]                                                   ; +0x158, 0x18011c018\nmov     ecx, [rax+110B0h]                                              ; +0x15c, 0x18011c01c\nlea     rax, [rdi+rcx*2]                                               ; +0x162, 0x18011c022\nadd     rax, rax                                                       ; +0x166, 0x18011c026\nmov     rva qword_1801F3FD0[r12+rax*8], r15                            ; +0x169, 0x18011c029\nmov     rax, [rbx+8]                                                   ; +0x171, 0x18011c031\nmov     edx, [rax+110B0h]                                              ; +0x175, 0x18011c035\nlea     rax, [rdi+rdx*2]                                               ; +0x17b, 0x18011c03b\nadd     rax, rax                                                       ; +0x17f, 0x18011c03f\nmov     rva dword_1801F3FD8[r12+rax*8], r15d                           ; +0x182, 0x18011c042\nmov     rdi, [rsp+38h+arg_10]                                          ; +0x18a, 0x18011c04a\nmov     [rbx+78h], r15                                                 ; +0x18f, 0x18011c04f\nmov     rcx, rbp                                                       ; +0x193, 0x18011c053\ncall    FMOD_OS_CriticalSection_Leave                                  ; +0x196, 0x18011c056\nmov     rbp, [rsp+38h+arg_0]                                           ; +0x19b, 0x18011c05b\ntest    sil, sil                                                       ; +0x1a0, 0x18011c060\nmov     rsi, [rsp+38h+arg_8]                                           ; +0x1a3, 0x18011c063\njz      short loc_18011C0D6                                            ; +0x1a8, 0x18011c068\nmov     rax, [rbx+8]                                                   ; +0x1aa, 0x18011c06a\nmov     ecx, [rax+110B0h]                                              ; +0x1ae, 0x18011c06e\nmovsxd  rax, dword ptr [rbx+0A8h]                                      ; +0x1b4, 0x18011c074\nlea     rcx, [rax+rcx*2]                                               ; +0x1bb, 0x18011c07b\nimul    rcx, 158h                                                      ; +0x1bf, 0x18011c07f\nlea     rax, unk_1801F2A50                                             ; +0x1c6, 0x18011c086\nadd     rcx, rax                                                       ; +0x1cd, 0x18011c08d\ncall    sub_1800B8560                                                  ; +0x1d0, 0x18011c090\nmov     rax, [rbx+8]                                                   ; +0x1d5, 0x18011c095\nxor     edx, edx                                                       ; +0x1d9, 0x18011c099\nmov     ecx, [rax+110B0h]                                              ; +0x1db, 0x18011c09b\nmovsxd  rax, dword ptr [rbx+0A8h]                                      ; +0x1e1, 0x18011c0a1\nlea     rcx, [rax+rcx*2]                                               ; +0x1e8, 0x18011c0a8\nmov     rcx, rva qword_1801F40D0[r12+rcx*8]; lpCriticalSection         ; +0x1ec, 0x18011c0ac\ncall    FMOD_OS_CriticalSection_Free                                   ; +0x1f4, 0x18011c0b4\nmov     rax, [rbx+8]                                                   ; +0x1f9, 0x18011c0b9\nmov     edx, [rax+110B0h]                                              ; +0x1fd, 0x18011c0bd\nmovsxd  rax, dword ptr [rbx+0A8h]                                      ; +0x203, 0x18011c0c3\nlea     r8, [rax+rdx*2]                                                ; +0x20a, 0x18011c0ca\nmov     rva qword_1801F40D0[r12+r8*8], r15                             ; +0x20e, 0x18011c0ce\nmov     rcx, rbx                                                       ; +0x216, 0x18011c0d6\ncall    sub_18011CAC0                                                  ; +0x219, 0x18011c0d9\nmov     rcx, r14                                                       ; +0x21e, 0x18011c0de\nmov     ebx, eax                                                       ; +0x221, 0x18011c0e1\ncall    FMOD_OS_CriticalSection_Leave                                  ; +0x223, 0x18011c0e3\nmov     eax, ebx                                                       ; +0x228, 0x18011c0e8\nmov     rbx, [rsp+38h+arg_18]                                          ; +0x22a, 0x18011c0ea\nadd     rsp, 20h                                                       ; +0x22f, 0x18011c0ef\npop     r15                                                            ; +0x233, 0x18011c0f3\npop     r14                                                            ; +0x235, 0x18011c0f5\npop     r12                                                            ; +0x237, 0x18011c0f7\nretn                                                                   ; +0x239, 0x18011c0f9", "xrefs": ["<???> @ 0x18016e168", "<???> @ 0x180191780", "<???> @ 0x1801917b4", "<???> @ 0x180202168"], "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"}