//
// EC_KEY_oct2key from 0x9fe338 to 0x9fe3e8 (176 bytes)
//
// 4 xrefs:
// > sub_9F8980 @ 0x9f8b40
// > d2i_ECPrivateKey @ 0x9fc134
// > o2i_ECPublicKey @ 0x9fc7ac
// > ??> @ 0x7ab7c
//
// 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_oct2key(_DWORD *a1, _BYTE *a2, int a3, int a4)
{
int v5; // r0
int v7; // r1
int v9; // r3
_DWORD *v10; // r5
int result; // r0
int v12; // r0
if ( !a1 )
return 0;
v5 = a1[3];
if ( !v5 )
return 0;
v7 = a1[4];
v9 = a3;
v10 = a1;
if ( !v7 )
{
v12 = EC_POINT_new(v5);
v9 = a3;
v7 = v12;
v10[4] = v12;
if ( !v12 )
return 0;
v5 = v10[3];
}
if ( !EC_POINT_oct2point(v5, v7, a2, v9, a4) )
return 0;
result = 1;
if ( (**(_DWORD **)v10[3] & 2) == 0 )
v10[7] = *a2 & 0xFE;
return result;
}