//
// EVP_PKEY_decrypt_init from 0xdad394 to 0xdad424 (144 bytes)
//
// 4 xrefs:
// > tls_process_client_key_exchange @ 0xd52924
// > sub_DCC148 @ 0xdcc180
// > CMS_RecipientInfo_decrypt @ 0xe1df98
// > ??> @ 0xbee18
//
// 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 EVP_PKEY_decrypt_init(__int64 *a1)
{
__int64 v2; // x1
__int64 (*v3)(void); // x1
__int64 result; // x0
if ( a1 && (v2 = *a1) != 0 && *(_QWORD *)(v2 + 168) )
{
v3 = *(__int64 (**)(void))(v2 + 160);
*((_DWORD *)a1 + 8) = 512;
if ( v3 )
{
result = v3();
if ( (int)result <= 0 )
*((_DWORD *)a1 + 8) = 0;
}
else
{
return 1;
}
}
else
{
ERR_put_error(6, 138, 150, (__int64)"crypto/evp/pmeth_fn.c", 173);
return 4294967294LL;
}
return result;
}