//
// sub_E4030 from 0xe4030 to 0xe4090 (96 bytes)
//
// 1 xrefs:
// > sub_78B30 @ 0x7a094
//
// 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_E4030(__int64 result, int a2, _BYTE *a3)
{
unsigned int v3; // w8
int v4; // w10
int v5; // w12
unsigned int v6; // w11
v3 = 0;
while ( (int)v3 < a2 - 2 )
{
v4 = (char)*a3;
if ( !*a3 )
break;
++a3;
if ( v4 < 0 )
{
v6 = v3 + 1;
*(_BYTE *)(result + v3) = ((unsigned __int8)v4 >> 6) | 0xC0;
v5 = 2;
LOBYTE(v4) = v4 & 0x3F | 0x80;
}
else
{
v5 = 1;
v6 = v3;
}
v3 += v5;
*(_BYTE *)(result + (int)v6) = v4;
}
*(_BYTE *)(result + v3) = 0;
return result;
}