//
// LevelListLayer::cloneList from 0x10034b670 to 0x10034b81d (429 bytes)
//
// 1 xrefs:
// > LevelListLayer::FLAlert_Clicked @ 0x10034b5ec
//
// 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:47 +0000
//
void __fastcall LevelListLayer::cloneList(__int64 a1)
{
__int64 v2; // rdx
double v3; // xmm0_8
__int64 v4; // rax
__int64 v5; // rax
__int64 NewLevelList; // r14
__int64 v7; // rsi
std::string *v8; // rax
unsigned int v9; // eax
std::string::pointer data; // rdi
__int64 v11; // rcx
int v12; // eax
__int64 v13; // rbx
_BYTE *v14; // rax
char *v15; // rax
std::string __str; // [rsp+0h] [rbp-50h] BYREF
std::string v17; // [rsp+20h] [rbp-30h] BYREF
if ( *(_BYTE *)(a1 + 952) )
return;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
*(_BYTE *)(a1 + 952) = 1;
*(_QWORD *)&v3 = GameManager::sharedState(a1, 0, v2).u64[0];
*(_DWORD *)(v4 + 708) = 14;
v5 = GameLevelManager::sharedState(v3);
NewLevelList = GameLevelManager::createNewLevelList(v5);
*(_BYTE *)(GameLevelManager::sharedState(v3) + 1216) = 1;
v7 = *(_QWORD *)(a1 + 912);
*(_DWORD *)(NewLevelList + 360) = *(_DWORD *)(v7 + 360);
std::string::operator=((std::string *)(NewLevelList + 504), (const std::string *)(v7 + 504));
GJLevelList::duplicateListLevels(NewLevelList, *(_QWORD *)(a1 + 912));
v8 = *(std::string **)(a1 + 912);
if ( (*(_BYTE *)&v8[18].__r_.__value_.__s.0 & 1) != 0 )
{
sub_10001AD30(&v17, v8[18].__r_.__value_.__l.__data_, v8[18].__r_.__value_.__l.__size_);
v9 = (unsigned int)v17.__r_.__value_.__l.0;
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_4:
if ( v9 >> 1 > 0x17uLL )
goto LABEL_5;
LABEL_9:
std::string::append(&v17, " 2");
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_6;
LABEL_10:
sub_10001AD30(&__str, v17.__r_.__value_.__l.__data_, v17.__r_.__value_.__l.__size_);
goto LABEL_11;
}
}
else
{
v17 = v8[18];
v9 = (unsigned int)v17.__r_.__value_.__l.0;
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_4;
}
if ( v17.__r_.__value_.__l.__size_ <= 0x17 )
goto LABEL_9;
LABEL_5:
if ( (v9 & 1) != 0 )
goto LABEL_10;
LABEL_6:
__str = v17;
LABEL_11:
data = (std::string::pointer)(NewLevelList + 432);
std::string::operator=((std::string *)(NewLevelList + 432), &__str);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
{
data = __str.__r_.__value_.__l.__data_;
operator delete(__str.__r_.__value_.__l.__data_);
}
v11 = *(_QWORD *)(a1 + 912);
v12 = *(_DWORD *)(v11 + 380);
if ( !v12 )
v12 = *(_DWORD *)(v11 + 344);
*(_DWORD *)(NewLevelList + 380) = v12;
v13 = cocos2d::CCDirector::sharedDirector(data, &__str);
v14 = LevelListLayer::scene(NewLevelList, (__int64)&__str);
v15 = cocos2d::CCTransitionFade::create_1((__int64)v14, 0.5);
cocos2d::CCDirector::replaceScene(v13, v15);
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v17.__r_.__value_.__l.__data_);
}