//
// sub_E9E06C from 0xe9e06c to 0xe9e0f8 (140 bytes)
//
// 2 xrefs:
// > sub_E9E288 @ 0xe9e378
// > sub_E9E288 @ 0xe9e380
//
// 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:11:05 +0000
//
__int64 __fastcall sub_E9E06C(__int64 result, __int64 a2, __int64 a3, int a4)
{
__int64 v4; // x13
int v5; // w15
int v6; // w8
__int64 i; // x9
__int64 v8; // x7
_BYTE *v9; // x10
_BYTE *v10; // x11
char v11; // w4
__int64 v12; // x5
__int64 v13; // x6
v4 = 0;
v5 = *(_DWORD *)(result + 136);
v6 = *(_DWORD *)(result + 144);
for ( i = *(_QWORD *)(*(_QWORD *)(result + 656) + 48LL); a4 > (int)v4; ++v4 )
{
v8 = *(_QWORD *)(a2 + 8 * v4);
v9 = *(_BYTE **)(a3 + 8 * v4);
if ( v5 )
{
v10 = &v9[v5 - 1 + 1];
do
{
result = 0;
v11 = 0;
if ( v6 > 0 )
{
do
{
v12 = *(unsigned __int8 *)(v8 + result);
v13 = *(_QWORD *)(i + 8 * result++);
v11 += *(_BYTE *)(v13 + v12);
}
while ( v6 > (int)result );
v8 += (unsigned int)(v6 - 1) + 1LL;
}
*v9++ = v11;
}
while ( v9 != v10 );
}
}
return result;
}