//
// X509_add1_trust_object from 0x84b31c to 0x84b3c0 (164 bytes)
//
// 1 xrefs:
// > ??> @ 0x684ec
//
// 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 X509_add1_trust_object(int a1, const char **a2)
{
const char **v3; // r4
int **v4; // r5
int *v5; // r0
if ( a2 )
{
v3 = OBJ_dup(a2);
if ( !v3 )
return 0;
}
else
{
v3 = nullptr;
}
if ( !a1
|| (v4 = *(int ***)(a1 + 180)) == nullptr && (v4 = (int **)X509_CERT_AUX_new(), (*(_DWORD *)(a1 + 180) = v4) == 0)
|| (v5 = *v4) == nullptr && (v5 = OPENSSL_sk_new_null(), (*v4 = v5) == nullptr)
|| v3 && !OPENSSL_sk_push(v5, (int)v3) )
{
ASN1_OBJECT_free(v3);
return 0;
}
return 1;
}