//
// BN_set_params from 0x7d3ca0 to 0x7d3d68 (200 bytes)
//
// 1 xrefs:
// > ??> @ 0x5fa4c
//
// 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 BN_set_params(int result, int a2, int a3, int a4)
{
if ( result >= 0 )
{
if ( result >= 31 )
result = 31;
dword_AD2DF8 = result;
dword_AC0A80 = 1 << result;
}
if ( a2 >= 0 )
{
if ( a2 >= 31 )
a2 = 31;
result = (int)&dword_AC0A80;
dword_AD2DFC = a2;
dword_AC0A84 = 1 << a2;
}
if ( a3 >= 0 )
{
if ( a3 >= 31 )
a3 = 31;
result = 1 << a3;
dword_AD2E00 = a3;
dword_AC0A88 = 1 << a3;
}
if ( a4 >= 0 )
{
if ( a4 >= 31 )
a4 = 31;
dword_AD2E04 = a4;
dword_AC0A8C = 1 << a4;
return (int)&dword_AD2DF8;
}
return result;
}