//
// PKCS7_set_signed_attributes from 0xa3d888 to 0xa3d910 (136 bytes)
//
// 1 xrefs:
// > ??> @ 0x7f92c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:08:12 +0000
//
int __fastcall PKCS7_set_signed_attributes(int a1, int a2)
{
int v4; // r0
int i; // r4
int v6; // r6
int v7; // r0
int v8; // r0
int v9; // r1
OPENSSL_sk_pop_free(*(_DWORD *)(a1 + 12), X509_ATTRIBUTE_free);
v4 = OPENSSL_sk_dup(a2);
*(_DWORD *)(a1 + 12) = v4;
if ( !v4 )
return 0;
for ( i = 0; i < OPENSSL_sk_num(a2); ++i )
{
v6 = *(_DWORD *)(a1 + 12);
v7 = OPENSSL_sk_value(a2, i);
v8 = X509_ATTRIBUTE_dup(v7);
v9 = i;
if ( !OPENSSL_sk_set(v6, v9, v8) )
return 0;
}
return 1;
}