//
// sub_BF5F4 from 0xbf5f4 to 0xbf676 (130 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 11:41:48 +0000
//
int __fastcall sub_BF5F4(int **a1)
{
int *v1; // r6
int v3; // r0
int v4; // r5
_DWORD *v5; // r1
v1 = *a1;
if ( !*a1 )
return 0;
v3 = v1[7];
if ( !v3 || (v4 = sub_85CA8(v3, v1[4], v1[1], *v1, v1[5])) == 0 && (v4 = j_FMOD_OS_File_Close(v1[7])) == 0 )
{
v5 = (_DWORD *)v1[6];
if ( v5 )
{
sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), v5);
v1[6] = 0;
}
v4 = 0;
if ( *a1 )
{
sub_BD7AC(*(int *)((char *)&dword_14C + (_DWORD)off_E8000), *a1);
*a1 = nullptr;
}
}
return v4;
}