//
// sub_51EF4 from 0x51ef4 to 0x51f94 (160 bytes)
//
// 1 xrefs:
// > sub_51FA4 @ 0x52068
//
// 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_51EF4(__int64 a1, int a2)
{
__int64 result; // x0
_BYTE v4[256]; // [xsp+10h] [xbp-110h] BYREF
*(_DWORD *)(a1 + 368) = a2;
result = FMOD_OS_CriticalSection_Create(a1 + 360, 0);
if ( !(_DWORD)result )
{
sub_E3FC8(v4, 256, "FMOD nonblocking thread (%d)", *(_DWORD *)(a1 + 368));
result = sub_E42FC(a1, v4, sub_51A54, a1, 4, 1, 0, 0, 1);
if ( !(_DWORD)result )
*((_QWORD *)off_114000 + *(int *)(a1 + 368) + 40) = *(_QWORD *)(a1 + 272);
}
return result;
}