//
// sub_B77174 from 0xb77174 to 0xb77278 (260 bytes)
//
// 6 xrefs:
// > sub_B787B0 @ 0xb78af8
// > sub_B7A0E0 @ 0xb7a39c
// > sub_B7A0E0 @ 0xb7aac4
// > sub_B7A0E0 @ 0xb7b430
// > sub_B7A0E0 @ 0xb7b494
// > sub_BABFB0 @ 0xbac850
//
// 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_B77174(char *a1)
{
const char *v1; // x19
int v2; // w0
int v3; // t1
int v4; // w0
int v5; // t1
char *v6; // x20
signed __int64 v7; // x20
size_t v8; // x21
char *v9; // x0
v1 = a1;
v2 = (unsigned __int8)*a1;
if ( v2 != 58 )
{
do
{
if ( !v2 )
break;
v3 = *(unsigned __int8 *)++v1;
v2 = v3;
}
while ( v3 != 58 );
}
if ( v2 )
{
v4 = *(unsigned __int8 *)++v1;
if ( v4 )
{
do
{
if ( !isspace(v4) )
break;
v5 = *(unsigned __int8 *)++v1;
v4 = v5;
}
while ( v5 );
}
}
v6 = strchr(v1, 13);
if ( !v6 )
{
v6 = strchr(v1, 10);
if ( !v6 )
{
v6 = strchr(v1, 0);
if ( !v6 )
return v6;
}
}
if ( v6 > v1 )
{
do
{
if ( !isspace((unsigned __int8)*v6) )
break;
--v6;
}
while ( v6 != v1 );
}
v7 = v6 - v1;
v8 = v7 + 1;
v9 = (char *)off_1231000(v7 + 2);
v6 = v9;
if ( !v9 )
return v6;
memcpy(v9, v1, v8);
v6[v8] = 0;
return v6;
}