//
// sub_FDEA78 from 0xfdea78 to 0xfdec98 (544 bytes)
//
// 2 xrefs:
// > SSL_config @ 0xfdecbc
// > SSL_CTX_config @ 0xfdecd0
//
// 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:36 +0000
//
__int64 __fastcall sub_FDEA78(__int64 a1, __int64 *a2, char *a3)
{
unsigned int v6; // w22
__int64 v7; // x23
__int64 v9; // x19
__int64 v10; // x21
__int64 v11; // x20
__int64 v12; // x20
__int64 (*v13)(); // x3
unsigned __int64 v14; // x21
unsigned int v15; // w4
__int64 v16; // x1
char **v17; // x20
int v18; // w0
if ( a1 || a2 )
{
if ( a3 && (v9 = qword_15662F8, (v10 = qword_1566300) != 0) )
{
v11 = 0;
while ( 1 )
{
++v11;
v6 = strcmp(*(const char **)v9, a3);
if ( !v6 )
break;
v9 += 24;
if ( v11 == v10 )
goto LABEL_29;
}
v7 = SSL_CONF_CTX_new();
if ( v7 )
{
if ( a1 )
{
v12 = *(_QWORD *)(a1 + 8);
SSL_CONF_CTX_set_ssl();
}
else
{
v12 = *a2;
SSL_CONF_CTX_set_ssl_ctx();
}
v13 = *(__int64 (**)())(v12 + 40);
v14 = 0;
if ( v13 == ssl_undefined_function )
v15 = 102;
else
v15 = 110;
if ( v13 == ssl_undefined_function )
LODWORD(v16) = 98;
else
LODWORD(v16) = 106;
if ( *(__int64 (**)())(v12 + 48) == ssl_undefined_function )
v16 = (unsigned int)v16;
else
v16 = v15;
SSL_CONF_CTX_set_flags(v7, v16);
v17 = *(char ***)(v9 + 8);
if ( *(_QWORD *)(v9 + 16) )
{
while ( 1 )
{
++v14;
v18 = SSL_CONF_cmd(v7, *v17);
if ( v18 <= 0 )
break;
v17 += 2;
if ( *(_QWORD *)(v9 + 16) <= v14 )
goto LABEL_30;
}
if ( v18 == -2 )
ERR_put_error(20, 391, 139, "ssl/ssl_mcnf.c", 177);
else
ERR_put_error(20, 391, 384, "ssl/ssl_mcnf.c", 179);
ERR_add_error_data(6, "section=", a3);
}
else
{
LABEL_30:
v6 = (int)SSL_CONF_CTX_finish(v7) > 0;
}
}
}
else
{
LABEL_29:
v6 = 0;
v7 = 0;
ERR_put_error(20, 391, 113, "ssl/ssl_mcnf.c", 152);
ERR_add_error_data(2, "name=", a3);
}
}
else
{
v6 = 0;
v7 = 0;
ERR_put_error(20, 391, 67, "ssl/ssl_mcnf.c", 147);
}
SSL_CONF_CTX_free(v7);
return v6;
}