//
// sub_1800D0FF0 from 0x1800d0ff0 to 0x1800d10a9 (185 bytes)
//
// 2 xrefs:
// > sub_1800E2620 @ 0x1800e2cdd
// > ??> @ 0x1801feb38
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__int64 __fastcall sub_1800D0FF0(__int64 a1)
{
__int64 result; // rax
struct _RTL_CRITICAL_SECTION *v3; // rcx
_DWORD *v4; // rdx
if ( !*(_BYTE *)(a1 + 408) )
return 0;
result = sub_1800B8560(a1 + 16);
if ( (_DWORD)result )
return result;
v3 = *(struct _RTL_CRITICAL_SECTION **)(a1 + 384);
if ( v3 )
{
result = FMOD_OS_CriticalSection_Free(v3, 0);
if ( (_DWORD)result )
return result;
*(_QWORD *)(a1 + 384) = 0;
}
v4 = *(_DWORD **)(a1 + 352);
if ( v4 )
{
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), v4);
*(_QWORD *)(a1 + 352) = 0;
}
result = FMOD_OS_CriticalSection_Free(*(LPCRITICAL_SECTION *)(a1 + 400), 0);
if ( !(_DWORD)result )
{
*(_QWORD *)(a1 + 400) = 0;
*(_BYTE *)(a1 + 408) = 0;
return 0;
}
return result;
}