//
// X509at_add1_attr from 0xa52b80 to 0xa52c5c (220 bytes)
//
// 8 xrefs:
// > EVP_PKEY_add1_attr @ 0xa18bc8
// > X509at_add1_attr_by_OBJ @ 0xa52f78
// > X509at_add1_attr_by_NID @ 0xa53058
// > X509at_add1_attr_by_txt @ 0xa5314c
// > X509_REQ_add1_attr @ 0xad8664
// > CMS_signed_add1_attr @ 0xae4104
// > CMS_unsigned_add1_attr @ 0xae41c4
// > ??> @ 0x7d37c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:08:23 +0000
//
void **__fastcall X509at_add1_attr(void ***a1, int a2)
{
void **v3; // r4
int v4; // r6
void **v6; // r0
int v7; // [sp+Ch] [bp-4h]
if ( !a1 )
{
v3 = nullptr;
ERR_put_error(11, 135, 67, (int)"crypto/x509/x509_att.c", 80);
v4 = 0;
goto LABEL_11;
}
v3 = *a1;
if ( !*a1 )
{
v7 = a2;
v6 = (void **)OPENSSL_sk_new_null();
a2 = v7;
v3 = v6;
if ( !v6 )
{
v4 = 0;
goto LABEL_10;
}
}
v4 = X509_ATTRIBUTE_dup(a2);
if ( !v4 )
{
LABEL_11:
X509_ATTRIBUTE_free(v4);
OPENSSL_sk_free(v3);
return nullptr;
}
if ( !OPENSSL_sk_push((int *)v3, v4) )
{
LABEL_10:
ERR_put_error(11, 135, 65, (int)"crypto/x509/x509_att.c", 98);
goto LABEL_11;
}
if ( !*a1 )
*a1 = v3;
return v3;
}