//
// ec_key_simple_oct2priv from 0x7e9964 to 0x7e9a20 (188 bytes)
//
// 5 xrefs:
// > ??> @ 0x6184c
// > ??> @ 0xab2744
// > ??> @ 0xab2808
// > ??> @ 0xab28cc
// > ??> @ 0xab5010
//
// 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_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;
}
}