//
// X509V3_add_value from 0x85cd9c to 0x85ced0 (308 bytes)
//
// 24 xrefs:
// > i2v_GENERAL_NAME @ 0x850860
// > i2v_GENERAL_NAME @ 0x850884
// > i2v_GENERAL_NAME @ 0x8508f0
// > i2v_GENERAL_NAME @ 0x850924
// > i2v_GENERAL_NAME @ 0x850948
// > i2v_GENERAL_NAME @ 0x850a44
// > i2v_GENERAL_NAME @ 0x850a60
// > sub_859588 @ 0x8595e0
// > sub_85BF14 @ 0x85bfa4
// > X509V3_add_value_uchar @ 0x85cee0
// > X509V3_add_value_bool @ 0x85cef4
// > X509V3_add_value_bool @ 0x85cf00
// > X509V3_add_value_bool_nf @ 0x85cf24
// > X509V3_add_value_int @ 0x85d208
// > X509V3_parse_list @ 0x85d908
// > X509V3_parse_list @ 0x85d9a4
// > X509V3_parse_list @ 0x85da30
// > X509V3_parse_list @ 0x85dad0
// > X509V3_parse_list @ 0x85daf8
// > sub_8C3F00 @ 0x8c3f3c
// > sub_8C3F00 @ 0x8c3f9c
// > i2v_ASN1_BIT_STRING @ 0x8c4228
// > sub_8C4590 @ 0x8c45d0
// > ??> @ 0x6886c
//
// 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
//
int __fastcall X509V3_add_value(const char *a1, const char *a2, int **a3)
{
void *v3; // r7
void *v6; // r6
_DWORD *v7; // r5
int *v9; // r0
v3 = (void *)a1;
if ( a1 )
{
v3 = CRYPTO_strdup(a1, (int)"crypto/x509v3/v3_utl.c", 41);
if ( !v3 )
{
v6 = nullptr;
v7 = nullptr;
goto LABEL_9;
}
}
if ( a2 )
{
v6 = CRYPTO_strdup(a2, (int)"crypto/x509v3/v3_utl.c", 43);
if ( !v6 )
{
v7 = nullptr;
goto LABEL_9;
}
}
else
{
v6 = nullptr;
}
v7 = CRYPTO_malloc(&byte_9[3], (int)"crypto/x509v3/v3_utl.c", 45);
if ( v7 )
{
if ( *a3 || (v9 = OPENSSL_sk_new_null(), (*a3 = v9) != nullptr) )
{
v7[1] = v3;
v7[2] = v6;
*v7 = 0;
if ( OPENSSL_sk_push(*a3, (int)v7) )
return 1;
}
}
LABEL_9:
ERR_put_error(34, 105, 65, (int)"crypto/x509v3/v3_utl.c", 56);
CRYPTO_free(v7, (int)"crypto/x509v3/v3_utl.c", 57);
CRYPTO_free(v3, (int)"crypto/x509v3/v3_utl.c", 58);
CRYPTO_free(v6, (int)"crypto/x509v3/v3_utl.c", 59);
return 0;
}