//
// EC_KEY_priv2buf from 0x9fe634 to 0x9fe6b4 (128 bytes)
//
// 4 xrefs:
// > sub_9F9F64 @ 0x9fa04c
// > EC_KEY_print @ 0x9fa2d8
// > i2d_ECPrivateKey @ 0x9fc330
// > ??> @ 0x7ac9c
//
// 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_priv2buf(int a1, int *a2)
{
int v4; // r0
int result; // r0
int v6; // r7
v4 = EC_KEY_priv2oct(a1);
if ( !v4 )
return 0;
v6 = CRYPTO_malloc(v4, "crypto/ec/ec_key.c", 619);
if ( !v6 )
return 0;
result = EC_KEY_priv2oct(a1);
if ( result )
{
*a2 = v6;
}
else
{
CRYPTO_free(v6, "crypto/ec/ec_key.c", 624);
return 0;
}
return result;
}