//
// sub_E2A364 from 0xe2a364 to 0xe2a3f8 (148 bytes)
//
// 2 xrefs:
// > ??> @ 0x1132ca0
// > ??> @ 0x1132d70
//
// 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 sub_E2A364(__int64 a1, __int64 a2)
{
__int64 v4; // x2
if ( *(_QWORD *)(a1 + 16) )
{
v4 = DH_new();
if ( v4
&& (EVP_PKEY_assign(a2, **(_DWORD **)a1, v4),
(unsigned int)EVP_PKEY_copy_parameters((_DWORD *)a2, *(_QWORD *)(a1 + 16))) )
{
return DH_generate_key(*(_QWORD *)(a2 + 32));
}
else
{
return 0;
}
}
else
{
ERR_put_error(5, 113, 107, (__int64)"crypto/dh/dh_pmeth.c", 364);
return 0;
}
}