//
// EC_POINT_set_affine_coordinates_GFp from 0xd92014 to 0xd920e4 (208 bytes)
//
// 7 xrefs:
// > EC_GROUP_new_by_curve_name @ 0xd8f3cc
// > EC_KEY_set_public_key_affine_coordinates @ 0xd90488
// > sub_D96D88 @ 0xd96f70
// > ec_GFp_simple_set_compressed_coordinates @ 0xd98908
// > ec_GFp_simple_oct2point @ 0xd98fa4
// > ec_GFp_simple_make_affine @ 0xd9aeac
// > ??> @ 0x95d00
//
// 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_POINT_set_affine_coordinates_GFp(__int64 a1, _QWORD *a2)
{
__int64 (*v2)(void); // x19
__int64 result; // x0
bool v6; // cc
v2 = *(__int64 (**)(void))(*(_QWORD *)a1 + 136LL);
if ( v2 )
{
if ( *(_QWORD *)a1 == *a2 )
{
result = v2();
if ( (_DWORD)result )
{
v6 = (int)EC_POINT_is_on_curve(a1, a2) <= 0;
result = 1;
if ( v6 )
{
ERR_put_error(16, 124, 107, "crypto/ec/ec_lib.c", 707);
return 0;
}
}
}
else
{
ERR_put_error(16, 124, 101, "crypto/ec/ec_lib.c", 699);
return 0;
}
}
else
{
ERR_put_error(16, 124, 66, "crypto/ec/ec_lib.c", 694);
return 0;
}
return result;
}