//
// CMS_EnvelopedData_create from 0x109bbe0 to 0x109bce0 (256 bytes)
//
// 1 xrefs:
// > ??> @ 0xbdaa8
//
// 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:28 +0000
//
__int64 *__fastcall CMS_EnvelopedData_create(__int64 a1)
{
__int64 *v2; // x0
__int64 *v3; // x19
__int64 v4; // x3
_QWORD *v6; // x0
char ***v7; // x22
v2 = (__int64 *)CMS_ContentInfo_new();
v3 = v2;
if ( !v2 )
goto LABEL_7;
if ( v2[1] )
{
v4 = cms_get0_enveloped(v2);
}
else
{
v6 = (_QWORD *)ASN1_item_new((__int64)&CMS_EnvelopedData_it);
v3[1] = (__int64)v6;
if ( !v6 )
{
ERR_put_error(46, 126, 65, (__int64)"crypto/cms/cms_env.c", 38);
goto LABEL_7;
}
v7 = (char ***)v6[3];
*v6 = 0;
*v7 = OBJ_nid2obj(0x15u);
ASN1_OBJECT_free(*v3);
*v3 = (__int64)OBJ_nid2obj(0x17u);
v4 = v3[1];
}
if ( v4 && (unsigned int)cms_EncryptedContent_init(*(_QWORD *)(v4 + 24), a1, 0, 0) )
return v3;
LABEL_7:
CMS_ContentInfo_free(v3);
ERR_put_error(46, 124, 65, (__int64)"crypto/cms/cms_env.c", 120);
return nullptr;
}