//
// LevelBrowserLayer::setIDPopupClosed from 0x100487080 to 0x1004871b1 (305 bytes)
//
// 4 xrefs:
// > LevelListLayer::setIDPopupClosed @ 0x10034b0f7
// > sub_10034B110 @ 0x10034b199
// > sub_1004871C0 @ 0x1004871cc
// > ??> @ 0x100b4cd80
//
// 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:43 +0000
//
void __fastcall LevelBrowserLayer::setIDPopupClosed(
__int64 a1,
__int64 a2,
int a3,
double a4,
double a5,
double a6,
__m128 a7)
{
int v8; // eax
int v9; // r14d
__int64 v10; // rsi
__int64 v11; // rax
__int64 v12; // rax
const std::string::value_type *v13; // rsi
int v14; // eax
int v15; // ecx
bool v16; // cc
unsigned int v17; // r14d
__int64 v18; // rax
__int64 PageObject; // rax
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) == 4 )
{
v8 = 0;
if ( a3 > 0 )
v8 = a3;
v9 = 999;
if ( v8 < 999 )
v9 = v8;
if ( *(_QWORD *)(a1 + 664) )
{
*(_DWORD *)(GameManager::sharedState() + 964) = 0;
*(_DWORD *)(GameManager::sharedState() + 968) = 0;
v10 = *(_QWORD *)(a1 + 664);
*(_DWORD *)(v10 + 420) = v9;
*(_DWORD *)(v10 + 392) = 0;
LevelBrowserLayer::loadPage(a1, v10, a4, a5, a6, a7);
v11 = *(_QWORD *)(a1 + 664);
if ( v11 && *(_DWORD *)(v11 + 316) == 99 )
{
v12 = GameManager::sharedState();
v13 = "0092";
}
else
{
v12 = GameManager::sharedState();
v13 = "0091";
}
GameManager::setIntGameVariable(v12, v13);
}
}
else
{
v14 = a3 - 1;
v15 = *(_DWORD *)(a1 + 744);
v16 = v15 < a3;
v17 = a3 - 1;
if ( v16 )
v17 = *(_DWORD *)(a1 + 744);
if ( v15 <= 0 )
v17 = v14;
v18 = *(_QWORD *)(a1 + 664);
if ( v18 && *(_DWORD *)(v18 + 392) != v17 )
{
*(_DWORD *)(GameManager::sharedState() + 964) = 0;
*(_DWORD *)(GameManager::sharedState() + 968) = 0;
PageObject = GJSearchObject::getPageObject(*(_QWORD *)(a1 + 664), v17);
LevelBrowserLayer::loadPage(a1, PageObject, a4, a5, a6, a7);
}
}
}