//
// sub_E4030 from 0xe4030 to 0xe4090 (96 bytes)
//
// 1 xrefs:
// > sub_78B30 @ 0x7a094
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__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;
}