//
// sub_7E4854 from 0x7e4854 to 0x7e4950 (252 bytes)
//
// 1 xrefs:
// > ??> @ 0xa30d54
//
// 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_7E4854(int a1, int a2)
{
int result; // r0
int v4; // [sp+8h] [bp-18h] BYREF
int *v5; // [sp+Ch] [bp-14h] BYREF
int v6; // [sp+10h] [bp-10h] BYREF
int v7; // [sp+14h] [bp-Ch] BYREF
int v8; // [sp+18h] [bp-8h] BYREF
_DWORD *v9; // [sp+1Ch] [bp-4h] BYREF
v4 = 0;
v8 = 0;
result = PKCS8_pkey_get0(nullptr, &v4, &v7, &v9, a2);
if ( result )
{
X509_ALGOR_get0(nullptr, &v6, &v5, v9);
v8 = sub_7E3C64(v6, v5);
if ( v8 )
{
if ( d2i_ECPrivateKey(&v8, &v4, v7) )
{
EVP_PKEY_assign(a1, 408, v8);
return 1;
}
ERR_put_error(16, 213, 142, "crypto/ec/ec_ameth.c", 203);
}
else
{
ERR_put_error(16, 213, 16, "crypto/ec/ec_ameth.c", 211);
}
EC_KEY_free(v8);
return 0;
}
return result;
}