//
// sub_100617D88 from 0x100617d88 to 0x100617e20 (152 bytes)
//
// 2 xrefs:
// > sub_100620868 @ 0x100620980
// > sub_100620868 @ 0x1006209a8
//
// 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
//
__int64 __fastcall sub_100617D88(__int64 a1, int a2, __int64 a3)
{
__int64 result; // x0
__int16 v5; // w2
int v6; // w4
unsigned int v7; // w9
unsigned int v8; // w10
int v9; // w9
if ( !a1 )
{
v5 = 67;
v6 = 525;
LABEL_10:
sub_1005E0E48(40, 111, v5, (__int64)"ui_lib.c", v6);
return 0xFFFFFFFFLL;
}
if ( a2 == 2 )
return *(_DWORD *)(a1 + 40) & 1;
if ( a2 != 1 )
{
v5 = 106;
v6 = 543;
goto LABEL_10;
}
v7 = *(_DWORD *)(a1 + 40);
result = (v7 >> 8) & 1;
v8 = v7 & 0xFFFFFEFF;
v9 = v7 | 0x100;
if ( !a3 )
v9 = v8;
*(_DWORD *)(a1 + 40) = v9;
return result;
}