//
// EC_POINT_bn2point from 0xaa0090 to 0xaa01c4 (308 bytes)
//
// 2 xrefs:
// > EC_POINT_hex2point @ 0xaa02ec
// > ??> @ 0x8450c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:09:12 +0000
//
_DWORD *__fastcall EC_POINT_bn2point(int *a1, _DWORD *a2, _DWORD *a3)
{
int v6; // r0
int v7; // r4
int v8; // r4
_BYTE *v9; // r9
v6 = BN_num_bits(a2);
v7 = v6 + 7;
if ( v6 + 7 < 0 )
v7 = v6 + 14;
v8 = v7 >> 3;
if ( !v8 )
return nullptr;
v9 = CRYPTO_malloc((void *)v8, (int)"crypto/ec/ec_print.c", 42);
if ( !v9 )
return nullptr;
if ( BN_bn2bin(a2, v9) )
{
if ( a3 )
{
if ( EC_POINT_oct2point((int)a1, a3) )
{
LABEL_8:
CRYPTO_free(v9, (int)"crypto/ec/ec_print.c", 66);
return a3;
}
goto LABEL_12;
}
a3 = EC_POINT_new(a1);
if ( a3 )
{
if ( EC_POINT_oct2point((int)a1, a3) )
goto LABEL_8;
EC_POINT_clear_free((int)a3);
LABEL_12:
CRYPTO_free(v9, (int)"crypto/ec/ec_print.c", 62);
return nullptr;
}
CRYPTO_free(v9, (int)"crypto/ec/ec_print.c", 53);
return nullptr;
}
else
{
CRYPTO_free(v9, (int)"crypto/ec/ec_print.c", 47);
return nullptr;
}
}