//
// SSL_use_RSAPrivateKey from 0xd4458c to 0xd44678 (236 bytes)
//
// 3 xrefs:
// > SSL_use_RSAPrivateKey_file @ 0xd44734
// > SSL_use_RSAPrivateKey_ASN1 @ 0xd4482c
// > ??> @ 0x71748
//
// 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 SSL_use_RSAPrivateKey(__int64 a1, __int64 a2)
{
__int64 v4; // x20
unsigned int v5; // w19
if ( a2 )
{
v4 = EVP_PKEY_new();
if ( v4 )
{
RSA_up_ref(a2);
if ( (int)EVP_PKEY_assign(v4, 6, a2) <= 0 )
{
RSA_free(a2);
EVP_PKEY_free(v4);
return 0;
}
else
{
v5 = sub_D440A4(*(_QWORD **)(a1 + 328), 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;
}
}