//
// sub_10064A2A0 from 0x10064a2a0 to 0x10064a3c6 (294 bytes)
//
// 1 xrefs:
// > ??> @ 0x100985f90
//
// 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_10064A2A0(char *a1)
{
char *v2; // rax
char *v3; // rdi
__int64 v4; // rcx
unsigned __int64 v5; // r13
char *v6; // r12
char *v7; // rcx
char *v8; // rax
_BYTE *v9; // r12
void *__src[2]; // [rsp+0h] [rbp-40h] BYREF
*(_OWORD *)__src = 0;
v2 = a1;
while ( 1 )
{
while ( 1 )
{
do
{
v3 = v2;
v4 = (unsigned __int8)*v2++;
}
while ( (a7_0[v4] & 1) == 0 );
if ( (_DWORD)v4 != 38 )
break;
v2 = sub_100649B00(v3, (const void **)__src);
}
if ( !(_DWORD)v4 )
break;
if ( (_DWORD)v4 == 60 )
{
if ( __src[0] )
{
if ( __src[0] > v3 )
sub_1007CE1F0();
v5 = (unsigned __int64)__src[1];
v6 = v2;
memmove((void *)((char *)__src[0] - (char *)__src[1]), __src[0], v3 - (char *)__src[0]);
v2 = v6;
v3 -= v5;
}
do
{
v7 = v3;
if ( v3 <= a1 )
break;
--v3;
}
while ( (a7_0[(unsigned __int8)*(v7 - 1)] & 8) != 0 );
v3 = v2;
goto LABEL_18;
}
}
v8 = v3;
if ( __src[0] )
{
if ( __src[0] > v3 )
sub_1007CE1C0();
v9 = __src[1];
memmove((void *)((char *)__src[0] - (char *)__src[1]), __src[0], v3 - (char *)__src[0]);
v8 = (char *)(v3 - v9);
}
do
{
v7 = v8;
if ( v8 <= a1 )
break;
--v8;
}
while ( (a7_0[(unsigned __int8)*(v7 - 1)] & 8) != 0 );
LABEL_18:
*v7 = 0;
return v3;
}