{"type": "func", "start": 6443319616, "end": 6443319884, "name": "sub_1800D4140", "pseudocode": "// \n// sub_1800D4140 from 0x1800d4140 to 0x1800d424c (268 bytes)\n// \n// 5 xrefs:\n// > sub_1800E7460 @ 0x1800e74f6\n// > <???> @ 0x18018bf9c\n// > <???> @ 0x18018bfe8\n// > <???> @ 0x18018bff8\n// > <???> @ 0x1801fed3c\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:10 +0000\n// \n\n__int64 __fastcall sub_1800D4140(__int64 a1)\n{\n  struct _RTL_CRITICAL_SECTION *v2; // r15\n  int v3; // eax\n  int v4; // edi\n  int v5; // ebp\n  __int64 v6; // rsi\n  __int64 v7; // rdx\n  __int64 v8; // rcx\n  __int64 v9; // rdx\n\n  v2 = *(struct _RTL_CRITICAL_SECTION **)(*(_QWORD *)(a1 + 24) + 400LL);\n  FMOD_OS_CriticalSection_Enter(v2);\n  sub_1800D6960(a1 + 272);\n  v3 = *(_DWORD *)(a1 + 44);\n  v4 = 0;\n  v5 = 0;\n  if ( v3 > 0 )\n  {\n    v6 = 0;\n    do\n    {\n      sub_1800D5F40(a1 + 272);\n      v3 = *(_DWORD *)(a1 + 44);\n      v6 += 4;\n      ++v5;\n    }\n    while ( v5 < v3 );\n  }\n  if ( v3 > 0 )\n  {\n    v7 = 0;\n    do\n    {\n      v7 += 4;\n      ++v4;\n      v8 = *(_QWORD *)(a1 + 64) + *(int *)(v7 + *(_QWORD *)(a1 + 48) - 4);\n      *(_QWORD *)(v8 + 72) = *(_QWORD *)(a1 + 80);\n      *(_QWORD *)(a1 + 80) = v8;\n    }\n    while ( v4 < *(_DWORD *)(a1 + 44) );\n  }\n  *(_BYTE *)(*(_QWORD *)(a1 + 24) + 8LL) = 1;\n  if ( !*(_BYTE *)(a1 + 312) )\n  {\n    v9 = *(_QWORD *)(a1 + 24);\n    *(_BYTE *)(a1 + 312) = 1;\n    *(_QWORD *)(a1 + 304) = *(_QWORD *)(v9 + 432);\n    *(_QWORD *)(v9 + 432) = a1;\n  }\n  FMOD_OS_CriticalSection_Leave(v2);\n  return 0;\n}", "assembly": "; \n; sub_1800D4140 from 0x1800d4140 to 0x1800d424c (268 bytes)\n; \n; 5 xrefs:\n; > sub_1800E7460 @ 0x1800e74f6\n; > <???> @ 0x18018bf9c\n; > <???> @ 0x18018bfe8\n; > <???> @ 0x18018bff8\n; > <???> @ 0x1801fed3c\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:10 +0000\n; \npush    rbx                                                            ; +0x0, 0x1800d4140\npush    r15                                                            ; +0x2, 0x1800d4142\nsub     rsp, 38h                                                       ; +0x4, 0x1800d4144\nmov     rax, [rcx+18h]                                                 ; +0x8, 0x1800d4148\nmov     rbx, rcx                                                       ; +0xc, 0x1800d414c\nmov     [rsp+48h+arg_0], rbp                                           ; +0xf, 0x1800d414f\nmov     [rsp+48h+arg_10], rdi                                          ; +0x14, 0x1800d4154\nmov     [rsp+48h+var_18], r14                                          ; +0x19, 0x1800d4159\nmov     r15, [rax+190h]                                                ; +0x1e, 0x1800d415e\nmov     rcx, r15                                                       ; +0x25, 0x1800d4165\nmovaps  [rsp+48h+var_28], xmm6                                         ; +0x28, 0x1800d4168\nmovaps  xmm6, xmm1                                                     ; +0x2d, 0x1800d416d\ncall    FMOD_OS_CriticalSection_Enter                                  ; +0x30, 0x1800d4170\nmovaps  xmm1, xmm6                                                     ; +0x35, 0x1800d4175\nlea     rcx, [rbx+110h]                                                ; +0x38, 0x1800d4178\ncall    sub_1800D6960                                                  ; +0x3f, 0x1800d417f\nmov     eax, [rbx+2Ch]                                                 ; +0x44, 0x1800d4184\nxor     edi, edi                                                       ; +0x47, 0x1800d4187\nmovaps  xmm6, [rsp+48h+var_28]                                         ; +0x49, 0x1800d4189\nmov     ebp, edi                                                       ; +0x4e, 0x1800d418e\ntest    eax, eax                                                       ; +0x50, 0x1800d4190\njle     short loc_1800D41CA                                            ; +0x52, 0x1800d4192\nmov     [rsp+48h+arg_8], rsi                                           ; +0x54, 0x1800d4194\nmov     esi, edi                                                       ; +0x59, 0x1800d4199\nnop     dword ptr [rax+rax+00h]                                        ; +0x5b, 0x1800d419b\nmov     rax, [rbx+30h]                                                 ; +0x60, 0x1800d41a0\nlea     rcx, [rbx+110h]                                                ; +0x64, 0x1800d41a4\nmovsxd  rdx, dword ptr [rsi+rax]                                       ; +0x6b, 0x1800d41ab\nadd     rdx, [rbx+40h]                                                 ; +0x6f, 0x1800d41af\ncall    sub_1800D5F40                                                  ; +0x73, 0x1800d41b3\nmov     eax, [rbx+2Ch]                                                 ; +0x78, 0x1800d41b8\nlea     rsi, [rsi+4]                                                   ; +0x7b, 0x1800d41bb\ninc     ebp                                                            ; +0x7f, 0x1800d41bf\ncmp     ebp, eax                                                       ; +0x81, 0x1800d41c1\njl      short loc_1800D41A0                                            ; +0x83, 0x1800d41c3\nmov     rsi, [rsp+48h+arg_8]                                           ; +0x85, 0x1800d41c5\nmov     r14, [rsp+48h+var_18]                                          ; +0x8a, 0x1800d41ca\nmov     rbp, [rsp+48h+arg_0]                                           ; +0x8f, 0x1800d41cf\ntest    eax, eax                                                       ; +0x94, 0x1800d41d4\njle     short loc_1800D4204                                            ; +0x96, 0x1800d41d6\nmov     rdx, rdi                                                       ; +0x98, 0x1800d41d8\nnop     dword ptr [rax+rax+00h]                                        ; +0x9b, 0x1800d41db\nmov     rax, [rbx+30h]                                                 ; +0xa0, 0x1800d41e0\nlea     rdx, [rdx+4]                                                   ; +0xa4, 0x1800d41e4\ninc     edi                                                            ; +0xa8, 0x1800d41e8\nmovsxd  rcx, dword ptr [rdx+rax-4]                                     ; +0xaa, 0x1800d41ea\nadd     rcx, [rbx+40h]                                                 ; +0xaf, 0x1800d41ef\nmov     rax, [rbx+50h]                                                 ; +0xb3, 0x1800d41f3\nmov     [rcx+48h], rax                                                 ; +0xb7, 0x1800d41f7\nmov     [rbx+50h], rcx                                                 ; +0xbb, 0x1800d41fb\ncmp     edi, [rbx+2Ch]                                                 ; +0xbf, 0x1800d41ff\njl      short loc_1800D41E0                                            ; +0xc2, 0x1800d4202\nmov     rax, [rbx+18h]                                                 ; +0xc4, 0x1800d4204\nmov     rdi, [rsp+48h+arg_10]                                          ; +0xc8, 0x1800d4208\nmov     byte ptr [rax+8], 1                                            ; +0xcd, 0x1800d420d\ncmp     byte ptr [rbx+138h], 0                                         ; +0xd1, 0x1800d4211\njnz     short loc_1800D423A                                            ; +0xd8, 0x1800d4218\nmov     rdx, [rbx+18h]                                                 ; +0xda, 0x1800d421a\nmov     byte ptr [rbx+138h], 1                                         ; +0xde, 0x1800d421e\nmov     rax, [rdx+1B0h]                                                ; +0xe5, 0x1800d4225\nmov     [rbx+130h], rax                                                ; +0xec, 0x1800d422c\nmov     [rdx+1B0h], rbx                                                ; +0xf3, 0x1800d4233\nmov     rcx, r15                                                       ; +0xfa, 0x1800d423a\ncall    FMOD_OS_CriticalSection_Leave                                  ; +0xfd, 0x1800d423d\nxor     eax, eax                                                       ; +0x102, 0x1800d4242\nadd     rsp, 38h                                                       ; +0x104, 0x1800d4244\npop     r15                                                            ; +0x108, 0x1800d4248\npop     rbx                                                            ; +0x10a, 0x1800d424a\nretn                                                                   ; +0x10b, 0x1800d424b", "xrefs": ["sub_1800E7460 @ 0x1800e74f6", "<???> @ 0x18018bf9c", "<???> @ 0x18018bfe8", "<???> @ 0x18018bff8", "<???> @ 0x1801fed3c"], "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"}