//
// sub_B74C00 from 0xb74c00 to 0xb74d20 (288 bytes)
//
// 3 xrefs:
// > sub_B74D20 @ 0xb754ec
// > sub_B74D20 @ 0xb75654
// > sub_B74D20 @ 0xb7595c
//
// 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_B74C00(const char *a1)
{
const char *v1; // x0
char *v2; // x19
size_t v3; // x21
char *v4; // x2
int v5; // w0
bool v6; // zf
char *result; // x0
size_t v8; // x2
v1 = off_1231018(a1);
v2 = (char *)v1;
if ( !v1 )
return v2;
v3 = strlen(v1);
if ( *v2 != 34 )
{
if ( v3 )
goto LABEL_4;
goto LABEL_9;
}
v8 = v3--;
memmove(v2, v2 + 1, v8);
if ( !v3 )
{
LABEL_9:
if ( *v2 != 47 )
goto LABEL_11;
return v2;
}
LABEL_4:
v4 = &v2[v3 - 1];
v5 = (unsigned __int8)*v4;
if ( v5 != 34 )
{
if ( *v2 == 47 )
goto LABEL_6;
LABEL_11:
off_1231008(v2);
return off_1231018((const char *)&word_F2A0A8);
}
v2[v3 - 1] = 0;
if ( *v2 != 47 )
goto LABEL_11;
result = v2;
if ( v3 == 1 )
return result;
v4 = &v2[v3 - 2];
v5 = (unsigned __int8)*v4;
LABEL_6:
v6 = v5 == 47;
result = v2;
if ( v6 )
*v4 = 0;
return result;
}