//
// ec_key_simple_oct2priv from 0x9fe564 to 0x9fe620 (188 bytes)
//
// 5 xrefs:
// > ??> @ 0x7b2cc
// > ??> @ 0xd16e20
// > ??> @ 0xd16ee4
// > ??> @ 0xd16fa8
// > ??> @ 0xd196ec
//
// 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:07:36 +0000
//
int __fastcall ec_key_simple_oct2priv(int a1, _BYTE *a2, int a3)
{
int *v3; // r4
int *v5; // r4
int v7; // r0
_BYTE *v8; // [sp+8h] [bp-Ch]
int v9; // [sp+Ch] [bp-8h]
v3 = *(int **)(a1 + 20);
if ( v3
|| (v9 = a3, v8 = a2, v7 = BN_secure_new(), a2 = v8, a3 = v9, v3 = (int *)v7, (*(_DWORD *)(a1 + 20) = v7) != 0) )
{
v5 = BN_bin2bn(a2, a3, v3);
*(_DWORD *)(a1 + 20) = v5;
if ( v5 )
{
return 1;
}
else
{
ERR_put_error(16, 259, 3, "crypto/ec/ec_key.c", 606);
return 0;
}
}
else
{
ERR_put_error(16, 259, 65, "crypto/ec/ec_key.c", 601);
return 0;
}
}