//
// LevelListLayer::onRefreshLevelList from 0x100348e80 to 0x100348f80 (256 bytes)
//
// 1 xrefs:
// > LevelListLayer::init @ 0x100348541
//
// 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:28:46 +0000
//
__int64 __fastcall LevelListLayer::onRefreshLevelList(__int64 a1, double a2)
{
__int64 v3; // rdi
__int64 v4; // r14
const std::string::value_type *Key; // rax
__int64 v6; // rax
__int64 v7; // rbx
double v8; // xmm0_8
__int64 v9; // rax
std::string __str; // [rsp+0h] [rbp-30h] BYREF
*(_QWORD *)(GameLevelManager::sharedState(a2) + 1224) = a1 + 544;
v3 = *(_QWORD *)(a1 + 648);
if ( v3 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 344LL))(v3, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 736) + 344LL))(*(_QWORD *)(a1 + 736), 1);
LevelBrowserLayer::setupLevelBrowser(a1, 0);
v4 = GJSearchObject::create_2(0);
GameToolbox::intToString(&__str, *(unsigned int *)(*(_QWORD *)(a1 + 912) + 344LL));
std::string::operator=((std::string *)(v4 + 320), &__str);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
*(_DWORD *)(v4 + 432) = 1;
Key = (const std::string::value_type *)GJSearchObject::getKey(v4);
std::string::assign((std::string *)(a1 + 920), Key);
v6 = GameLevelManager::sharedState(a2);
if ( (*(_BYTE *)(a1 + 920) & 1) != 0 )
v7 = *(_QWORD *)(a1 + 936);
else
v7 = a1 + 921;
v8 = GameLevelManager::resetTimerForKey(v6, v7);
v9 = GameLevelManager::sharedState(v8);
return GameLevelManager::getLevelLists(v9, v4);
}