//
// sub_826B74 from 0x826b74 to 0x826c68 (244 bytes)
//
// 2 xrefs:
// > PKCS7_dataInit @ 0x826cfc
// > PKCS7_dataInit @ 0x826d38
//
// 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 sub_826B74(_DWORD **a1, int *a2)
{
int v4; // r0
_DWORD *v5; // r4
char *v6; // r0
char *v7; // r0
int digestbyname; // r3
v4 = BIO_f_md();
v5 = BIO_new(v4);
if ( v5 )
{
v6 = OBJ_obj2nid(*a2);
v7 = OBJ_nid2sn((unsigned int)v6);
digestbyname = EVP_get_digestbyname((int)v7);
if ( digestbyname )
{
BIO_ctrl(v5, 111, 0, digestbyname);
if ( !*a1 )
{
*a1 = v5;
return 1;
}
if ( BIO_push(*a1, (int)v5) )
return 1;
ERR_put_error(33, 125, 32, (int)"crypto/pkcs7/pk7_doit.c", 74);
}
else
{
ERR_put_error(33, 125, 109, (int)"crypto/pkcs7/pk7_doit.c", 66);
}
}
else
{
ERR_put_error(33, 125, 32, (int)"crypto/pkcs7/pk7_doit.c", 60);
}
BIO_free(v5);
return 0;
}