//
// sub_100577910 from 0x100577910 to 0x100577994 (132 bytes)
//
// 1 xrefs:
// > ??> @ 0x10082e618
//
// 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
//
size_t __fastcall sub_100577910(__int64 a1, const char **a2)
{
const char *i; // x20
int v4; // w8
size_t result; // x0
unsigned __int64 v6; // x11
for ( i = (const char *)(a1 + 2); ; ++i )
{
v4 = *(unsigned __int8 *)i;
if ( v4 != 9 && v4 != 32 )
break;
}
result = strlen(i);
if ( result )
{
while ( 1 )
{
v6 = (unsigned __int8)i[result - 1];
if ( v6 > 0x20 || ((1LL << v6) & 0x100002600LL) == 0 )
break;
if ( !--result )
goto LABEL_13;
}
i[result] = 0;
}
LABEL_13:
*a2 = i;
return result;
}