//
// sub_E6FDB0 from 0xe6fdb0 to 0xe6ff20 (368 bytes)
//
// 1 xrefs:
// > ??> @ 0x1227b98
//
// 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
//
_DWORD *__fastcall sub_E6FDB0(__int64 a1, __int64 a2, unsigned int *a3)
{
int v4; // w19
__int64 v5; // x0
_DWORD *v6; // x26
__int64 *v7; // x25
bool v8; // cc
int v9; // w1
__int64 v10; // x0
__int64 v11; // x0
const char *v12; // x21
_QWORD *v13; // x20
v4 = 0;
v5 = BASIC_CONSTRAINTS_new();
v6 = (_DWORD *)v5;
if ( v5 )
{
v7 = (__int64 *)(v5 + 8);
while ( 2 )
{
v8 = v4 < (int)OPENSSL_sk_num(a3);
v9 = v4;
v10 = (__int64)a3;
if ( v8 )
{
while ( 1 )
{
v11 = OPENSSL_sk_value(v10, v9);
v12 = *(const char **)(v11 + 8);
v13 = (_QWORD *)v11;
++v4;
if ( strcmp(v12, "CA") )
break;
if ( !(unsigned int)X509V3_get_value_bool((__int64)v13, v6) )
goto LABEL_8;
v8 = v4 < (int)OPENSSL_sk_num(a3);
v9 = v4;
v10 = (__int64)a3;
if ( !v8 )
return v6;
}
if ( !strcmp(v12, "pathlen") )
{
if ( (unsigned int)X509V3_get_value_int((__int64)v13, v7) )
continue;
}
else
{
ERR_put_error(34, 102, 106, (__int64)"crypto/x509v3/v3_bcons.c", 75);
ERR_add_error_data(6, "section:", *v13, ",name:", v13[1], ",value:", v13[2]);
}
LABEL_8:
BASIC_CONSTRAINTS_free((__int64)v6);
return nullptr;
}
else
{
return v6;
}
}
}
else
{
ERR_put_error(34, 102, 65, (__int64)"crypto/x509v3/v3_bcons.c", 63);
return nullptr;
}
}