//
// sub_84A468 from 0x84a468 to 0x84a57c (276 bytes)
//
// 2 xrefs:
// > sub_84A58C @ 0x84a5c4
// > X509_PUBKEY_get0 @ 0x84a774
//
// 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
//
int __fastcall sub_84A468(_DWORD *a1, int **a2)
{
_DWORD *v4; // r4
char *v5; // r0
int (__fastcall *v6)(_DWORD *, int **); // r3
v4 = EVP_PKEY_new();
if ( v4 )
{
v5 = OBJ_obj2nid(**a2);
if ( EVP_PKEY_set_type(v4, (int)v5) )
{
v6 = *(int (__fastcall **)(_DWORD *, int **))(v4[3] + 20);
if ( v6 )
{
if ( v6(v4, a2) )
{
*a1 = v4;
return 1;
}
ERR_put_error(11, 148, 125, (int)"crypto/x509/x_pubkey.c", 124);
}
else
{
ERR_put_error(11, 148, 124, (int)"crypto/x509/x_pubkey.c", 128);
}
}
else
{
ERR_put_error(11, 148, 111, (int)"crypto/x509/x_pubkey.c", 113);
}
EVP_PKEY_free((int)v4);
return 0;
}
else
{
ERR_put_error(11, 148, 65, (int)"crypto/x509/x_pubkey.c", 108);
return -1;
}
}