//
// CONF_parse_list from 0xd82834 to 0xd82998 (356 bytes)
//
// 12 xrefs:
// > tls1_set_curves_list @ 0xd55e88
// > tls1_set_sigalgs_list @ 0xd5aee4
// > sub_D61EA4 @ 0xd61ed4
// > sub_D61EE0 @ 0xd61f14
// > sub_D61F20 @ 0xd61f50
// > CTLOG_STORE_load_file @ 0xd82d88
// > ENGINE_set_default_string @ 0xd9cf74
// > a2i_ipadd @ 0xe047e4
// > sub_E0D194 @ 0xe0d204
// > sub_E0D194 @ 0xe0d594
// > ASN1_str2mask @ 0xe0e274
// > ??> @ 0x970f8
//
// 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
//
__int64 __fastcall CONF_parse_list(
char *a1,
int a2,
int a3,
__int64 (__fastcall *a4)(const char *, _QWORD, __int64),
__int64 a5)
{
const char *v5; // x19
int v10; // w0
int v11; // t1
char *v12; // x21
char *v13; // x20
__int64 result; // x0
v5 = a1;
if ( a1 )
{
while ( 1 )
{
if ( a3 )
{
v10 = *(unsigned __int8 *)v5;
if ( !*v5 )
{
LABEL_22:
v12 = strchr(v5, a2);
result = a4(nullptr, 0, a5);
goto LABEL_20;
}
while ( isspace(v10) )
{
v11 = *(unsigned __int8 *)++v5;
v10 = v11;
if ( !v11 )
goto LABEL_22;
}
}
v12 = strchr(v5, a2);
if ( v12 == v5 )
{
v12 = (char *)v5;
LABEL_19:
result = a4(nullptr, 0, a5);
LABEL_20:
if ( (int)result <= 0 )
return result;
goto LABEL_13;
}
if ( !*v5 )
goto LABEL_19;
if ( v12 )
v13 = v12 - 1;
else
v13 = (char *)&v5[strlen(v5) - 1];
if ( a3 )
{
while ( isspace((unsigned __int8)*v13) )
--v13;
}
result = a4(v5, (unsigned int)((_DWORD)v13 - (_DWORD)v5 + 1), a5);
if ( (int)result <= 0 )
return result;
LABEL_13:
if ( !v12 )
return 1;
v5 = v12 + 1;
}
}
ERR_put_error(14, 119, 115, "crypto/conf/conf_mod.c", 519);
return 0;
}