//
// PKCS7_set_signed_attributes from 0x104c608 to 0x104c6ac (164 bytes)
//
// 1 xrefs:
// > ??> @ 0xb3098
//
// 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:36 +0000
//
__int64 __fastcall PKCS7_set_signed_attributes(__int64 a1, __int64 a2)
{
unsigned int v4; // w19
__int64 v5; // x0
__int64 v6; // x21
__int64 v7; // x0
__int64 v8; // x0
__int64 v9; // x1
v4 = 0;
OPENSSL_sk_pop_free(*(_QWORD *)(a1 + 24), X509_ATTRIBUTE_free);
v5 = OPENSSL_sk_dup(a2);
*(_QWORD *)(a1 + 24) = v5;
if ( !v5 )
return 0;
while ( (int)v4 < (int)OPENSSL_sk_num(a2) )
{
v6 = *(_QWORD *)(a1 + 24);
v7 = OPENSSL_sk_value(a2, v4);
v8 = X509_ATTRIBUTE_dup(v7);
v9 = v4++;
if ( !OPENSSL_sk_set(v6, v9, v8) )
return 0;
}
return 1;
}