//
// FMOD_OS_File_Open from 0xc0074 to 0xc014a (214 bytes)
//
// 1 xrefs:
// > j_FMOD_OS_File_Open @ 0xe2e18
//
// 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 FMOD_OS_File_Open(int a1, int a2, int a3, unsigned __int64 **a4)
{
unsigned __int64 *v8; // r6
unsigned __int64 *v9; // r0
_DWORD *v10; // r1
_BOOL4 v11; // r1
int v12; // r0
int v13; // r0
int v14; // r5
if ( sub_BF6CC(a1) )
{
v8 = nullptr;
v9 = sub_BD410(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), 8u, "../android/src/fmod_os_misc.cpp", 0x91u, 0, 0);
if ( !v9 )
goto LABEL_10;
v10 = &off_E629C;
}
else
{
v11 = sub_BF994(a1);
v12 = *(int *)((char *)&dword_14C + (_DWORD)off_E8000);
if ( v11 )
{
v8 = nullptr;
v9 = sub_BD410(v12, 8u, "../android/src/fmod_os_misc.cpp", 0x98u, 0, 0);
if ( !v9 )
goto LABEL_10;
v10 = &off_E62A0;
}
else
{
v8 = nullptr;
v9 = sub_BD410(v12, 8u, "../android/src/fmod_os_misc.cpp", 0x9Du, 0, 0);
if ( !v9 )
goto LABEL_10;
v10 = &off_E62A4;
}
}
v8 = v9;
*(_DWORD *)v9 = *v10 + 8;
LABEL_10:
if ( v8 )
{
v13 = (*(int (__fastcall **)(unsigned __int64 *, int, int, int))(*(_DWORD *)v8 + 8))(v8, a1, a3, a2);
if ( !v13 )
{
v14 = 0;
*a4 = v8;
return v14;
}
v14 = v13;
sub_C0170(v8, "../android/src/fmod_os_misc.cpp", 169);
}
else
{
v14 = 38;
}
*a4 = nullptr;
return v14;
}