//
// BN_set_params from 0xd79c24 to 0xd79cc8 (164 bytes)
//
// 1 xrefs:
// > ??> @ 0x7d1f0
//
// 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
//
unsigned __int64 __fastcall BN_set_params(unsigned __int64 result, int a2, int a3, int a4)
{
int v4; // w4
if ( (result & 0x80000000) == 0 )
{
if ( (int)result > 31 )
LODWORD(result) = 31;
v4 = 1 << result;
dword_125D530 = result;
result = (unsigned __int64)&unk_1238000;
dword_1238944 = v4;
}
if ( (a2 & 0x80000000) == 0 )
{
if ( a2 > 31 )
a2 = 31;
result = (unsigned int)(1 << a2);
dword_125D534 = a2;
dword_1238948 = 1 << a2;
}
if ( (a3 & 0x80000000) == 0 )
{
if ( a3 > 31 )
a3 = 31;
dword_125D538 = a3;
result = (unsigned int)(1 << a3);
dword_123894C = 1 << a3;
}
if ( (a4 & 0x80000000) == 0 )
{
if ( a4 > 31 )
a4 = 31;
dword_125D53C = a4;
dword_1238950 = 1 << a4;
return (unsigned int)(1 << a4);
}
return result;
}