//
// PKCS12_item_pack_safebag from 0x10e35b0 to 0x10e36a8 (248 bytes)
//
// 3 xrefs:
// > PKCS12_SAFEBAG_create_cert @ 0x10499cc
// > PKCS12_SAFEBAG_create_crl @ 0x10499e0
// > ??> @ 0x102718
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:17:50 +0000
//
_QWORD *__fastcall PKCS12_item_pack_safebag(__int64 a1, __int64 a2, unsigned int a3, unsigned int a4)
{
_QWORD *v6; // x0
_QWORD *v7; // x19
_QWORD *v8; // x0
__int64 v10; // x0
v6 = (_QWORD *)PKCS12_BAGS_new();
v7 = v6;
if ( !v6 )
{
ERR_put_error(35, 117, 65, (__int64)"crypto/pkcs12/p12_add.c", 24);
return v7;
}
*v6 = OBJ_nid2obj(a3);
if ( !ASN1_item_pack(a1, a2, v7 + 1) )
{
ERR_put_error(35, 117, 65, (__int64)"crypto/pkcs12/p12_add.c", 29);
LABEL_8:
v10 = (__int64)v7;
v7 = nullptr;
PKCS12_BAGS_free(v10);
return v7;
}
v8 = (_QWORD *)PKCS12_SAFEBAG_new();
if ( !v8 )
{
ERR_put_error(35, 117, 65, (__int64)"crypto/pkcs12/p12_add.c", 33);
goto LABEL_8;
}
v8[1] = v7;
v7 = v8;
*v8 = OBJ_nid2obj(a4);
return v7;
}