//
// sub_DC0808 from 0xdc0808 to 0xdc090c (260 bytes)
//
// 2 xrefs:
// > sub_DCBC04 @ 0xdcbf78
// > sub_DCBC04 @ 0xdccb90
//
// 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:08:47 +0000
//
_BYTE *__fastcall sub_DC0808(unsigned __int8 *a1)
{
char *v1; // x1
_BYTE *v2; // x19
__int64 v3; // x21
int v4; // w3
__int64 v5; // x21
char *v6; // x0
_BYTE *v7; // x21
__int64 v9; // x21
char *v10; // x0
_BYTE *v11; // x21
v1 = nullptr;
v2 = a1;
v3 = 0;
v4 = *a1;
while ( 1 )
{
if ( (byte_11AECC0[v4] & 1) == 0 )
goto LABEL_3;
if ( v4 == 60 )
break;
if ( v4 == 13 )
{
v4 = (unsigned __int8)v2[1];
*v2 = 10;
if ( v4 == 10 )
{
if ( v1 )
memmove(&v1[-v3], v1, v2 + 1 - v1);
v1 = v2 + 2;
v4 = (unsigned __int8)v2[2];
++v3;
v2 += 2;
}
else
{
++v2;
}
}
else
{
if ( !v4 )
{
if ( v1 )
{
v9 = -v3;
v10 = &v1[v9];
v11 = &v2[v9];
memmove(v10, v1, v2 - v1);
}
else
{
v11 = v2;
}
*v11 = 0;
return v2;
}
LABEL_3:
v4 = (unsigned __int8)*++v2;
}
}
if ( v1 )
{
v5 = -v3;
v6 = &v1[v5];
v7 = &v2[v5];
memmove(v6, v1, v2 - v1);
}
else
{
v7 = v2;
}
*v7 = 0;
return v2 + 1;
}