//
// UI_ctrl from 0x83b1d4 to 0x83b27c (168 bytes)
//
// 1 xrefs:
// > ??> @ 0x6696c
//
// 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 UI_ctrl(int a1, int a2, int a3)
{
int result; // r0
int v5; // r1
unsigned int v6; // r1
if ( a1 )
{
if ( a2 == 1 )
{
v5 = *(_DWORD *)(a1 + 16);
result = BYTE1(v5) & 1;
if ( a3 )
v6 = v5 | 0x100;
else
v6 = v5 & 0xFFFFFEFF;
*(_DWORD *)(a1 + 16) = v6;
}
else if ( a2 == 2 )
{
return *(_DWORD *)(a1 + 16) & 1;
}
else
{
ERR_put_error(40, 111, 106, (int)"crypto/ui/ui_lib.c", 501);
return -1;
}
}
else
{
ERR_put_error(40, 111, 67, (int)"crypto/ui/ui_lib.c", 483);
return -1;
}
return result;
}