//
// sub_180112460 from 0x180112460 to 0x1801124ce (110 bytes)
//
// 2 xrefs:
// > sub_180113070 @ 0x1801131a2
// > ??> @ 0x180201c1c
//
// 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:35 +0000
//
__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;
}