//
// sub_E24A04 from 0xe24a04 to 0xe24b44 (320 bytes)
//
// 3 xrefs:
// > sub_E1B8F8 @ 0xe1ba6c
// > sub_E1DCB4 @ 0xe1de4c
// > sub_E1FE00 @ 0xe1ff54
//
// 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 13:09:48 +0000
//
__int64 __fastcall sub_E24A04(__int64 a1, char *a2, size_t a3)
{
__int64 result; // x0
const char *v7; // x1
size_t *v8; // x19
__int64 v9; // x23
size_t v10; // x20
int v11; // w20
int v12; // w1
if ( !a3 )
return 3;
if ( *(_BYTE *)(a1 + 24) )
{
*(_BYTE *)(a1 + 24) = 0;
*(_DWORD *)(a1 + 16) = 0;
if ( !strncmp(a2, "*", a3) )
goto LABEL_5;
}
else if ( !strncmp(a2, "*", a3) )
{
LABEL_5:
*(_DWORD *)(a1 + 16) = -33;
return 0;
}
v7 = "LOGIN";
v8 = (size_t *)&unk_13FC7C8;
v9 = 0;
while ( 1 )
{
v10 = *v8;
v8 += 3;
if ( a3 < v10 )
goto LABEL_15;
result = memcmp(a2, v7, v10);
if ( (_DWORD)result )
goto LABEL_15;
if ( a3 == v10 )
break;
v11 = (unsigned __int8)a2[v10];
if ( !isupper(v11) && (unsigned int)(v11 - 48) > 9 && v11 != 45 && v11 != 95 )
return 3;
LABEL_15:
v7 = (const char *)*(v8 - 1);
v9 = (unsigned int)(v9 + 1);
if ( !v7 )
return 3;
}
v12 = (int)(&off_13FC7C0)[3 * v9 + 2];
if ( !v12 )
return 3;
*(_DWORD *)(a1 + 16) |= v12;
return result;
}