//
// sub_100483EF0 from 0x100483ef0 to 0x100484045 (341 bytes)
//
// 3 xrefs:
// > LevelBrowserLayer::init @ 0x100481bc9
// > LevelBrowserLayer::init @ 0x100481c5c
// > LevelBrowserLayer::init @ 0x100481cf2
//
// 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:30:42 +0000
//
__int64 __fastcall sub_100483EF0(__int64 a1, __int64 a2)
{
__int64 v2; // rax
__int64 result; // rax
int v5; // ecx
int v6; // eax
_BOOL4 v7; // ecx
unsigned int v8; // edx
__int64 v9; // rdi
__int64 v10; // rax
__int64 v11; // rax
_QWORD v12[2]; // [rsp+0h] [rbp-10h] BYREF
v12[0] = v2;
result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( (_DWORD)result != dword_100BDEB30 )
{
dword_100BDEB30 = result;
GameToolbox::setOnOffSprite(*(_QWORD *)(a1 + 808), (_DWORD)result == 0);
GameToolbox::setOnOffSprite(*(_QWORD *)(a1 + 816), dword_100BDEB30 == 1);
GameToolbox::setOnOffSprite(*(_QWORD *)(a1 + 824), dword_100BDEB30 == 2);
v5 = *(_DWORD *)(*(_QWORD *)(a1 + 664) + 316LL);
v6 = 1;
if ( v5 != 22 && v5 != 33 )
v6 = 2 * (v5 == 34 || v5 == 23);
v7 = v6 == 2;
v8 = 22;
if ( v6 != 1 )
v8 = 2 * v7 + 21;
v9 = 33;
if ( v6 != 1 )
v9 = (unsigned int)(2 * v7 + 32);
if ( dword_100BDEB30 == 2 )
v9 = v8;
v10 = GJSearchObject::create_2(v9);
*(_BYTE *)(v10 + 404) = dword_100BDEB30 == 1;
result = LevelBrowserLayer::loadPage(a1, v10);
if ( *(_QWORD *)(a1 + 800) )
{
BYTE6(v12[0]) = -1;
WORD2(v12[0]) = 26112;
v11 = *(_QWORD *)(a1 + 664);
if ( v11 && (unsigned __int8)GameLevelManager::vaultTimedType(*(unsigned int *)(v11 + 316), v12) )
{
if ( LODWORD(v12[0]) == 1 )
{
memset((char *)v12 + 4, 51, 3);
}
else if ( LODWORD(v12[0]) == 2 )
{
BYTE6(v12[0]) = 126;
WORD2(v12[0]) = 6243;
}
}
return (*(__int64 (__fastcall **)(_QWORD, char *))(**(_QWORD **)(a1 + 800) + 960LL))(
*(_QWORD *)(a1 + 800),
(char *)v12 + 4);
}
}
return result;
}