//
// sub_1800BEE10 from 0x1800bee10 to 0x1800beed0 (192 bytes)
//
// 2 xrefs:
// > _cfltcvt_init_0 @ 0x1800bf24a
// > ??> @ 0x1801fd914
//
// 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_1800BEE10(_DWORD **a1)
{
__int64 v1; // rbx
void *v3; // rcx
__int64 result; // rax
_DWORD *v5; // rdx
v1 = (__int64)*a1;
if ( !*a1 )
return 0;
v3 = *(void **)(v1 + 48);
if ( !v3
|| (result = sub_18003B250(v3), !(_DWORD)result)
&& (result = FMOD_OS_File_Close(*(_QWORD *)(v1 + 48)), !(_DWORD)result) )
{
v5 = *(_DWORD **)(v1 + 40);
if ( v5 )
{
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), v5);
*(_QWORD *)(v1 + 40) = 0;
}
if ( *a1 )
{
sub_1800B6AA0(*((_QWORD *)off_1801AED20 + 52), *a1);
*a1 = nullptr;
}
return 0;
}
return result;
}