//
// sub_10A8664 from 0x10a8664 to 0x10a86f8 (148 bytes)
//
// 2 xrefs:
// > ??> @ 0x1410230
// > ??> @ 0x1410300
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:17:37 +0000
//
__int64 __fastcall sub_10A8664(__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;
}
}