//
// PKCS7_set_digest from 0x829744 to 0x82980c (200 bytes)
//
// 1 xrefs:
// > ??> @ 0x65fbc
//
// 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 PKCS7_set_digest(int a1, int a2)
{
int v6; // r7
void *v7; // r4
int v8; // r4
unsigned int v9; // r0
if ( OBJ_obj2nid(*(_DWORD *)(a1 + 16)) != (_BYTE *)&dword_18 + 1 )
{
ERR_put_error(33, 126, 113, (int)"crypto/pkcs7/pk7_lib.c", 390);
return 1;
}
v6 = *(_DWORD *)(*(_DWORD *)(a1 + 20) + 4);
v7 = ASN1_TYPE_new();
*(_DWORD *)(v6 + 4) = v7;
if ( !v7 )
{
ERR_put_error(33, 126, 65, (int)"crypto/pkcs7/pk7_lib.c", 382);
return 0;
}
v8 = *(_DWORD *)(*(_DWORD *)(a1 + 20) + 4);
**(_DWORD **)(v8 + 4) = 5;
v9 = EVP_MD_type(a2);
*(_DWORD *)v8 = OBJ_nid2obj(v9);
return 1;
}