//
// CONF_modules_load_file from 0x7dacac to 0x7dad78 (204 bytes)
//
// 3 xrefs:
// > sub_644928 @ 0x644938
// > openssl_config_int @ 0x879de4
// > ??> @ 0x554bc
//
// 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
//
int __fastcall CONF_modules_load_file(int a1, char *a2, char a3)
{
int v6; // r5
int v7; // r7
int v8; // r0
int v9; // r1
int v10; // r2
int v11; // r3
int v12; // r4
int v14; // r0
v6 = NCONF_new(0);
if ( v6 )
{
if ( a1 )
{
v7 = a1;
}
else
{
v14 = CONF_get1_default_config_file();
v7 = v14;
if ( !v14 )
{
v12 = 0;
goto LABEL_16;
}
}
v8 = NCONF_load(v6);
if ( v8 <= 0 )
{
v12 = a3 & 0x10;
if ( v12 )
{
if ( ERR_peek_last_error(v8, v9, v10, v11) << 20 == 119537664 )
{
ERR_clear_error(119537664);
v12 = 1;
}
else
{
v12 = 0;
}
}
}
else
{
v12 = CONF_modules_load(v6, a2, a3);
}
}
else
{
v12 = 0;
v7 = 0;
}
if ( !a1 )
LABEL_16:
CRYPTO_free(v7, "crypto/conf/conf_mod.c", 142);
NCONF_free(v6);
return v12;
}