//
// CONF_parse_list from 0x9ef97c to 0x9efb20 (420 bytes)
//
// 12 xrefs:
// > tls1_set_curves_list @ 0x9c3444
// > tls1_set_sigalgs_list @ 0x9c8c94
// > ??> @ 0x9d022c
// > ??> @ 0x9d028c
// > sub_9D02A8 @ 0x9d02e4
// > CTLOG_STORE_load_file @ 0x9efeb0
// > ENGINE_set_default_string @ 0xa0bba0
// > a2i_ipadd @ 0xa72d50
// > sub_A79B7C @ 0xa79bcc
// > sub_A79B7C @ 0xa7a13c
// > ASN1_str2mask @ 0xa7adac
// > ??> @ 0x772bc
//
// 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_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;
}
}