{"type": "func", "start": 6443317952, "end": 6443318173, "name": "sub_1800D3AC0", "pseudocode": "// \n// sub_1800D3AC0 from 0x1800d3ac0 to 0x1800d3b9d (221 bytes)\n// \n// 2 xrefs:\n// > FMOD::Geometry::setPolygonAttributes @ 0x1800a46bf\n// > <???> @ 0x1801fed00\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_1800D3AC0(__int64 a1, int a2, float a3, float a4, char a5)\n{\n  __int64 v6; // rdi\n  struct _RTL_CRITICAL_SECTION *v7; // rsi\n  __int64 v8; // r8\n  int v9; // ecx\n  unsigned int v10; // eax\n  int v11; // ecx\n  __int64 v12; // rcx\n  unsigned int v13; // ebx\n\n  v6 = a2;\n  v7 = *(struct _RTL_CRITICAL_SECTION **)(*(_QWORD *)(a1 + 24) + 400LL);\n  FMOD_OS_CriticalSection_Enter(v7);\n  if ( (int)v6 < 0 || (int)v6 >= *(_DWORD *)(a1 + 44) )\n  {\n    v13 = 31;\n  }\n  else\n  {\n    v8 = *(_QWORD *)(a1 + 64) + *(int *)(*(_QWORD *)(a1 + 48) + 4 * v6);\n    v9 = *(_DWORD *)(v8 + 184);\n    v10 = v9 & 0xFFFEFFFF;\n    *(float *)(v8 + 176) = a3;\n    v11 = v9 | 0x10000;\n    *(float *)(v8 + 180) = a4;\n    if ( !a5 )\n      v11 = v10;\n    *(_DWORD *)(v8 + 184) = v11;\n    *(_BYTE *)(*(_QWORD *)(a1 + 24) + 8LL) = 1;\n    if ( !*(_BYTE *)(a1 + 312) )\n    {\n      v12 = *(_QWORD *)(a1 + 24);\n      *(_BYTE *)(a1 + 312) = 1;\n      *(_QWORD *)(a1 + 304) = *(_QWORD *)(v12 + 432);\n      *(_QWORD *)(v12 + 432) = a1;\n    }\n    v13 = 0;\n  }\n  FMOD_OS_CriticalSection_Leave(v7);\n  return v13;\n}", "assembly": "; \n; sub_1800D3AC0 from 0x1800d3ac0 to 0x1800d3b9d (221 bytes)\n; \n; 2 xrefs:\n; > FMOD::Geometry::setPolygonAttributes @ 0x1800a46bf\n; > <???> @ 0x1801fed00\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; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x1800d3ac0\nmov     [rsp+arg_8], rsi                                               ; +0x5, 0x1800d3ac5\npush    rdi                                                            ; +0xa, 0x1800d3aca\nsub     rsp, 40h                                                       ; +0xb, 0x1800d3acb\nmov     rax, [rcx+18h]                                                 ; +0xf, 0x1800d3acf\nmov     rbx, rcx                                                       ; +0x13, 0x1800d3ad3\nmovaps  [rsp+48h+var_18], xmm6                                         ; +0x16, 0x1800d3ad6\nmovaps  xmm6, xmm3                                                     ; +0x1b, 0x1800d3adb\nmovaps  [rsp+48h+var_28], xmm7                                         ; +0x1e, 0x1800d3ade\nmovaps  xmm7, xmm2                                                     ; +0x23, 0x1800d3ae3\nmovsxd  rdi, edx                                                       ; +0x26, 0x1800d3ae6\nmov     rsi, [rax+190h]                                                ; +0x29, 0x1800d3ae9\nmov     rcx, rsi                                                       ; +0x30, 0x1800d3af0\ncall    FMOD_OS_CriticalSection_Enter                                  ; +0x33, 0x1800d3af3\ntest    edi, edi                                                       ; +0x38, 0x1800d3af8\njs      short loc_1800D3B74                                            ; +0x3a, 0x1800d3afa\ncmp     edi, [rbx+2Ch]                                                 ; +0x3c, 0x1800d3afc\njge     short loc_1800D3B74                                            ; +0x3f, 0x1800d3aff\nmov     rax, [rbx+30h]                                                 ; +0x41, 0x1800d3b01\nmovsxd  r8, dword ptr [rax+rdi*4]                                      ; +0x45, 0x1800d3b05\nadd     r8, [rbx+40h]                                                  ; +0x49, 0x1800d3b09\nmov     ecx, [r8+0B8h]                                                 ; +0x4d, 0x1800d3b0d\nmov     eax, ecx                                                       ; +0x54, 0x1800d3b14\nbtr     eax, 10h                                                       ; +0x56, 0x1800d3b16\nmovss   dword ptr [r8+0B0h], xmm7                                      ; +0x5a, 0x1800d3b1a\nbts     ecx, 10h                                                       ; +0x63, 0x1800d3b23\nmovss   dword ptr [r8+0B4h], xmm6                                      ; +0x67, 0x1800d3b27\ncmp     [rsp+48h+arg_20], 0                                            ; +0x70, 0x1800d3b30\ncmovz   ecx, eax                                                       ; +0x75, 0x1800d3b35\nmov     [r8+0B8h], ecx                                                 ; +0x78, 0x1800d3b38\nmov     rax, [rbx+18h]                                                 ; +0x7f, 0x1800d3b3f\nmov     byte ptr [rax+8], 1                                            ; +0x83, 0x1800d3b43\ncmp     byte ptr [rbx+138h], 0                                         ; +0x87, 0x1800d3b47\njnz     short loc_1800D3B70                                            ; +0x8e, 0x1800d3b4e\nmov     rcx, [rbx+18h]                                                 ; +0x90, 0x1800d3b50\nmov     byte ptr [rbx+138h], 1                                         ; +0x94, 0x1800d3b54\nmov     rax, [rcx+1B0h]                                                ; +0x9b, 0x1800d3b5b\nmov     [rbx+130h], rax                                                ; +0xa2, 0x1800d3b62\nmov     [rcx+1B0h], rbx                                                ; +0xa9, 0x1800d3b69\nxor     ebx, ebx                                                       ; +0xb0, 0x1800d3b70\njmp     short loc_1800D3B79                                            ; +0xb2, 0x1800d3b72\nmov     ebx, 1Fh                                                       ; +0xb4, 0x1800d3b74\nmov     rcx, rsi                                                       ; +0xb9, 0x1800d3b79\ncall    FMOD_OS_CriticalSection_Leave                                  ; +0xbc, 0x1800d3b7c\nmov     rsi, [rsp+48h+arg_8]                                           ; +0xc1, 0x1800d3b81\nmov     eax, ebx                                                       ; +0xc6, 0x1800d3b86\nmov     rbx, [rsp+48h+arg_0]                                           ; +0xc8, 0x1800d3b88\nmovaps  xmm6, [rsp+48h+var_18]                                         ; +0xcd, 0x1800d3b8d\nmovaps  xmm7, [rsp+48h+var_28]                                         ; +0xd2, 0x1800d3b92\nadd     rsp, 40h                                                       ; +0xd7, 0x1800d3b97\npop     rdi                                                            ; +0xdb, 0x1800d3b9b\nretn                                                                   ; +0xdc, 0x1800d3b9c", "xrefs": ["FMOD::Geometry::setPolygonAttributes @ 0x1800a46bf", "<???> @ 0x1801fed00"], "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"}