//
// LevelListLayer::FLAlert_Clicked from 0x14042f330 to 0x14042f533 (515 bytes)
//
// 2 xrefs:
// > ??> @ 0x14078edc8
// > ??> @ 0x140926bac
//
// 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:14 +0000
//
// Hidden C++ exception states: #wind=3
void __fastcall LevelListLayer::FLAlert_Clicked(__int64 a1, __int64 a2, char a3)
{
int v6; // eax
int v7; // eax
void *v8; // rcx
void *v9; // rcx
__int64 v10; // rcx
void *Block[2]; // [rsp+30h] [rbp-58h] BYREF
__int64 v12; // [rsp+40h] [rbp-48h]
void *v13; // [rsp+48h] [rbp-40h]
void *v14[2]; // [rsp+50h] [rbp-38h] BYREF
__int64 v15; // [rsp+60h] [rbp-28h]
unsigned __int64 v16; // [rsp+68h] [rbp-20h]
v6 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 56LL))(a2) - 1001;
if ( v6 )
{
v7 = v6 - 3;
if ( v7 )
{
if ( v7 == 1 )
{
if ( a3 )
LevelListLayer::cloneList(a1 - 552);
}
else
{
LevelBrowserLayer::FLAlert_Clicked((_QWORD *)a1, a2, a3);
}
}
else if ( a3 )
{
*(_OWORD *)v14 = 0;
v15 = 0;
v16 = 15;
LOBYTE(v14[0]) = 0;
*(_OWORD *)Block = 0;
v12 = 0;
LevelListLayer::startServerDelete(a1 - 552, v14, Block);
v8 = Block[0];
if ( Block[0] )
{
if ( ((v12 - (unsigned __int64)Block[0]) & 0xFFFFFFFFFFFFFFFCuLL) >= 0x1000 )
{
v8 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v8);
}
if ( v16 > 0xF )
{
v9 = v14[0];
if ( v16 + 1 >= 0x1000 )
{
v9 = *((void **)v14[0] - 1);
if ( (unsigned __int64)((char *)v14[0] - (char *)v9 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v9);
}
}
}
else if ( a3 )
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 328) + 1040LL))(*(_QWORD *)(a1 + 328), 0);
v10 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v13 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v13);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v10 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::deleteLevelList(v10, *(unsigned int **)(a1 + 368));
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)(a1 - 552) + 1056LL))(a1 - 552, 0);
*(_BYTE *)(a1 + 416) = 1;
}
}