//
// EC_POINT_set_affine_coordinates_GFp from 0x7eb1c0 to 0x7eb298 (216 bytes)
//
// 7 xrefs:
// > EC_GROUP_new_by_curve_name @ 0x7e8298
// > EC_KEY_set_public_key_affine_coordinates @ 0x7e9520
// > sub_7F0594 @ 0x7f0774
// > ec_GFp_simple_set_compressed_coordinates @ 0x7f25d4
// > ec_GFp_simple_oct2point @ 0x7f2c38
// > ec_GFp_simple_make_affine @ 0x7f4c94
// > ??> @ 0x615cc
//
// 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
//
int __fastcall EC_POINT_set_affine_coordinates_GFp(int a1, _DWORD *a2)
{
int (__fastcall *v2)(int); // r4
int result; // r0
v2 = *(int (__fastcall **)(int))(*(_DWORD *)a1 + 72);
if ( v2 )
{
if ( *(_DWORD *)a1 == *a2 )
{
result = v2(a1);
if ( result )
{
if ( EC_POINT_is_on_curve(a1, a2) <= 0 )
{
ERR_put_error(16, 124, 107, "crypto/ec/ec_lib.c", 707);
return 0;
}
else
{
return 1;
}
}
}
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;
}