//
// CONF_parse_list from 0x7dad7c to 0x7daf20 (420 bytes)
//
// 12 xrefs:
// > tls1_set_curves_list @ 0x7ae840
// > tls1_set_sigalgs_list @ 0x7b4090
// > ??> @ 0x7bb628
// > ??> @ 0x7bb688
// > sub_7BB6A4 @ 0x7bb6e0
// > CTLOG_STORE_load_file @ 0x7db2b0
// > ENGINE_set_default_string @ 0x7f6fa0
// > a2i_ipadd @ 0x85e150
// > sub_864F7C @ 0x864fcc
// > sub_864F7C @ 0x86553c
// > ASN1_str2mask @ 0x8661ac
// > ??> @ 0x5d83c
//
// 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_parse_list(const char *a1, int a2, int a3, int (__fastcall *a4)(const char *, int, int), int a5)
{
const char *v5; // r4
int v9; // t1
int v10; // r12
char *v11; // r9
int result; // r0
char *v13; // r1
int v14; // t1
v5 = a1;
if ( !a1 )
{
ERR_put_error(14, 119, 115, "crypto/conf/conf_mod.c", 519);
return 0;
}
if ( !a3 )
goto LABEL_12;
LABEL_3:
if ( !*v5 )
goto LABEL_8;
if ( (*(_BYTE *)(ctype_ + *(unsigned __int8 *)v5 + 1) & 8) != 0 )
{
while ( 1 )
{
v9 = *(unsigned __int8 *)++v5;
v10 = ctype_ + v9;
if ( !v9 )
break;
if ( (*(_BYTE *)(v10 + 1) & 8) == 0 )
goto LABEL_24;
}
LABEL_8:
v11 = strchr(v5, a2);
goto LABEL_9;
}
LABEL_24:
v11 = strchr(v5, a2);
if ( v11 == v5 )
{
v11 = (char *)v5;
LABEL_9:
result = a4(nullptr, 0, a5);
if ( result > 0 )
goto LABEL_10;
return result;
}
while ( 1 )
{
v13 = v11 ? v11 - 1 : (char *)&v5[strlen(v5) - 1];
if ( a3 && (*(_BYTE *)(ctype_ + (unsigned __int8)*v13 + 1) & 8) != 0 )
{
do
v14 = (unsigned __int8)*--v13;
while ( (*(_BYTE *)(ctype_ + v14 + 1) & 8) != 0 );
}
result = a4(v5, v13 - v5 + 1, a5);
if ( result <= 0 )
return result;
LABEL_10:
if ( !v11 )
return 1;
v5 = v11 + 1;
if ( a3 )
goto LABEL_3;
LABEL_12:
v11 = strchr(v5, a2);
if ( v5 == v11 || !*v5 )
goto LABEL_9;
}
}