//
// EC_POINT_point2oct from 0x1012244 to 0x101233c (248 bytes)
//
// 6 xrefs:
// > i2o_ECPublicKey @ 0x100d0ec
// > i2o_ECPublicKey @ 0x100d11c
// > i2o_ECPublicKey @ 0x100d184
// > EC_POINT_point2buf @ 0x1012470
// > EC_POINT_point2buf @ 0x10124cc
// > ??> @ 0x52b88
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:16:03 +0000
//
__int64 __fastcall EC_POINT_point2oct(__int64 a1, _QWORD *a2)
{
_DWORD *v2; // x6
__int64 (*v3)(void); // x19
v2 = *(_DWORD **)a1;
v3 = *(__int64 (**)(void))(*(_QWORD *)a1 + 160LL);
if ( v3 )
{
if ( v2 != (_DWORD *)*a2 )
{
LABEL_3:
ERR_put_error(16, 123, 101, "crypto/ec/ec_oct.c", 97);
return 0;
}
if ( (*v2 & 1) == 0 )
return v3();
}
else
{
if ( (*v2 & 1) == 0 )
{
ERR_put_error(16, 123, 66, "crypto/ec/ec_oct.c", 93);
return 0;
}
if ( v2 != (_DWORD *)*a2 )
goto LABEL_3;
}
if ( v2[1] == 406 )
return ec_GFp_simple_point2oct(a1);
else
return ec_GF2m_simple_point2oct(a1);
}