//
// _CONF_new_section from 0x10a1560 to 0x10a1664 (260 bytes)
//
// 4 xrefs:
// > sub_10A1D38 @ 0x10a1dbc
// > sub_10A1D38 @ 0x10a252c
// > sub_10A1D38 @ 0x10a26a0
// > ??> @ 0xcebf0
//
// 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:17:31 +0000
//
_QWORD *__fastcall CONF_new_section(__int64 a1, const char *a2)
{
void **v4; // x21
_QWORD *v5; // x19
size_t v6; // x20
void *v7; // x0
__int64 *v8; // x0
v4 = (void **)OPENSSL_sk_new_null();
if ( !v4 || (v5 = CRYPTO_malloc(&off_18, (__int64)"crypto/conf/conf_api.c", 196)) == nullptr )
{
v5 = nullptr;
goto LABEL_7;
}
v6 = (int)(strlen(a2) + 1);
v7 = CRYPTO_malloc((void *)v6, (__int64)"crypto/conf/conf_api.c", 199);
*v5 = v7;
if ( !v7 )
{
LABEL_7:
OPENSSL_sk_free(v4);
CRYPTO_free(v5, (__int64)"crypto/conf/conf_api.c", 212);
return nullptr;
}
memcpy(v7, a2, v6);
v5[1] = 0;
v8 = *(__int64 **)(a1 + 16);
v5[2] = v4;
if ( OPENSSL_LH_insert(v8, v5) )
OPENSSL_die("assertion failed: vv == NULL", "crypto/conf/conf_api.c", 207);
return v5;
}