//
// X509_ATTRIBUTE_create_by_OBJ from 0xde60a8 to 0xde61c8 (288 bytes)
//
// 4 xrefs:
// > X509at_add1_attr_by_OBJ @ 0xde61dc
// > X509_ATTRIBUTE_create_by_NID @ 0xde6254
// > X509_ATTRIBUTE_create_by_txt @ 0xde6338
// > ??> @ 0xb1438
//
// 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 X509_ATTRIBUTE_create_by_OBJ(__int64 **a1, __int64 a2, unsigned int a3, char *a4, unsigned int a5)
{
__int64 *v10; // x19
__int64 *result; // x0
__int64 *v12; // x0
if ( !a1 || (v10 = *a1) == nullptr )
{
v12 = (__int64 *)X509_ATTRIBUTE_new();
v10 = v12;
if ( !v12 )
{
ERR_put_error(11, 137, 65, (__int64)"crypto/x509/x509_att.c", 196);
return nullptr;
}
if ( X509_ATTRIBUTE_set1_object(v12, a2) && (unsigned int)X509_ATTRIBUTE_set1_data(v10, a3, a4, a5) )
{
result = v10;
if ( !a1 )
return result;
goto LABEL_8;
}
if ( !a1 || *a1 != v10 )
{
LABEL_5:
X509_ATTRIBUTE_free(v10);
return nullptr;
}
return nullptr;
}
if ( !X509_ATTRIBUTE_set1_object(*a1, a2) || !(unsigned int)X509_ATTRIBUTE_set1_data(v10, a3, a4, a5) )
{
if ( *a1 != v10 )
goto LABEL_5;
return nullptr;
}
LABEL_8:
result = v10;
if ( !*a1 )
*a1 = v10;
return result;
}