//
// X509_get_pubkey_parameters from 0x1069fc0 to 0x106a0cc (268 bytes)
//
// 5 xrefs:
// > sub_106A0CC @ 0x106a600
// > sub_106A0CC @ 0x106ad64
// > X509_verify_cert @ 0x106b2f4
// > X509_verify_cert @ 0x106b398
// > ??> @ 0x96118
//
// 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:55 +0000
//
__int64 __fastcall X509_get_pubkey_parameters(_DWORD *a1, unsigned int *a2)
{
int v4; // w19
__int64 v5; // x20
__int64 v6; // x0
__int64 v7; // x0
int v8; // w19
int v9; // w1
__int64 v10; // x0
_DWORD *v11; // x0
if ( !a1 || (unsigned int)EVP_PKEY_missing_parameters((__int64)a1) )
{
v4 = 0;
v5 = 0;
while ( v4 < (int)OPENSSL_sk_num(a2) )
{
v6 = OPENSSL_sk_value((__int64)a2, v4);
v7 = X509_get0_pubkey(v6);
v5 = v7;
if ( !v7 )
{
ERR_put_error(11, 110, 108, (__int64)"crypto/x509/x509_vfy.c", 1912);
return 0;
}
if ( !(unsigned int)EVP_PKEY_missing_parameters(v7) )
goto LABEL_9;
++v4;
}
if ( !v5 )
{
ERR_put_error(11, 110, 107, (__int64)"crypto/x509/x509_vfy.c", 1920);
return 0;
}
LABEL_9:
v8 = v4 - 1;
if ( v8 >= 0 )
{
do
{
v9 = v8--;
v10 = OPENSSL_sk_value((__int64)a2, v9);
v11 = (_DWORD *)X509_get0_pubkey(v10);
EVP_PKEY_copy_parameters(v11, v5);
}
while ( v8 != -1 );
}
if ( a1 )
EVP_PKEY_copy_parameters(a1, v5);
}
return 1;
}