//
// sub_E7B464 from 0xe7b464 to 0xe7b57c (280 bytes)
//
// 5 xrefs:
// > sub_E7B828 @ 0xe7bb9c
// > sub_E7BBB8 @ 0xe7bd94
// > sub_E7BDC0 @ 0xe7be68
// > sub_E7BE78 @ 0xe7c078
// > sub_E7C088 @ 0xe7c2dc
//
// 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 13:10:42 +0000
//
__int64 __fastcall sub_E7B464(__int64 a1)
{
__int64 v2; // x23
int v3; // w0
__int64 *v4; // x21
_DWORD *v5; // x22
int v6; // w20
__int64 v7; // x4
_QWORD *v8; // x0
__int64 result; // x0
void (__fastcall *v10)(__int64); // x2
v2 = *(_QWORD *)(a1 + 624);
if ( !(*(unsigned int (**)(void))(*(_QWORD *)(a1 + 616) + 16LL))() )
{
v10 = **(void (__fastcall ***)(__int64))a1;
*(_DWORD *)(*(_QWORD *)a1 + 40LL) = 25;
v10(a1);
}
v3 = *(_DWORD *)(a1 + 448);
if ( v3 > 0 )
{
v4 = (__int64 *)(a1 + 456);
v5 = (_DWORD *)(v2 + 44);
v6 = 0;
while ( 1 )
{
v7 = *v4;
if ( !*(_DWORD *)(a1 + 316) )
break;
if ( *(_DWORD *)(a1 + 540) )
goto LABEL_10;
if ( !*(_DWORD *)(a1 + 548) )
break;
LABEL_12:
++v6;
++v4;
++v5;
if ( v3 <= v6 )
goto LABEL_13;
}
v8 = *(_QWORD **)(v2 + 8 * (*(int *)(v7 + 20) + 10LL));
*v8 = 0;
v8[1] = 0;
v8[2] = 0;
v8[3] = 0;
v8[4] = 0;
v8[5] = 0;
v8[6] = 0;
v8[7] = 0;
*v5 = 0;
LODWORD(v8) = *(_DWORD *)(a1 + 316);
v5[4] = 0;
if ( (_DWORD)v8 )
{
if ( !*(_DWORD *)(a1 + 540) )
goto LABEL_11;
}
else if ( !*(_DWORD *)(a1 + 568) )
{
LABEL_11:
v3 = *(_DWORD *)(a1 + 448);
goto LABEL_12;
}
LABEL_10:
memset(*(void **)(v2 + 8 * (*(int *)(v7 + 24) + 26LL)), 0, 0x100u);
goto LABEL_11;
}
LABEL_13:
result = *(unsigned int *)(a1 + 372);
*(_QWORD *)(v2 + 24) = 0;
*(_QWORD *)(v2 + 32) = 0;
*(_DWORD *)(v2 + 40) = -16;
*(_DWORD *)(v2 + 76) = result;
return result;
}