//
// EC_KEY_new_by_curve_name from 0x7e8a30 to 0x7e8ab8 (136 bytes)
//
// 2 xrefs:
// > sub_7BB73C @ 0x7bb758
// > ??> @ 0x5e09c
//
// 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
//
_DWORD *__fastcall EC_KEY_new_by_curve_name(int a1)
{
_DWORD *v2; // r4
int v3; // r1
_DWORD *result; // r0
int (__fastcall *v5)(_DWORD *, int); // r3
int v6; // r5
v2 = (_DWORD *)EC_KEY_new();
if ( !v2 )
return nullptr;
v3 = EC_GROUP_new_by_curve_name(a1);
v2[3] = v3;
if ( !v3
|| (result = v2, (v5 = *(int (__fastcall **)(_DWORD *, int))(*v2 + 20)) != nullptr)
&& (v6 = v5(v2, v3), result = v2, !v6) )
{
EC_KEY_free((int)v2);
return nullptr;
}
return result;
}