//
// CMS_add_smimecap from 0xe22518 to 0xe22594 (124 bytes)
//
// 2 xrefs:
// > CMS_add1_signer @ 0xe22d94
// > ??> @ 0xb9718
//
// 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 CMS_add_smimecap(__int64 a1, __int64 a2)
{
int v3; // w0
unsigned int v4; // w19
void *v6; // [xsp+28h] [xbp+28h] BYREF
v6 = nullptr;
v3 = i2d_X509_ALGORS(a2, (__int64 *)&v6);
if ( v3 <= 0 )
return 0;
v4 = CMS_signed_add1_attr_by_NID(a1, 167, 16, v6, (unsigned int)v3);
CRYPTO_free(v6, (__int64)"crypto/cms/cms_sd.c", 860);
return v4;
}