//
// sub_E0093C from 0xe0093c to 0xe00a44 (264 bytes)
//
// 1 xrefs:
// > ??> @ 0x1239750
//
// 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 sub_E0093C(__int64 a1, unsigned int *a2, int a3)
{
unsigned int v3; // w3
__int64 result; // x0
unsigned int v5; // w4
unsigned __int64 v6; // x2
__int64 ext; // x0
if ( a3 )
{
if ( (*((_QWORD *)a2 + 26) & 0x400000002LL) == 2 )
{
return 0;
}
else
{
v6 = a2[52];
if ( (v6 & 1) != 0 )
{
return (v6 >> 4) & 1;
}
else
{
result = 3;
if ( (a2[52] & 0x2040) != 0x2040 )
{
result = 4;
if ( (v6 & 2) == 0 )
{
result = 0;
if ( (v6 & 8) != 0 )
{
if ( (a2[55] & 7) != 0 )
return 5;
else
return 0;
}
}
}
}
}
}
else
{
v3 = a2[52];
if ( (v3 & 2) == 0 || (v5 = a2[53], result = 0, (v5 & 0xFFFFFF3F) == 0) && (v5 & 0xC0) != 0 )
{
result = 0;
if ( (v3 & 4) != 0 && a2[54] == 64 )
{
if ( (X509_get_ext_by_NID((__int64)a2) & 0x80000000) != 0 )
{
return 1;
}
else
{
ext = X509_get_ext((__int64)a2);
return X509_EXTENSION_get_critical(ext);
}
}
}
}
return result;
}