//
// sub_108F980 from 0x108f980 to 0x108fa24 (164 bytes)
//
// 1 xrefs:
// > ??> @ 0x1552b48
//
// 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:17 +0000
//
__int64 __fastcall sub_108F980(__int64 *a1, _BYTE *a2, int a3, __int64 a4, __int64 a5, __int64 a6)
{
__int64 v6; // x3
__int64 v10; // x0
_BYTE *v11; // x0
int v12; // [xsp+20h] [xbp+20h]
_BYTE *v13; // [xsp+28h] [xbp+28h]
v6 = *a1;
if ( *a1 || (v12 = a3, v13 = a2, v10 = BN_new(), *a1 = v10, v6 = v10, a2 = v13, a3 = v12, v10) )
{
if ( BN_bin2bn(a2, a3, v6) )
return 1;
v11 = (_BYTE *)*a1;
if ( *a1 )
{
if ( (*(_QWORD *)(a6 + 40) & 1) != 0 )
BN_clear_free(v11);
else
BN_free((__int64)v11);
*a1 = 0;
}
}
return 0;
}