//
// sub_84D7D0 from 0x84d7d0 to 0x84d88c (188 bytes)
//
// 3 xrefs:
// > sub_846884 @ 0x846962
// > sub_8488C0 @ 0x8489b6
// > sub_84A2BC @ 0x84a392
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:02:29 +0000
//
int __fastcall sub_84D7D0(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_C75930;
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_C75930)[3 * v7 + 2];
if ( !v15 )
return 3;
*(_DWORD *)(a1 + 12) |= v15;
return result;
}