//
// BN_BLINDING_convert_ex from 0x1093864 to 0x1093938 (212 bytes)
//
// 6 xrefs:
// > sub_1053210 @ 0x1053550
// > sub_1053210 @ 0x1053594
// > sub_10536BC @ 0x1053960
// > sub_10536BC @ 0x105399c
// > BN_BLINDING_convert @ 0x1093948
// > ??> @ 0x82b28
//
// 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:22 +0000
//
__int64 __fastcall BN_BLINDING_convert_ex(__int64 a1, unsigned __int64 *a2, _QWORD *a3, __int64 a4)
{
__int64 result; // x0
_BOOL4 v9; // w20
if ( !*a3 || !a3[1] )
{
ERR_put_error(3, 100, 107, (__int64)"crypto/bn/bn_blind.c", 137);
return 0;
}
if ( *((_DWORD *)a3 + 10) == -1 )
{
*((_DWORD *)a3 + 10) = 0;
if ( a2 )
{
LABEL_6:
v9 = BN_copy(a2, a3[1]) != nullptr;
return (unsigned int)BN_mod_mul(a1, a1, *a3, a3[3], a4) && v9;
}
}
else
{
result = BN_BLINDING_update(a3, a4);
if ( !(_DWORD)result )
return result;
if ( a2 )
goto LABEL_6;
}
v9 = 1;
return (unsigned int)BN_mod_mul(a1, a1, *a3, a3[3], a4) && v9;
}