//
// LevelInfoLayer::onUpdate from 0x1404243c0 to 0x140424525 (357 bytes)
//
// 2 xrefs:
// > LevelInfoLayer::init @ 0x14041d0c6
// > ??> @ 0x14092693c
//
// 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 11:32:10 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall LevelInfoLayer::onUpdate(__int64 a1)
{
unsigned int v2; // edi
__int64 v3; // rsi
cocos2d::CCString *v4; // rax
char *CString; // rax
__int64 v6; // rcx
__int64 v7; // rdx
__int64 v8; // rcx
void *v9; // [rsp+30h] [rbp+8h]
void *v10; // [rsp+30h] [rbp+8h]
if ( !*(_BYTE *)(a1 + 488) )
{
if ( (unsigned __int8)LevelInfoLayer::shouldDownloadLevel(a1) )
{
LevelInfoLayer::downloadLevel(a1);
}
else
{
v2 = *(_DWORD *)(*(_QWORD *)(a1 + 504) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 504) + 332LL);
v3 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v9 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v9);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v3 = *(_QWORD *)&qword_14090BFB0;
}
v4 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v2);
CString = (char *)cocos2d::CCString::getCString(v4);
if ( GameLevelManager::isTimeValid(v3, CString, 600.0) )
{
LevelInfoLayer::showUpdateAlert(v6, 1);
}
else
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 496) + 336LL))(*(_QWORD *)(a1 + 496), 0);
LOBYTE(v7) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 648) + 336LL))(*(_QWORD *)(a1 + 648), v7);
v8 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v10 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v10);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v8 = *(_QWORD *)&qword_14090BFB0;
}
*(_QWORD *)(v8 + 1416) = a1 + 416;
GameLevelManager::updateLevel((cocos2d::CCActionManager **)v8, *(_QWORD *)(a1 + 504));
}
}
}
}