//
// sub_9E808 from 0x9e808 to 0x9e898 (144 bytes)
//
// 1 xrefs:
// > sub_9E3A4 @ 0x9e3e8
//
// 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:28 +0000
//
__int64 __fastcall sub_9E808(__int64 a1, __int64 a2, int a3, _DWORD *a4)
{
__int64 result; // x0
int v9; // w23
int v10; // w22
char v13; // [xsp+Ch] [xbp-24h]
result = sub_9DA24(a1, nullptr);
if ( !(_DWORD)result )
{
v9 = 0;
v10 = a3 - 1;
while ( 1 )
{
result = sub_9E8C4(*(_QWORD *)(a1 + 368));
if ( (_DWORD)result )
break;
if ( v13 != 10 && v13 != 13 && v9 < v10 )
*(_BYTE *)(a2 + v9++) = v13;
if ( sub_9E5F0(a1, v13) )
{
if ( a4 )
*a4 = v9;
*(_BYTE *)(a2 + v9) = 0;
return 0;
}
}
}
return result;
}