//
// CMS_stream from 0x8741dc to 0x874270 (148 bytes)
//
// 2 xrefs:
// > sub_872AE8 @ 0x872b24
// > ??> @ 0x69e7c
//
// 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
//
int __fastcall CMS_stream(_DWORD *a1, int a2)
{
int *v3; // r0
int *v4; // r5
int v5; // r4
v3 = (int *)CMS_get0_content(a2);
v4 = v3;
if ( !v3 )
return 0;
v5 = *v3;
if ( *v3 || (v5 = ASN1_OCTET_STRING_new(), (*v4 = v5) != 0) )
{
*(_DWORD *)(v5 + 12) = *(_DWORD *)(v5 + 12) & 0xFFFFFFCF | 0x10;
*a1 = v5 + 8;
return 1;
}
else
{
ERR_put_error(46, 155, 65, (int)"crypto/cms/cms_io.c", 31);
return 0;
}
}