//
// sub_E1EA5C from 0xe1ea5c to 0xe1eaec (144 bytes)
//
// 1 xrefs:
// > ??> @ 0x13fc6b8
//
// 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:45 +0000
//
size_t __fastcall sub_E1EA5C(__int64 a1, const char **a2)
{
const char *v2; // x19
int v3; // w0
int v4; // t1
size_t result; // x0
int v6; // w2
v2 = (const char *)(a1 + 4);
v3 = *(unsigned __int8 *)(a1 + 4);
if ( v3 != 9 )
goto LABEL_3;
do
{
do
{
v4 = *(unsigned __int8 *)++v2;
v3 = v4;
}
while ( v4 == 9 );
LABEL_3:
;
}
while ( v3 == 32 );
for ( result = strlen(v2); result; --result )
{
v6 = (unsigned __int8)v2[result - 1];
if ( v6 != 32 && v6 != 13 && (unsigned __int8)(v6 - 9) > 1u )
{
v2[result] = 0;
break;
}
}
*a2 = v2;
return result;
}