//
// sub_10B2CA4 from 0x10b2ca4 to 0x10b2d58 (180 bytes)
//
// 1 xrefs:
// > ??> @ 0x14104a0
//
// 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:17:44 +0000
//
__int64 __fastcall sub_10B2CA4(__int64 a1, __int64 a2)
{
__int64 *v4; // x22
_QWORD *v5; // x21
__int64 v6; // x1
v4 = *(__int64 **)(a1 + 40);
if ( !*(_QWORD *)(a1 + 16) && !*v4 )
{
ERR_put_error(16, 199, 139, (__int64)"crypto/ec/ec_pmeth.c", 410);
return 0;
}
v5 = (_QWORD *)EC_KEY_new();
if ( v5 )
{
EVP_PKEY_assign(a2, 0x198u, (__int64)v5);
v6 = *(_QWORD *)(a1 + 16);
if ( !v6 )
{
if ( !(unsigned int)EC_KEY_set_group(v5, *v4) )
return 0;
return EC_KEY_generate_key(*(_QWORD **)(a2 + 32));
}
if ( (unsigned int)EVP_PKEY_copy_parameters((_DWORD *)a2, v6) )
return EC_KEY_generate_key(*(_QWORD **)(a2 + 32));
}
return 0;
}