//
// sub_8592E4 from 0x8592e4 to 0x85946c (392 bytes)
//
// 1 xrefs:
// > ??> @ 0xab4214
//
// 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_8592E4(int a1, int a2, _DWORD *a3)
{
_DWORD *v4; // r11
signed int v5; // r4
int v6; // r0
const char *v7; // r6
_DWORD *v8; // r5
v4 = POLICY_CONSTRAINTS_new();
if ( v4 )
{
v5 = 0;
while ( v5 < OPENSSL_sk_num((int)a3) )
{
v6 = OPENSSL_sk_value(a3, v5++);
v7 = *(const char **)(v6 + 4);
v8 = (_DWORD *)v6;
if ( !strcmp(v7, "requireExplicitPolicy") )
{
if ( !X509V3_get_value_int(v8, v4) )
goto LABEL_8;
}
else
{
if ( strcmp(v7, "inhibitPolicyMapping") )
{
ERR_put_error(34, 146, 106, (int)"crypto/x509v3/v3_pcons.c", 76);
ERR_add_error_data(6, "section:", *v8, ",name:", v8[1], ",value:", v8[2]);
LABEL_8:
POLICY_CONSTRAINTS_free(v4);
return nullptr;
}
if ( !X509V3_get_value_int(v8, v4 + 1) )
goto LABEL_8;
}
}
if ( !v4[1] && !*v4 )
{
ERR_put_error(34, 146, 151, (int)"crypto/x509v3/v3_pcons.c", 83);
goto LABEL_8;
}
return v4;
}
else
{
ERR_put_error(34, 146, 65, (int)"crypto/x509v3/v3_pcons.c", 64);
return nullptr;
}
}