//
// sub_E39F4 from 0xe39f4 to 0xe3a7c (136 bytes)
//
// 3 xrefs:
// > sub_E0F84 @ 0xe1edc
// > sub_E0F84 @ 0xe1f48
// > sub_E0F84 @ 0xe2434
//
// 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:14:58 +0000
//
__int64 __fastcall sub_E39F4(int a1, _BYTE *a2, int a3)
{
__int64 result; // x0
unsigned int v6; // w21
unsigned int v7; // w22
char v8[4]; // [xsp+Ch] [xbp-24h] BYREF
result = 31;
if ( a2 && a3 )
{
v6 = 0;
v7 = a3 - 1;
*a2 = 0;
while ( v6 < v7 )
{
v8[0] = 0;
result = sub_E3964(a1, v8, 1);
if ( (_DWORD)result )
return result;
if ( v8[0] != 13 )
{
if ( v8[0] == 10 )
break;
a2[v6++] = v8[0];
}
}
a2[v6] = 0;
return 0;
}
return result;
}