//
// sub_E381C4 from 0xe381c4 to 0xe38270 (172 bytes)
//
// 0 xrefs:
//
// 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:09:58 +0000
//
__int64 __fastcall sub_E381C4(__int64 result, __int64 a2, unsigned __int64 a3)
{
__int64 v3; // x23
unsigned __int64 i; // x24
const void *v7; // x1
__int64 v8; // x0
size_t v9; // x19
void *v10; // x0
__int64 v11; // x19
v3 = result;
for ( i = 0; a3 > i; result = sub_E379F4((int *)v3) )
{
while ( 1 )
{
v7 = (const void *)(a2 + i);
v8 = *(_BYTE *)(v3 + 96) & 0x3F;
v9 = 64 - v8;
v10 = (void *)(v3 + v8 + 32);
if ( a3 - i <= v9 )
v9 = a3 - i;
i += v9;
memcpy(v10, v7, v9);
result = ((_BYTE)v9 + *(_BYTE *)(v3 + 96)) & 0x3F;
v11 = *(_QWORD *)(v3 + 24) + 8 * v9;
*(_BYTE *)(v3 + 96) = result;
*(_QWORD *)(v3 + 24) = v11;
if ( !(_DWORD)result )
break;
if ( a3 <= i )
return result;
}
}
return result;
}