//
// PKCS7_SIGNER_INFO_set from 0x104cf3c to 0x104d078 (316 bytes)
//
// 2 xrefs:
// > PKCS7_add_signature @ 0x104d0b4
// > ??> @ 0xea280
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings
// Generated at Fri, 27 Nov 2026 13:16:37 +0000
//
__int64 __fastcall PKCS7_SIGNER_INFO_set(_QWORD *a1, __int64 a2, __int64 a3, unsigned int *a4)
{
__int64 result; // x0
__int64 v9; // x23
__int64 issuer_name; // x0
__int64 v11; // x23
__int64 serialNumber; // x0
__int64 v13; // x0
__int64 *v14; // x20
unsigned int v15; // w0
char **v16; // x0
__int64 v17; // x0
__int64 (__fastcall *v18)(__int64, __int64, _QWORD, _QWORD *); // x4
int v19; // w0
bool v20; // cc
int v21; // w1
if ( !(unsigned int)ASN1_INTEGER_set(*a1, 1) )
return 0;
v9 = a1[1];
issuer_name = X509_get_issuer_name(a2);
if ( !(unsigned int)X509_NAME_set(v9, issuer_name) )
return 0;
ASN1_INTEGER_free(*(_QWORD *)(a1[1] + 8LL));
v11 = a1[1];
serialNumber = X509_get_serialNumber(a2);
v13 = ASN1_INTEGER_dup(serialNumber);
*(_QWORD *)(v11 + 8) = v13;
if ( !v13 )
return 0;
EVP_PKEY_up_ref(a3);
a1[7] = a3;
v14 = (__int64 *)a1[2];
v15 = EVP_MD_type(a4);
v16 = OBJ_nid2obj(v15);
X509_ALGOR_set0(v14, (__int64)v16, 5u, 0);
v17 = *(_QWORD *)(a3 + 16);
if ( !v17 || (v18 = *(__int64 (__fastcall **)(__int64, __int64, _QWORD, _QWORD *))(v17 + 176)) == nullptr )
{
LABEL_12:
ERR_put_error(33, 129, 148, (__int64)"crypto/pkcs7/pk7_lib.c", 345);
return 0;
}
v19 = v18(a3, 1, 0, a1);
v20 = v19 <= 0;
v21 = v19;
result = 1;
if ( v20 )
{
if ( v21 != -2 )
{
ERR_put_error(33, 129, 147, (__int64)"crypto/pkcs7/pk7_lib.c", 340);
return 0;
}
goto LABEL_12;
}
return result;
}