//
// sub_1800D11B0 from 0x1800d11b0 to 0x1800d12e7 (311 bytes)
//
// 3 xrefs:
// > sub_1800E2FB0 @ 0x1800e2ff8
// > sub_1800E5B50 @ 0x1800e5b92
// > ??> @ 0x1801feb50
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 10:54:09 +0000
//
__int64 __fastcall sub_1800D11B0(__int64 a1, __int64 a2)
{
__int64 result; // rax
__int64 v4; // rax
__int64 v5; // rsi
void *v6; // rax
__int64 v7; // rdx
__int64 v8; // r8
_QWORD *v9; // rcx
if ( *(_BYTE *)(a1 + 408) )
return 0;
*(_QWORD *)a1 = a2;
result = FMOD_OS_CriticalSection_Create((struct _RTL_CRITICAL_SECTION **)(a1 + 400), 0);
if ( !(_DWORD)result )
{
*(_QWORD *)(a1 + 392) = a1;
result = FMOD_OS_CriticalSection_Create((struct _RTL_CRITICAL_SECTION **)(a1 + 384), 0);
if ( !(_DWORD)result )
{
v4 = *(_QWORD *)(a1 + 392);
v5 = *(unsigned int *)(*(_QWORD *)v4 + 480LL);
v6 = sub_1800B6880(
*((_QWORD *)off_1801AED20 + 52),
(unsigned int)(*(_DWORD *)(*(_QWORD *)v4 + 480LL) << 6),
"C:\\buildagent1\\work\\570ad728b1678096\\core_api\\src\\fmod_geometry_mgr.cpp",
82,
0);
*(_QWORD *)(a1 + 352) = v6;
if ( !v6 )
return 38;
if ( (_DWORD)v5 )
{
v7 = 0;
v8 = v5;
do
{
*(_DWORD *)(*(_QWORD *)(a1 + 352) + v7 + 24) = 0;
v9 = (_QWORD *)(v7 + *(_QWORD *)(a1 + 352));
v7 += 64;
v9[1] = v9;
*v9 = v9;
v9[2] = 0;
--v8;
}
while ( v8 );
}
result = sub_1800B8690(a1 + 16, "FMOD geometry thread", 0, 0, 6, 0, 0, **(_QWORD **)(a1 + 392), 1);
if ( !(_DWORD)result )
{
*(_BYTE *)(a1 + 408) = 1;
return 0;
}
}
}
return result;
}