//
// X509_get_pubkey_parameters from 0xdebc80 to 0xdebd8c (268 bytes)
//
// 5 xrefs:
// > sub_DEBD8C @ 0xdec2c0
// > sub_DEBD8C @ 0xdeca24
// > X509_verify_cert @ 0xdecfb4
// > X509_verify_cert @ 0xded058
// > ??> @ 0x6f5b8
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
__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;
}