//
// sub_5CCF8 from 0x5ccf8 to 0x5cdc4 (204 bytes)
//
// 1 xrefs:
// > sub_5D2B8 @ 0x5d2f4
//
// 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_5CCF8(__int64 a1, __int64 a2)
{
__int64 result; // x0
__int64 v4; // x20
__int64 v5; // x0
char v6; // [xsp+0h] [xbp-20h]
*(_QWORD *)(a1 + 376) = a2;
result = FMOD_OS_CriticalSection_Create(a1 + 368, 0);
if ( !(_DWORD)result )
{
v4 = *(unsigned int *)(**(_QWORD **)(a1 + 376) + 480LL);
v5 = sub_E2AC4(
*(__int64 *)((char *)&qword_1B0 + (_QWORD)off_114000),
(unsigned int)((_DWORD)v4 << 6),
"../../src/fmod_geometry_mgr.cpp",
82,
0);
*(_QWORD *)(a1 + 336) = v5;
if ( v5 )
{
for ( ; v4; v5 += 64 )
{
*(_DWORD *)(v5 + 24) = 0;
*(_QWORD *)v5 = v5;
*(_QWORD *)(v5 + 8) = v5;
*(_QWORD *)(v5 + 16) = 0;
--v4;
}
v6 = 1;
return sub_E42FC(a1, "FMOD geometry thread", 0, 0, 6, 0, 0, **(_QWORD **)(a1 + 376), v6);
}
else
{
return 38;
}
}
return result;
}