//
// sub_1003AE210 from 0x1003ae210 to 0x1003ae278 (104 bytes)
//
// 1 xrefs:
// > ??> @ 0x10080e000
//
// 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 __int8 *__fastcall sub_1003AE210(unsigned __int8 *a1, unsigned __int8 a2)
{
unsigned __int8 *v2; // x19
int v3; // w10
int v4; // t1
_QWORD v6[2]; // [xsp+0h] [xbp-20h] BYREF
v6[0] = 0;
v6[1] = 0;
while ( 1 )
{
do
{
v2 = a1;
v4 = *a1++;
v3 = v4;
}
while ( (byte_100645E7D[v4] & 2) == 0 );
if ( v3 == a2 )
break;
if ( !v3 )
return nullptr;
}
*(_BYTE *)sub_1003AE928(v6, v2) = 0;
return v2 + 1;
}