//
// PKCS12_pack_p7data from 0xe656a8 to 0xe65778 (208 bytes)
//
// 1 xrefs:
// > ??> @ 0x84720
//
// 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 PKCS12_pack_p7data(__int64 a1)
{
__int64 v2; // x19
__int64 v3; // x0
__int64 v4; // x0
__int64 v5; // x1
v2 = PKCS7_new();
if ( !v2 )
{
ERR_put_error(35, 114, 65, (__int64)"crypto/pkcs12/p12_add.c", 51);
return 0;
}
*(_QWORD *)(v2 + 24) = OBJ_nid2obj(0x15u);
v3 = ASN1_OCTET_STRING_new();
*(_QWORD *)(v2 + 32) = v3;
if ( !v3 )
{
ERR_put_error(35, 114, 65, (__int64)"crypto/pkcs12/p12_add.c", 56);
LABEL_7:
PKCS7_free(v2);
return 0;
}
v4 = ASN1_item_pack(a1, (__int64)&PKCS12_SAFEBAGS_it, (__int64 *)(v2 + 32));
v5 = v2;
if ( !v4 )
{
ERR_put_error(35, 114, 100, (__int64)"crypto/pkcs12/p12_add.c", 61);
goto LABEL_7;
}
return v5;
}