//
// EC_KEY_new_by_curve_name from 0x9fd630 to 0x9fd6b8 (136 bytes)
//
// 2 xrefs:
// > sub_9D0340 @ 0x9d035c
// > ??> @ 0x77b1c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:07:36 +0000
//
_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;
}