//
// sub_1006A6100 from 0x1006a6100 to 0x1006a6254 (340 bytes)
//
// 3 xrefs:
// > sub_10069BB60 @ 0x10069bc50
// > sub_10069DE0C @ 0x10069df14
// > sub_10069F558 @ 0x10069f65c
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 11:11:42 +0000
//
__int64 __fastcall sub_1006A6100(__int64 a1, const char *a2, size_t a3)
{
__int64 result; // x0
int v7; // w8
__int64 v8; // x24
char **v9; // x26
const char *v10; // x1
size_t v11; // x22
int v12; // w23
__uint32_t v13; // w0
bool v14; // cf
char *v16; // t1
if ( !a3 )
return 3;
if ( *(_BYTE *)(a1 + 24) )
{
*(_BYTE *)(a1 + 24) = 0;
*(_DWORD *)(a1 + 16) = 0;
}
if ( sub_10068DB34(a2, "*", a3) )
{
result = 0;
v7 = -33;
goto LABEL_6;
}
v8 = 0;
v9 = &off_1009B2308;
v10 = "LOGIN";
while ( 1 )
{
v11 = (size_t)*(v9 - 2);
if ( v11 > a3 || memcmp(a2, v10, (size_t)*(v9 - 2)) )
goto LABEL_23;
if ( v11 == a3 )
break;
v12 = (unsigned __int8)a2[v11];
if ( a2[v11] < 0 )
v13 = __maskrune((unsigned __int8)a2[v11], 0x8000u);
else
v13 = _DefaultRuneLocale.__runetype[(unsigned __int8)a2[v11]] & 0x8000;
if ( v12 != 95 )
{
v14 = v12 != 45 && (unsigned int)(v12 - 48) >= 0xA;
if ( v14 && v13 == 0 )
goto LABEL_26;
}
LABEL_23:
++v8;
v16 = *v9;
v9 += 3;
v10 = v16;
if ( v8 == 9 )
return 3;
}
v11 = a3;
LABEL_26:
if ( v11 != a3 )
return 3;
result = 0;
v7 = *(_DWORD *)(a1 + 16) | LODWORD((&off_1009B22F0)[3 * v8 + 2]);
LABEL_6:
*(_DWORD *)(a1 + 16) = v7;
return result;
}