//
// X509_check_email from 0xe046a0 to 0xe04774 (212 bytes)
//
// 2 xrefs:
// > sub_DEA4B4 @ 0xdea560
// > ??> @ 0x33570
//
// 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
//
__int64 __fastcall X509_check_email(__int64 a1, const char *a2, unsigned __int64 a3, int a4)
{
unsigned __int64 v6; // x19
size_t v7; // x0
int v8; // w3
unsigned __int64 v9; // x2
unsigned __int64 v11; // x21
v6 = a3;
if ( a2 )
{
if ( !a3 )
{
v7 = strlen(a2);
v6 = v7;
v8 = a4;
if ( v7 > 1 )
{
v9 = v7 - 1;
goto LABEL_5;
}
return sub_E02CA8(a1, a2, v6, v8, 1, nullptr);
}
if ( a3 <= 1 )
{
if ( !memchr(a2, 0, 1u) )
{
v6 = 1;
v8 = a4;
return sub_E02CA8(a1, a2, v6, v8, 1, nullptr);
}
}
else
{
v11 = a3 - 1;
if ( !memchr(a2, 0, a3 - 1) )
{
v9 = v11;
v8 = a4;
LABEL_5:
if ( !a2[v9] )
v6 = v9;
return sub_E02CA8(a1, a2, v6, v8, 1, nullptr);
}
}
}
return 4294967294LL;
}