//
// EC_KEY_set_public_key from 0xd90398 to 0xd903ec (84 bytes)
//
// 2 xrefs:
// > EC_KEY_set_public_key_affine_coordinates @ 0xd905cc
// > ??> @ 0x4d2e0
//
// 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 EC_KEY_set_public_key(_QWORD *a1, __int64 a2)
{
__int64 (*v4)(void); // x2
__int64 result; // x0
__int64 v6; // x0
v4 = *(__int64 (**)(void))(*a1 + 56LL);
if ( !v4 || (result = v4(), (_DWORD)result) )
{
EC_POINT_free(a1[4]);
v6 = EC_POINT_dup(a2, a1[3]);
a1[4] = v6;
return v6 != 0;
}
return result;
}