//
// BN_BLINDING_create_param from 0xa80730 to 0xa808d4 (420 bytes)
//
// 3 xrefs:
// > RSA_setup_blinding @ 0xa420c0
// > BN_BLINDING_update @ 0xa80a18
// > ??> @ 0x7fd1c
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 12:08:49 +0000
//
int *__fastcall BN_BLINDING_create_param(int *a1, int a2, int a3, int a4, int a5, int a6)
{
int *v9; // r4
int v10; // r0
int v11; // r5
int (__fastcall *v13)(int, int, int, int, int, int); // r12
int v14; // lr
int *v15; // r0
int v16; // r0
int v17; // r0
int v18; // [sp+Ch] [bp-8h] BYREF
if ( a1 )
{
v9 = a1;
}
else
{
v15 = BN_BLINDING_new(0, 0, a3);
v9 = v15;
if ( !v15 )
{
LABEL_27:
BN_BLINDING_free((int)v9);
return nullptr;
}
}
if ( *v9 || (v16 = BN_new(), (*v9 = v16) != 0) )
{
if ( v9[1] || (v17 = BN_new(), (v9[1] = v17) != 0) )
{
if ( a2 )
{
BN_free(v9[2]);
v10 = BN_dup(a2);
v9[2] = v10;
}
else
{
v10 = v9[2];
}
if ( v10 )
{
if ( a5 )
v9[8] = a5;
if ( a6 )
v9[7] = a6;
v11 = 33;
while ( BN_rand_range(*v9, v9[3]) )
{
if ( int_bn_mod_inverse(v9[1], *v9, v9[3], a4, &v18) )
{
v13 = (int (__fastcall *)(int, int, int, int, int, int))v9[8];
if ( v13 && (v14 = v9[7]) != 0 )
{
if ( !v13(*v9, *v9, v9[2], v9[3], a4, v14) )
break;
}
else if ( !BN_mod_exp(*v9, *v9, v9[2], v9[3], a4) )
{
break;
}
return v9;
}
if ( !v18 )
break;
if ( !--v11 )
{
ERR_put_error(3, 128, 113, (int)"crypto/bn/bn_blind.c", 263);
break;
}
}
}
}
}
if ( !a1 )
goto LABEL_27;
return v9;
}