//
// X509_VERIFY_PARAM_set1_policies from 0x106c8a8 to 0x106c9b4 (268 bytes)
//
// 3 xrefs:
// > X509_VERIFY_PARAM_inherit @ 0x106d038
// > X509_VERIFY_PARAM_inherit @ 0x106d098
// > ??> @ 0x5df70
//
// 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:57 +0000
//
__int64 __fastcall X509_VERIFY_PARAM_set1_policies(__int64 a1, unsigned int *a2)
{
_QWORD *v4; // x0
int v5; // w19
__int64 v6; // x0
__int64 v7; // x20
bool v8; // cc
int v9; // w1
if ( !a1 )
return 0;
OPENSSL_sk_pop_free(*(int **)(a1 + 48), (void (__fastcall *)(__int64))ASN1_OBJECT_free);
if ( !a2 )
{
*(_QWORD *)(a1 + 48) = 0;
return 1;
}
v4 = OPENSSL_sk_new_null();
*(_QWORD *)(a1 + 48) = v4;
if ( !v4 )
return 0;
v5 = 0;
do
{
v8 = v5 < (int)OPENSSL_sk_num(a2);
v9 = v5++;
if ( !v8 )
{
*(_QWORD *)(a1 + 24) |= 0x80uLL;
return 1;
}
v6 = OPENSSL_sk_value((__int64)a2, v9);
v7 = OBJ_dup(v6);
if ( !v7 )
return 0;
}
while ( (unsigned int)OPENSSL_sk_push(*(int **)(a1 + 48), v7) );
ASN1_OBJECT_free(v7);
return 0;
}