//
// sub_D8BEA8 from 0xd8bea8 to 0xd8bf18 (112 bytes)
//
// 1 xrefs:
// > ??> @ 0x1122ee0
//
// 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_D8BEA8(__int64 a1, __int64 a2)
{
__int64 v3; // x0
__int64 v4; // x19
__int64 v5; // x0
v3 = EC_KEY_get0_group(*(_QWORD *)(a2 + 32));
v4 = EC_GROUP_dup(v3);
if ( !v4 )
return 0;
v5 = *(_QWORD *)(a1 + 32);
if ( !v5 )
{
v5 = EC_KEY_new();
*(_QWORD *)(a1 + 32) = v5;
if ( !v5 )
return 0;
}
if ( !(unsigned int)EC_KEY_set_group(v5, v4) )
return 0;
EC_GROUP_free(v4);
return 1;
}