//
// AccountRegisterLayer::validEmail from 0x14007b6c0 to 0x14007b76e (174 bytes)
//
// 3 xrefs:
// > AccountRegisterLayer::onSubmit @ 0x14007a80b
// > AccountRegisterLayer::textInputClosed @ 0x14007aedc
// > ??> @ 0x1406c6798
//
// 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
//
_BOOL8 __fastcall AccountRegisterLayer::validEmail(__int64 a1, _QWORD *a2)
{
_BYTE *v3; // rcx
int v4; // r10d
int v5; // r8d
__int64 v6; // rdx
unsigned int v7; // eax
bool v8; // bl
v3 = a2;
if ( a2[3] > 0xFu )
v3 = (_BYTE *)*a2;
if ( !v3 || (unsigned __int8)(*v3 - 97) > 0x19u && (unsigned __int8)(*v3 - 65) > 0x19u )
goto LABEL_18;
v4 = -1;
v5 = -1;
v6 = -1;
do
++v6;
while ( v3[v6] );
v7 = 0;
if ( !(_DWORD)v6 )
goto LABEL_18;
do
{
if ( *v3 == 64 )
{
v4 = v7;
}
else if ( *v3 == 46 )
{
v5 = v7;
}
++v7;
++v3;
}
while ( v7 < (unsigned int)v6 );
if ( v4 == -1 || v5 == -1 || v4 > v5 )
{
LABEL_18:
sub_14003A830((__int64)a2);
return 0;
}
else
{
v8 = v5 < (int)v6 - 1;
sub_14003A830((__int64)a2);
return v8;
}
}