//
// CMS_SignedData_init from 0xe2121c to 0xe21304 (232 bytes)
//
// 1 xrefs:
// > ??> @ 0x58f50
//
// 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
//
bool __fastcall CMS_SignedData_init(__int64 *a1)
{
__int64 v2; // x1
_QWORD *v4; // x0
char ***v5; // x21
__int64 v6; // x0
if ( a1[1] )
{
if ( (unsigned int)OBJ_obj2nid(*a1) != 22 )
{
ERR_put_error(46, 133, 108, (__int64)"crypto/cms/cms_sd.c", 26);
return 0;
}
v2 = a1[1];
}
else
{
v4 = (_QWORD *)ASN1_item_new((__int64)&CMS_SignedData_it);
a1[1] = (__int64)v4;
if ( !v4 )
{
ERR_put_error(46, 149, 65, (__int64)"crypto/cms/cms_sd.c", 37);
return 0;
}
v5 = (char ***)v4[2];
*v4 = 1;
*v5 = OBJ_nid2obj(0x15u);
v6 = *a1;
*(_DWORD *)(*(_QWORD *)(a1[1] + 16) + 16LL) = 1;
ASN1_OBJECT_free(v6);
*a1 = (__int64)OBJ_nid2obj(0x16u);
v2 = a1[1];
}
return v2 != 0;
}