//
// sub_E4458 from 0xe4458 to 0xe4548 (240 bytes)
//
// 11 xrefs:
// > sub_51E88 @ 0x51e98
// > sub_5CDC4 @ 0x5cdd4
// > sub_6A544 @ 0x6a6ac
// > sub_83108 @ 0x83124
// > sub_83108 @ 0x83130
// > sub_86F74 @ 0x870fc
// > sub_D769C @ 0xd76bc
// > sub_D769C @ 0xd76cc
// > sub_DFAA0 @ 0xdfacc
// > sub_E91E4 @ 0xe91f4
// > sub_EA03C @ 0xea090
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 12:14:58 +0000
//
__int64 __fastcall sub_E4458(__int64 a1)
{
__int64 v2; // x0
__int64 result; // x0
__int64 v4; // x0
__int64 v5; // x0
__int64 v6; // x0
void (__fastcall *v7)(__int64, __int64, __int64, __int64, __int64); // x8
__int64 *v8; // x9
__int64 v9; // x2
__int64 v10; // x4
__int64 v11; // x3
if ( !*(_BYTE *)(a1 + 280) )
return 0;
if ( *(_BYTE *)(a1 + 281) )
*(_BYTE *)(a1 + 280) = 0;
v2 = *(_QWORD *)(a1 + 296);
if ( !v2 || (result = sub_E71C0(v2), !(_DWORD)result) )
{
result = sub_E71A8(*(_QWORD *)(a1 + 304));
if ( !(_DWORD)result )
{
v4 = *(_QWORD *)(a1 + 296);
if ( v4 )
{
result = sub_E7174(v4);
if ( (_DWORD)result )
return result;
*(_QWORD *)(a1 + 296) = 0;
}
result = sub_E7174(*(_QWORD *)(a1 + 304));
if ( !(_DWORD)result )
{
v5 = *(_QWORD *)(a1 + 264);
*(_QWORD *)(a1 + 304) = 0;
result = FMOD_OS_Thread_Destroy(v5);
if ( !(_DWORD)result )
{
if ( *(_QWORD *)(a1 + 312) )
{
v6 = sub_E45E0();
if ( !v7 || (*((_BYTE *)v8 + 465) & 2) == 0 )
goto LABEL_22;
v9 = *(_QWORD *)(a1 + 264);
v10 = *v8;
v11 = a1 + 8;
}
else
{
v7 = *(void (__fastcall **)(__int64, __int64, __int64, __int64, __int64))((char *)&off_18
+ (_QWORD)off_114000);
if ( !v7 || (*((_BYTE *)&qword_20 + (_QWORD)off_114000 + 1) & 2) == 0 )
goto LABEL_22;
v9 = *(_QWORD *)(a1 + 264);
v10 = *(__int64 *)((char *)&qword_28 + (_QWORD)off_114000);
v11 = a1 + 8;
v6 = 0;
}
v7(v6, 512, v9, v11, v10);
LABEL_22:
*(_QWORD *)(a1 + 264) = 0;
*(_QWORD *)(a1 + 272) = 0;
return 0;
}
}
}
}
return result;
}