//
// X509_check_email from 0x10829e0 to 0x1082ab4 (212 bytes)
//
// 2 xrefs:
// > sub_10687F4 @ 0x10688a0
// > ??> @ 0x4bd60
//
// 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:17:11 +0000
//
__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_1080FE8(a1, a2, v6, v8, 1, nullptr);
}
if ( a3 <= 1 )
{
if ( !memchr(a2, 0, 1u) )
{
v6 = 1;
v8 = a4;
return sub_1080FE8(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_1080FE8(a1, a2, v6, v8, 1, nullptr);
}
}
}
return 4294967294LL;
}