//
// PKCS7_simple_smimecap from 0xe66330 to 0xe66440 (272 bytes)
//
// 1 xrefs:
// > ??> @ 0x3edc0
//
// 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 PKCS7_simple_smimecap(int *a1, unsigned int a2, int a3)
{
__int64 *v6; // x0
_QWORD *v7; // x19
__int64 v8; // x0
__int64 v9; // x0
__int64 v10; // x20
__int64 v11; // x0
v6 = (__int64 *)X509_ALGOR_new();
v7 = v6;
if ( v6 )
{
ASN1_OBJECT_free(*v6);
*v7 = OBJ_nid2obj(a2);
if ( a3 > 0 )
{
v8 = ASN1_TYPE_new();
v7[1] = v8;
if ( !v8 )
goto LABEL_8;
v9 = ASN1_INTEGER_new();
v10 = v9;
if ( !v9 )
goto LABEL_8;
if ( !(unsigned int)ASN1_INTEGER_set(v9, a3) )
{
LABEL_9:
ERR_put_error(33, 119, 65, (__int64)"crypto/pkcs7/pk7_attr.c", 80);
ASN1_INTEGER_free(v10);
X509_ALGOR_free((__int64)v7);
return 0;
}
v11 = v7[1];
*(_QWORD *)(v11 + 8) = v10;
*(_DWORD *)v11 = 2;
}
if ( !(unsigned int)OPENSSL_sk_push(a1, (__int64)v7) )
{
LABEL_8:
v10 = 0;
goto LABEL_9;
}
return 1;
}
else
{
ERR_put_error(33, 119, 65, (__int64)"crypto/pkcs7/pk7_attr.c", 56);
return 0;
}
}