//
// sub_828B4 from 0x828b4 to 0x8295c (168 bytes)
//
// 2 xrefs:
// > sub_642B8 @ 0x82f3c
// > sub_642B8 @ 0x82f50
//
// 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_828B4(__int64 a1, __int64 a2, int a3)
{
int v5; // w21
__int64 v6; // x0
__int64 result; // x0
v5 = a2;
v6 = sub_E2908(
*(__int64 *)((char *)&qword_1B0 + (_QWORD)off_114000),
a2,
"../../src/fmod_profile_client.cpp",
82,
0,
0,
1);
*(_QWORD *)a1 = v6;
if ( !v6 )
return 38;
*(_DWORD *)(a1 + 8) = v5;
*(_QWORD *)(a1 + 12) = 0;
*(_QWORD *)(a1 + 17) = 0;
*(_DWORD *)(a1 + 64) = a3;
result = FMOD_OS_CriticalSection_Create(a1 + 32, 0);
if ( !(_DWORD)result )
{
result = sub_E70FC(a1 + 40);
if ( !(_DWORD)result )
{
result = sub_E70FC(a1 + 48);
if ( !(_DWORD)result )
*(_QWORD *)(a1 + 56) = 0;
}
}
return result;
}