//
// sub_DA8D80 from 0xda8d80 to 0xda8f24 (420 bytes)
//
// 2 xrefs:
// > EVP_add_alg_module @ 0xda8f28
// > EVP_add_alg_module @ 0xda8f30
//
// 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_DA8D80(__int64 a1, __int64 a2)
{
__int64 value; // x0
int v4; // w19
__int64 section; // x21
bool v6; // cc
__int64 v7; // x1
__int64 v8; // x0
__int64 v9; // x20
int v11; // [xsp+5Ch] [xbp+5Ch] BYREF
value = CONF_imodule_get_value(a1);
v4 = 0;
section = NCONF_get_section(a2, value);
if ( section )
{
while ( 1 )
{
v6 = v4 < (int)OPENSSL_sk_num(section);
v7 = (unsigned int)v4;
v8 = section;
if ( !v6 )
return 1;
while ( 1 )
{
v9 = OPENSSL_sk_value(v8, v7);
++v4;
if ( !strcmp(*(const char **)(v9 + 8), "fips_mode") )
break;
ERR_put_error(6, 177, 169, (__int64)"crypto/evp/evp_cnf.c", 53);
ERR_add_error_data(4, "name=", *(_QWORD *)(v9 + 8), ", value=", *(_QWORD *)(v9 + 16));
v6 = v4 < (int)OPENSSL_sk_num(section);
v7 = (unsigned int)v4;
v8 = section;
if ( !v6 )
return 1;
}
if ( !(unsigned int)X509V3_get_value_bool(v9, &v11, 169, "crypto/evp/evp_cnf.c", 53) )
break;
if ( v11 > 0 )
{
ERR_put_error(6, 177, 167, (__int64)"crypto/evp/evp_cnf.c", 48);
return 0;
}
}
ERR_put_error(6, 177, 168, (__int64)"crypto/evp/evp_cnf.c", 37);
return 0;
}
else
{
ERR_put_error(6, 177, 165, (__int64)"crypto/evp/evp_cnf.c", 29);
return 0;
}
}