//
// CONF_modules_load_file from 0x9ef8ac to 0x9ef978 (204 bytes)
//
// 3 xrefs:
// > sub_8549A8 @ 0x8549b8
// > openssl_config_int @ 0xa8e9e4
// > ??> @ 0x683ec
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 12:07:29 +0000
//
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;
}