//
// sub_6B990 from 0x6b990 to 0x6ba40 (176 bytes)
//
// 2 xrefs:
// > FMOD::SystemI::createClientProfile @ 0x56be2
// > sub_58CA8 @ 0x5949a
//
// 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
//
int __fastcall sub_6B990(int a1)
{
int v2; // r0
int v3; // r1
int v4; // r2
_DWORD *v5; // r5
int v6; // r0
int v7; // r6
int v9; // [sp+10h] [bp-20h] BYREF
int v10; // [sp+14h] [bp-1Ch] BYREF
v2 = sub_BD410(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), 116, "../../src/fmod_profile_remotefile.cpp", 123);
if ( !v2 )
return 38;
v5 = (_DWORD *)v2;
v10 = sub_6BA50(v2, v3, v4);
v6 = sub_BD410(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), 65568, "../../src/fmod_profile_remotefile.cpp", 131);
v5[5] = v6;
if ( v6 )
{
v9 = v6;
v5[6] = 0;
v5[27] = 0;
v5[28] = 0;
v5[8] = 0;
v5[9] = 0;
v5[10] = 1;
v5[4] = a1;
v7 = j_FMOD_OS_CriticalSection_Create(v5 + 7, 0);
if ( !v7 )
{
v7 = (*(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)a1 + 4))(a1, v5);
if ( !v7 )
{
v7 = 0;
v9 = 0;
v10 = 0;
}
}
sub_62B40(&v9);
}
else
{
v7 = 38;
}
sub_6BA98(&v10);
return v7;
}