//
// sub_E8008 from 0xe8008 to 0xe8090 (136 bytes)
//
// 1 xrefs:
// > sub_E817C @ 0xe8278
//
// 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:15:00 +0000
//
__int64 __fastcall sub_E8008(__int64 a1, __int64 *a2, __int64 a3, unsigned int a4)
{
__int64 v4; // x21
int v7; // w9
unsigned int v9; // [xsp+Ch] [xbp-14h]
v4 = *a2;
((void (__fastcall *)(__int64 *, __int64, _QWORD))a2[1])(a2, a3, a4);
if ( *(_DWORD *)(v4 + 28) >= a4 )
{
sub_E694C();
atomic_store(v9, (unsigned int *)(v4 + 20));
return 0;
}
else
{
v7 = dword_156088;
if ( dword_156088 <= (int)a4 )
v7 = a4;
dword_156088 = v7;
((void (__fastcall *)(__int64 *))a2[6])(a2);
return 1;
}
}