//
// sub_180112460 from 0x180112460 to 0x1801124ce (110 bytes)
//
// 2 xrefs:
// > sub_180113070 @ 0x1801131a2
// > ??> @ 0x180201c1c
//
// 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_180112460(__int64 a1)
{
struct _RTL_CRITICAL_SECTION *v1; // rbp
int v3; // ebx
unsigned int v4; // esi
v1 = *(struct _RTL_CRITICAL_SECTION **)(a1 + 32);
FMOD_OS_CriticalSection_Enter(v1);
v3 = 0;
if ( *(int *)(a1 + 56) <= 0 )
{
LABEL_4:
*(_DWORD *)(a1 + 56) = 0;
v4 = 0;
}
else
{
while ( 1 )
{
v4 = sub_1800C14F0(*(void **)(a1 + 40));
if ( v4 )
break;
if ( ++v3 >= *(_DWORD *)(a1 + 56) )
goto LABEL_4;
}
}
FMOD_OS_CriticalSection_Leave(v1);
return v4;
}