//
// EC_KEY_new_by_curve_name from 0xd8fa6c to 0xd8faec (128 bytes)
//
// 2 xrefs:
// > sub_D61FA4 @ 0xd61fc8
// > ??> @ 0xc2ce8
//
// 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
//
_QWORD *__fastcall EC_KEY_new_by_curve_name(int a1)
{
__int64 v2; // x1
_QWORD *v3; // x19
__int64 v4; // x0
unsigned int (__fastcall *v5)(_QWORD *, __int64); // x2
__int64 v7; // x0
v3 = (_QWORD *)EC_KEY_new();
if ( v3 )
{
v4 = EC_GROUP_new_by_curve_name(a1, v2);
v3[3] = v4;
if ( v4 )
{
v5 = *(unsigned int (__fastcall **)(_QWORD *, __int64))(*v3 + 40LL);
if ( v5 && !v5(v3, v4) )
{
v7 = (__int64)v3;
v3 = nullptr;
EC_KEY_free(v7);
}
}
else
{
EC_KEY_free((__int64)v3);
return nullptr;
}
}
return v3;
}