//
// EVP_PKEY2PKCS8 from 0xa18a84 to 0xa18b88 (260 bytes)
//
// 5 xrefs:
// > i2d_PKCS8PrivateKeyInfo_fp @ 0xa5d630
// > i2d_PKCS8PrivateKeyInfo_bio @ 0xa5d73c
// > i2d_PrivateKey @ 0xa7c0b0
// > sub_ACFB28 @ 0xacfb44
// > ??> @ 0x7d2bc
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:07:51 +0000
//
int __fastcall EVP_PKEY2PKCS8(int a1)
{
int v2; // r4
int v3; // r3
int (*v4)(void); // r3
v2 = PKCS8_PRIV_KEY_INFO_new();
if ( v2 )
{
v3 = *(_DWORD *)(a1 + 12);
if ( v3 )
{
v4 = *(int (**)(void))(v3 + 40);
if ( v4 )
{
if ( v4() )
{
RAND_add(*(_DWORD *)(*(_DWORD *)(v2 + 8) + 8), **(_DWORD **)(v2 + 8), 0, 0);
return v2;
}
ERR_put_error(6, 113, 146, (int)"crypto/evp/evp_pkey.c", 72);
}
else
{
ERR_put_error(6, 113, 144, (int)"crypto/evp/evp_pkey.c", 76);
}
}
else
{
ERR_put_error(6, 113, 118, (int)"crypto/evp/evp_pkey.c", 80);
}
PKCS8_PRIV_KEY_INFO_free(v2);
return 0;
}
else
{
ERR_put_error(6, 113, 65, (int)"crypto/evp/evp_pkey.c", 65);
return 0;
}
}