//
// sub_869888 from 0x869888 to 0x869928 (160 bytes)
//
// 1 xrefs:
// > ??> @ 0xac126c
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
int __fastcall sub_869888(int **a1, _BYTE *a2, int a3, int a4, int a5, int a6)
{
int *v6; // r3
int v11; // r0
int *v12; // r0
v6 = *a1;
if ( !*a1 )
{
v11 = BN_secure_new();
*a1 = (int *)v11;
if ( !v11 )
{
v11 = BN_new();
*a1 = (int *)v11;
if ( !v11 )
return 0;
}
v6 = (int *)v11;
}
if ( BN_bin2bn(a2, a3, v6) )
return 1;
v12 = *a1;
if ( !*a1 )
return 0;
if ( (*(_DWORD *)(a6 + 20) & 1) != 0 )
BN_clear_free(v12);
else
BN_free((int)v12);
*a1 = nullptr;
return 0;
}