//
// sub_8C4060 from 0x8c4060 to 0x8c41ac (332 bytes)
//
// 1 xrefs:
// > ??> @ 0xab55d0
//
// 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_8C4060(int a1, int a2, _DWORD *a3)
{
_DWORD *v4; // r11
signed int v5; // r4
int v6; // r0
const char *v7; // r6
_DWORD *v8; // r5
v4 = BASIC_CONSTRAINTS_new();
if ( v4 )
{
v5 = 0;
while ( 1 )
{
while ( 1 )
{
if ( v5 >= OPENSSL_sk_num((int)a3) )
return v4;
v6 = OPENSSL_sk_value(a3, v5++);
v7 = *(const char **)(v6 + 4);
v8 = (_DWORD *)v6;
if ( strcmp(v7, "CA") )
break;
if ( !X509V3_get_value_bool((int)v8, v4) )
goto LABEL_9;
}
if ( strcmp(v7, "pathlen") )
break;
if ( !X509V3_get_value_int((int)v8, v4 + 1) )
goto LABEL_9;
}
ERR_put_error(34, 102, 106, (int)"crypto/x509v3/v3_bcons.c", 75);
ERR_add_error_data(6, "section:", *v8, ",name:", v8[1], ",value:", v8[2]);
LABEL_9:
BASIC_CONSTRAINTS_free(v4);
return nullptr;
}
else
{
ERR_put_error(34, 102, 65, (int)"crypto/x509v3/v3_bcons.c", 63);
return nullptr;
}
}