//
// sub_1003AEF28 from 0x1003aef28 to 0x1003aefe0 (184 bytes)
//
// 1 xrefs:
// > ??> @ 0x10080e0a0
//
// 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
//
unsigned __int64 __fastcall sub_1003AEF28(unsigned __int8 *a1)
{
unsigned __int8 *v2; // x8
unsigned __int64 v3; // x19
int v4; // w9
int v5; // t1
unsigned __int64 v6; // x0
_BYTE *v7; // x8
unsigned __int64 v8; // x0
char *v10[2]; // [xsp+0h] [xbp-30h] BYREF
v10[0] = nullptr;
v10[1] = nullptr;
v2 = a1;
while ( 1 )
{
do
{
v3 = (unsigned __int64)v2;
v5 = *v2++;
v4 = v5;
}
while ( (byte_100645E7D[v5] & 1) == 0 );
if ( !v4 )
break;
if ( v4 == 60 )
{
v6 = sub_1003AE928(v10, v3++);
do
{
v7 = (_BYTE *)v6;
if ( v6 <= (unsigned __int64)a1 )
break;
--v6;
}
while ( (byte_100645E7D[(unsigned __int8)*(v7 - 1)] & 8) != 0 );
goto LABEL_12;
}
}
v8 = sub_1003AE928(v10, v3);
do
{
v7 = (_BYTE *)v8;
if ( v8 <= (unsigned __int64)a1 )
break;
--v8;
}
while ( (byte_100645E7D[(unsigned __int8)*(v7 - 1)] & 8) != 0 );
LABEL_12:
*v7 = 0;
return v3;
}