//
// CTLOG_STORE_load_file from 0x7db21c to 0x7db398 (380 bytes)
//
// 4 xrefs:
// > SSL_CTX_set_ctlog_list_file @ 0x79b514
// > CTLOG_STORE_load_default_file @ 0x7db3d8
// > CTLOG_STORE_load_default_file @ 0x7db3ec
// > ??> @ 0x5c77c
//
// 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 CTLOG_STORE_load_file(int a1)
{
_DWORD *v2; // r4
int v3; // r0
int v4; // r3
int v5; // r5
const char *string; // r0
v2 = (_DWORD *)CRYPTO_zalloc(12, "crypto/ct/ct_log.c", 59);
if ( !v2 )
ERR_put_error(50, 122, 65, "crypto/ct/ct_log.c", 62);
*v2 = a1;
v3 = NCONF_new(0);
v4 = v3;
v2[1] = v3;
if ( v3 )
{
if ( NCONF_load(v3) <= 0 )
{
ERR_put_error(50, 123, 109, "crypto/ct/ct_log.c", 207);
v5 = 0;
v4 = v2[1];
}
else
{
string = (const char *)NCONF_get_string(v2[1], 0, "enabled_logs");
v5 = (int)string;
if ( string )
{
if ( CONF_parse_list(string, 44, 1, (int (__fastcall *)(const char *, int, int))sub_7DAFE0, (int)v2) && !v2[2] )
{
v4 = v2[1];
v5 = 1;
}
else
{
ERR_put_error(50, 123, 109, "crypto/ct/ct_log.c", 219);
v4 = v2[1];
v5 = 0;
}
}
else
{
ERR_put_error(50, 123, 109, "crypto/ct/ct_log.c", 213);
v4 = v2[1];
}
}
}
else
{
v5 = 0;
}
NCONF_free(v4);
CRYPTO_free(v2, "crypto/ct/ct_log.c", 69);
return v5;
}