//
// EC_KEY_set_private_key from 0x100e668 to 0x100e6f0 (136 bytes)
//
// 1 xrefs:
// > ??> @ 0xe9a88
//
// 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
//
bool __fastcall EC_KEY_set_private_key(__int64 a1, __int64 a2)
{
__int64 *v2; // x4
__int64 v3; // x4
unsigned int (*v4)(void); // x2
unsigned int (__fastcall *v7)(__int64, __int64); // x2
unsigned __int64 *v8; // x0
v2 = *(__int64 **)(a1 + 24);
if ( !v2 )
return 0;
v3 = *v2;
if ( !v3 )
return 0;
v4 = *(unsigned int (**)(void))(v3 + 328);
if ( v4 )
{
if ( !v4() )
return 0;
}
v7 = *(unsigned int (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 48LL);
if ( v7 )
{
if ( !v7(a1, a2) )
return 0;
}
BN_clear_free(*(_BYTE **)(a1 + 40));
v8 = BN_dup(a2);
*(_QWORD *)(a1 + 40) = v8;
return v8 != nullptr;
}