//
// sub_E84E94 from 0xe84e94 to 0xe84f40 (172 bytes)
//
// 1 xrefs:
// > sub_E85338 @ 0xe853cc
//
// 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:48 +0000
//
__int64 __fastcall sub_E84E94(__int64 a1, __int64 a2, __int64 a3, unsigned int a4)
{
__int64 v4; // x4
__int64 v5; // x5
__int64 v6; // x19
__int64 v8; // x6
__int64 v9; // x21
__int64 result; // x0
__int64 v11; // x3
__int64 v12; // x0
unsigned int v13; // w20
__int64 v14; // [xsp+38h] [xbp+38h]
v4 = a2;
v5 = a3;
v6 = *(_QWORD *)(a1 + 584);
v8 = a4;
v9 = v6 + 16;
if ( !*(_DWORD *)(v6 + 96) )
{
v9 = v6 + 16;
v14 = a4;
result = (*(__int64 (**)(void))(*(_QWORD *)(a1 + 592) + 24LL))();
if ( !(_DWORD)result )
return result;
v8 = v14;
v5 = a3;
v4 = a2;
*(_DWORD *)(v6 + 96) = 1;
}
v11 = *(_QWORD *)(a1 + 600);
v12 = a1;
v13 = *(_DWORD *)(a1 + 428);
(*(void (__fastcall **)(__int64, __int64, __int64, _QWORD, __int64, __int64, __int64))(v11 + 8))(
v12,
v9,
v6 + 100,
v13,
v4,
v5,
v8);
result = *(unsigned int *)(v6 + 100);
if ( v13 <= (unsigned int)result )
{
*(_DWORD *)(v6 + 96) = 0;
*(_DWORD *)(v6 + 100) = 0;
}
return result;
}