//
// EC_POINT_oct2point from 0x101233c to 0x1012438 (252 bytes)
//
// 5 xrefs:
// > EC_GROUP_new_from_ecparameters @ 0x100c468
// > EC_KEY_oct2key @ 0x100ea2c
// > EC_POINT_bn2point @ 0x10b3168
// > EC_POINT_bn2point @ 0x10b31bc
// > ??> @ 0xd9a68
//
// 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_oct2point(__int64 a1, _QWORD *a2, __int64 a3, __int64 a4, __int64 a5)
{
_DWORD *v5; // x5
unsigned int (*v6)(void); // x8
v5 = *(_DWORD **)a1;
v6 = *(unsigned int (**)(void))(*(_QWORD *)a1 + 168LL);
if ( v6 )
{
if ( v5 != (_DWORD *)*a2 )
goto LABEL_3;
if ( (*v5 & 1) == 0 )
return v6();
}
else
{
if ( (*v5 & 1) == 0 )
{
ERR_put_error(16, 122, 66, "crypto/ec/ec_oct.c", 123);
return 0;
}
if ( v5 != (_DWORD *)*a2 )
{
LABEL_3:
ERR_put_error(16, 122, 101, "crypto/ec/ec_oct.c", 127);
return 0;
}
}
if ( v5[1] == 406 )
return ec_GFp_simple_oct2point(a1, a2, a3, a4, a5);
else
return ec_GF2m_simple_oct2point(a1, a2, a3, a4, a5);
}