//
// sub_6366F0 from 0x6366f0 to 0x6367e2 (242 bytes)
//
// 2 xrefs:
// > sub_636E70 @ 0x63750c
// > sub_6378F4 @ 0x637d32
//
// 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
//
int __fastcall sub_6366F0(_DWORD *a1)
{
_DWORD *v2; // r3
int v3; // r2
char *v4; // r3
int v5; // r4
int result; // r0
const char *v7; // r6
int v8; // r3
int v9; // r4
const char *v10; // r1
int v11; // r8
int v12; // t1
size_t v13; // r4
char *v14; // r0
char *v15; // r8
int v16; // r3
char *v17; // r1
bool v18; // zf
int v19; // t1
int v20; // r3
v2 = *(_DWORD **)(*a1 + 332);
v3 = v2[7];
if ( v3 )
{
v4 = (char *)v2[8];
if ( !v4 )
v4 = &byte_9B1912;
v5 = sub_636178((int)a1, "%s%s", v3, (int)v4);
goto LABEL_5;
}
v7 = (const char *)v2[1];
if ( v7 )
{
v8 = *(unsigned __int8 *)v7;
if ( !*v7 )
goto LABEL_29;
v9 = 0;
v10 = v7;
v11 = 0;
do
{
if ( v8 == 92 )
{
++v11;
}
else if ( v8 == 34 )
{
++v9;
}
v12 = *(unsigned __int8 *)++v10;
v8 = v12;
}
while ( v12 );
if ( v11 | v9 )
{
v13 = v9 + v11 + strlen(v7);
v14 = (char *)off_ABAEAC(v13 + 1);
v15 = v14;
if ( !v14 )
return 27;
v16 = *(unsigned __int8 *)v7;
v17 = v14;
if ( *v7 )
{
do
{
v18 = v16 == 92;
if ( v16 != 92 )
v18 = v16 == 34;
if ( v18 )
*v17++ = 92;
*v17++ = *v7;
v19 = *(unsigned __int8 *)++v7;
v16 = v19;
}
while ( v19 );
}
v20 = 0;
v14[v13] = 0;
}
else
{
LABEL_29:
v15 = off_ABAEB8(v7);
}
}
else
{
v15 = off_ABAEB8(&byte_9B1912);
}
if ( !v15 )
return 27;
v5 = sub_636178((int)a1, "LIST \"%s\" *", (int)v15, v20);
off_ABAEB0(v15);
LABEL_5:
result = v5;
if ( !v5 )
a1[286] = 7;
return result;
}