//
// EC_KEY_priv2buf from 0x100ecd4 to 0x100ed80 (172 bytes)
//
// 4 xrefs:
// > sub_100ADA4 @ 0x100ae8c
// > EC_KEY_print @ 0x100b0ec
// > i2d_ECPrivateKey @ 0x100cc60
// > ??> @ 0xb2b10
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 13:16:01 +0000
//
__int64 __fastcall EC_KEY_priv2buf(__int64 a1, __int64 *a2)
{
__int64 v4; // x0
__int64 result; // x0
__int64 v6; // x21
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;
}