//
// X509V3_add_value from 0x1081a10 to 0x1081b44 (308 bytes)
//
// 23 xrefs:
// > i2v_GENERAL_NAME @ 0x1076140
// > i2v_GENERAL_NAME @ 0x107621c
// > i2v_GENERAL_NAME @ 0x1076238
// > i2v_GENERAL_NAME @ 0x107627c
// > i2v_GENERAL_NAME @ 0x10762b0
// > i2v_GENERAL_NAME @ 0x1076380
// > i2v_GENERAL_NAME @ 0x10763b4
// > sub_107E090 @ 0x107e0f4
// > sub_1080B08 @ 0x1080bc0
// > X509V3_add_value_uchar @ 0x1081b44
// > X509V3_add_value_bool @ 0x1081b54
// > X509V3_add_value_bool @ 0x1081b60
// > X509V3_add_value_bool_nf @ 0x1081b78
// > X509V3_add_value_int @ 0x1081e34
// > X509V3_parse_list @ 0x10821b0
// > X509V3_parse_list @ 0x108222c
// > X509V3_parse_list @ 0x1082354
// > X509V3_parse_list @ 0x1082460
// > sub_10EDC74 @ 0x10edcb0
// > sub_10EDC74 @ 0x10edd08
// > i2v_ASN1_BIT_STRING @ 0x10edf78
// > sub_10EE2EC @ 0x10ee334
// > ??> @ 0xd5628
//
// 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:10 +0000
//
__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;
}