//
// SSL_use_RSAPrivateKey from 0x79bbcc to 0x79bca0 (212 bytes)
//
// 3 xrefs:
// > SSL_use_RSAPrivateKey_file @ 0x79bd5c
// > SSL_use_RSAPrivateKey_ASN1 @ 0x79be3c
// > ??> @ 0x5c84c
//
// 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 SSL_use_RSAPrivateKey(int a1, int a2)
{
int v4; // r5
int v5; // r4
if ( a2 )
{
v4 = EVP_PKEY_new();
if ( v4 )
{
RSA_up_ref(a2);
if ( EVP_PKEY_assign(v4, 6, a2) <= 0 )
{
RSA_free(a2);
EVP_PKEY_free(v4);
return 0;
}
else
{
v5 = sub_79B6F4(*(_DWORD **)(a1 + 200), v4);
EVP_PKEY_free(v4);
return v5;
}
}
else
{
ERR_put_error(20, 204, 6, "ssl/ssl_rsa.c", 104);
return 0;
}
}
else
{
ERR_put_error(20, 204, 67, "ssl/ssl_rsa.c", 100);
return 0;
}
}