//
// sub_10063E3F0 from 0x10063e3f0 to 0x10063e5f7 (519 bytes)
//
// 4 xrefs:
// > EditorUI::setupViewMenu @ 0x10063de1d
// > sub_10063E320 @ 0x10063e38d
// > EditorUI::toggleViewOption @ 0x10063e9cb
// > EditorUI::toggleViewOption @ 0x10063ea55
//
// This function is hookable on this platform (idp: pc, 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 12:34:42 +0000
//
char __fastcall sub_10063E3F0(__int64 a1, unsigned __int64 a2)
{
int v2; // ebx
char result; // al
unsigned __int64 v4; // r8
unsigned __int64 v5; // r9
char *v6; // rax
__int64 **v7; // rax
__int64 *v8; // r14
unsigned __int64 v9; // r8
unsigned __int64 v10; // rax
__int64 v11; // rax
unsigned int v12; // eax
__int64 v13; // rax
__int64 v14; // rax
const std::string::value_type *v15; // r14
v2 = a2;
switch ( (int)a2 )
{
case 14:
return *(_BYTE *)(GameManager::sharedState() + 921);
case 15:
return *(_BYTE *)(GameManager::sharedState() + 922);
case 17:
v6 = &byte_100BE7AB4;
return *v6;
case 18:
v6 = &byte_100BE7AB5;
return *v6;
case 19:
v6 = &byte_100BDE830;
return *v6;
case 21:
v6 = &byte_100BE7AC0;
return *v6;
case 22:
v6 = &byte_100BE7AC1;
return *v6;
default:
v4 = *(_QWORD *)(a1 + 1400);
if ( !v4 )
return 0;
v5 = (0x101010101010101LL
* ((((v4 - ((v4 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL)
+ (((v4 - ((v4 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)
+ ((((v4 - ((v4 >> 1) & 0x5555555555555555LL)) & 0x3333333333333333LL)
+ (((v4 - ((v4 >> 1) & 0x5555555555555555LL)) >> 2) & 0x3333333333333333LL)) >> 4))
& 0xF0F0F0F0F0F0F0FLL)) >> 56;
if ( v5 > 1 )
{
a2 = (int)a2;
if ( v4 <= (int)a2 )
{
if ( (v4 | (int)a2) >> 32 )
a2 = (int)a2 % v4;
else
a2 = (unsigned int)a2 % (unsigned int)v4;
}
}
else
{
a2 = (int)a2 & (v4 - 1);
}
v7 = *(__int64 ***)(*(_QWORD *)(a1 + 1392) + 8 * a2);
if ( !v7 )
return 0;
v8 = *v7;
if ( !*v7 )
return 0;
if ( (unsigned int)v5 < 2 )
{
v9 = v4 - 1;
while ( 1 )
{
v11 = v8[1];
if ( v11 == v2 )
{
if ( *((_DWORD *)v8 + 4) == v2 )
goto LABEL_37;
}
else if ( (v9 & v11) != a2 )
{
return 0;
}
v8 = (__int64 *)*v8;
result = 0;
if ( !v8 )
return result;
}
}
break;
}
while ( 1 )
{
v10 = v8[1];
if ( v10 == v2 )
break;
if ( v10 < v4 )
goto LABEL_28;
if ( (v4 | v10) >> 32 )
{
v10 %= v4;
LABEL_28:
if ( v10 != a2 )
return 0;
goto LABEL_23;
}
if ( (unsigned int)v10 % (unsigned int)v4 != a2 )
return 0;
LABEL_23:
v8 = (__int64 *)*v8;
result = 0;
if ( !v8 )
return result;
}
if ( *((_DWORD *)v8 + 4) != v2 )
goto LABEL_23;
LABEL_37:
v12 = *((unsigned __int8 *)v8 + 24);
if ( (v12 & 1) != 0 )
v13 = v8[4];
else
v13 = v12 >> 1;
if ( !v13 )
return 0;
v14 = GameManager::sharedState();
if ( (v8[3] & 1) != 0 )
v15 = (const std::string::value_type *)v8[5];
else
v15 = (char *)v8 + 25;
return GameManager::getGameVariable(v14, v15) ^ (v2 < 0);
}