//
// sub_63D750 from 0x63d750 to 0x63d80c (188 bytes)
//
// 3 xrefs:
// > sub_636804 @ 0x6368e2
// > sub_638840 @ 0x638936
// > sub_63A23C @ 0x63a312
//
// 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_63D750(int a1, char *a2, size_t a3)
{
int result; // r0
int v7; // r7
char **v8; // r5
const char *v9; // r1
int v10; // r10
const char *v11; // t1
size_t v12; // r4
int v13; // r3
bool v14; // zf
unsigned int v15; // r3
if ( !a3 )
return 3;
if ( *(_BYTE *)(a1 + 20) )
{
*(_BYTE *)(a1 + 20) = 0;
*(_DWORD *)(a1 + 12) = 0;
if ( !strncmp(a2, "*", a3) )
{
LABEL_5:
*(_DWORD *)(a1 + 12) = -33;
return 0;
}
}
else if ( !strncmp(a2, "*", a3) )
{
goto LABEL_5;
}
v7 = 0;
v8 = &off_A2D4A8;
v9 = "LOGIN";
v10 = ctype_;
while ( 1 )
{
v12 = (size_t)v8[1];
if ( a3 < v12 )
goto LABEL_8;
result = memcmp(a2, v9, (size_t)v8[1]);
if ( result )
goto LABEL_8;
if ( a3 == v12 )
break;
v13 = (unsigned __int8)a2[v12];
if ( (*(_BYTE *)(v10 + v13 + 1) & 1) == 0 && (unsigned int)(v13 - 48) > 9 )
{
v14 = v13 == 45;
if ( v13 != 45 )
v14 = v13 == 95;
if ( !v14 )
return 3;
}
LABEL_8:
v11 = v8[3];
v8 += 3;
v9 = v11;
++v7;
if ( !v11 )
return 3;
}
v15 = (unsigned int)(&off_A2D4A8)[3 * v7 + 2];
if ( !v15 )
return 3;
*(_DWORD *)(a1 + 12) |= v15;
return result;
}