//
// sub_E3A630 from 0xe3a630 to 0xe3a6f8 (200 bytes)
//
// 17 xrefs:
// > sub_E322B0 @ 0xe32350
// > sub_E322B0 @ 0xe32378
// > sub_E322B0 @ 0xe32444
// > sub_E327AC @ 0xe327f8
// > sub_E327AC @ 0xe32820
// > sub_E329C0 @ 0xe329e0
// > lws_service_fd @ 0xe32b74
// > lws_service_fd @ 0xe32e30
// > lws_callback_on_writable @ 0xe33360
// > sub_E33648 @ 0xe33698
// > lws_write @ 0xe33b04
// > sub_E34F88 @ 0xe35230
// > sub_E34F88 @ 0xe35380
// > sub_E34F88 @ 0xe35454
// > sub_E3744C @ 0xe374f8
// > sub_E3744C @ 0xe37824
// > sub_E3744C @ 0xe378cc
//
// 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:00 +0000
//
__int64 __fastcall sub_E3A630(__int64 a1, unsigned int a2, __int64 a3, int a4)
{
__int64 v4; // x24
__int64 *v8; // x19
unsigned int v9; // w21
int v10; // w22
__int64 v11; // x23
__int64 (__fastcall *v12)(__int64, _QWORD, __int64, _QWORD, __int64, __int64, __int64); // x23
__int64 context; // x0
int v14; // w0
if ( *(_BYTE *)(a1 + 64) )
{
v4 = a4;
v8 = (__int64 *)(a1 + 16);
v9 = 0;
v10 = 0;
while ( 1 )
{
v11 = *v8++;
++v10;
v12 = *(__int64 (__fastcall **)(__int64, _QWORD, __int64, _QWORD, __int64, __int64, __int64))(v11 + 8);
context = lws_get_context(a1);
v14 = v12(context, *(v8 - 1), a1, a2, v8[2], a3, v4);
if ( (int)v9 < v14 )
v9 = v14;
if ( v14 < 0 )
break;
if ( *(unsigned __int8 *)(a1 + 64) <= v10 )
return v9;
}
return 0xFFFFFFFFLL;
}
else
{
return 0;
}
}