//
// sub_1003AEE34 from 0x1003aee34 to 0x1003aef28 (244 bytes)
//
// 1 xrefs:
// > ??> @ 0x10080e098
//
// 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
//
char *__fastcall sub_1003AEE34(char *a1)
{
char *v2; // x19
int v3; // w8
int v4; // t1
__int64 v5; // x23
void *__src; // [xsp+0h] [xbp-40h] BYREF
__int64 v8; // [xsp+8h] [xbp-38h]
__src = nullptr;
v8 = 0;
do
{
while ( 1 )
{
while ( 1 )
{
do
{
v2 = a1;
v4 = (unsigned __int8)*a1++;
v3 = v4;
}
while ( (byte_100645E7D[v4] & 1) == 0 );
if ( v3 <= 37 )
break;
if ( v3 == 38 )
{
a1 = sub_1003AE978(v2, (__int64)&__src);
}
else if ( v3 == 60 )
{
goto LABEL_17;
}
}
if ( v3 != 13 )
break;
*v2 = 10;
if ( v2[1] == 10 )
{
if ( __src )
{
if ( a1 < __src )
sub_10062F710();
v5 = v8;
memmove((char *)__src - v8, __src, a1 - (_BYTE *)__src);
}
else
{
v5 = v8;
}
a1 = v2 + 2;
__src = v2 + 2;
v8 = v5 + 1;
}
}
}
while ( v3 );
a1 = v2;
LABEL_17:
*(_BYTE *)sub_1003AE928((char **)&__src, (unsigned __int64)v2) = 0;
return a1;
}