//
// CTLOG_STORE_load_file from 0x1001050 to 0x10011bc (364 bytes)
//
// 4 xrefs:
// > SSL_CTX_set_ctlog_list_file @ 0xfc2210
// > CTLOG_STORE_load_default_file @ 0x10011ec
// > CTLOG_STORE_load_default_file @ 0x1001204
// > ??> @ 0xea178
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:15:53 +0000
//
__int64 __fastcall CTLOG_STORE_load_file(__int64 a1)
{
_QWORD *v2; // x19
__int64 v3; // x0
__int64 v4; // x2
char *string; // x0
unsigned int v6; // w21
v2 = (_QWORD *)CRYPTO_zalloc(24, "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);
v2[1] = v3;
v4 = v3;
if ( v3 )
{
if ( (int)NCONF_load(v3) <= 0 )
{
v6 = 0;
ERR_put_error(50, 123, 109, "crypto/ct/ct_log.c", 207);
v4 = v2[1];
}
else
{
string = (char *)NCONF_get_string(v2[1], 0, "enabled_logs");
v6 = (unsigned int)string;
if ( string )
{
if ( (unsigned int)CONF_parse_list(
string,
44,
1,
(__int64 (__fastcall *)(const char *, _QWORD, __int64))sub_1000E10,
(__int64)v2)
&& !v2[2] )
{
v4 = v2[1];
v6 = 1;
}
else
{
v6 = 0;
ERR_put_error(50, 123, 109, "crypto/ct/ct_log.c", 219);
v4 = v2[1];
}
}
else
{
ERR_put_error(50, 123, 109, "crypto/ct/ct_log.c", 213);
v4 = v2[1];
}
}
}
else
{
v6 = 0;
}
NCONF_free(v4);
CRYPTO_free(v2, "crypto/ct/ct_log.c", 69);
return v6;
}