//
// X509V3_add_value from 0xe036d0 to 0xe03804 (308 bytes)
//
// 23 xrefs:
// > i2v_GENERAL_NAME @ 0xdf7e00
// > i2v_GENERAL_NAME @ 0xdf7edc
// > i2v_GENERAL_NAME @ 0xdf7ef8
// > i2v_GENERAL_NAME @ 0xdf7f3c
// > i2v_GENERAL_NAME @ 0xdf7f70
// > i2v_GENERAL_NAME @ 0xdf8040
// > i2v_GENERAL_NAME @ 0xdf8074
// > sub_DFFD50 @ 0xdffdb4
// > sub_E027C8 @ 0xe02880
// > X509V3_add_value_uchar @ 0xe03804
// > X509V3_add_value_bool @ 0xe03814
// > X509V3_add_value_bool @ 0xe03820
// > X509V3_add_value_bool_nf @ 0xe03838
// > X509V3_add_value_int @ 0xe03af4
// > X509V3_parse_list @ 0xe03e70
// > X509V3_parse_list @ 0xe03eec
// > X509V3_parse_list @ 0xe04014
// > X509V3_parse_list @ 0xe04120
// > sub_E6FC74 @ 0xe6fcb0
// > sub_E6FC74 @ 0xe6fd08
// > i2v_ASN1_BIT_STRING @ 0xe6ff78
// > sub_E702EC @ 0xe70334
// > ??> @ 0xa2480
//
// 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 X509V3_add_value(const char *a1, char *a2, int **a3)
{
char *v3; // x21
_QWORD *v6; // x22
int *v8; // x0
v3 = (char *)a1;
if ( a1 )
{
v3 = (char *)CRYPTO_strdup(a1, (__int64)"crypto/x509v3/v3_utl.c", 41);
if ( !v3 )
{
a2 = nullptr;
v6 = nullptr;
LABEL_8:
ERR_put_error(34, 105, 65, (__int64)"crypto/x509v3/v3_utl.c", 56);
CRYPTO_free(v6, (__int64)"crypto/x509v3/v3_utl.c", 57);
CRYPTO_free(v3, (__int64)"crypto/x509v3/v3_utl.c", 58);
CRYPTO_free(a2, (__int64)"crypto/x509v3/v3_utl.c", 59);
return 0;
}
}
if ( a2 )
{
a2 = (char *)CRYPTO_strdup(a2, (__int64)"crypto/x509v3/v3_utl.c", 43);
if ( !a2 )
{
v6 = nullptr;
goto LABEL_8;
}
}
v6 = CRYPTO_malloc(&off_18, (__int64)"crypto/x509v3/v3_utl.c", 45);
if ( !v6 )
goto LABEL_8;
if ( !*a3 )
{
v8 = (int *)OPENSSL_sk_new_null();
*a3 = v8;
if ( !v8 )
goto LABEL_8;
}
*v6 = 0;
v6[1] = v3;
v6[2] = a2;
if ( !(unsigned int)OPENSSL_sk_push(*a3, (__int64)v6) )
goto LABEL_8;
return 1;
}