//
// LevelListLayer::onBack from 0x10034b1d0 to 0x10034b371 (417 bytes)
//
// 1 xrefs:
// > ??> @ 0x100b20598
//
// 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::onBack(__int64 a1, __int64 a2)
{
__int64 v3; // rdi
__int128 v4; // xmm0
__int64 v5; // r15
__int64 v6; // rbx
__int64 v7; // rax
__int64 v8; // rax
char *v9; // rsi
__int64 v10; // rdi
__int64 SearchScene; // rbx
__int64 v12; // r14
char *v13; // rax
std::string __str; // [rsp+0h] [rbp-50h] BYREF
__int128 v15; // [rsp+20h] [rbp-30h] BYREF
void *__p; // [rsp+30h] [rbp-20h]
if ( *(_BYTE *)(a1 + 952) )
return;
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);
v3 = *(_QWORD *)(a1 + 960);
if ( v3 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 1160LL))(v3, 0);
*(double *)&v4 = LevelListLayer::verifyListName(a1);
v5 = GameLevelManager::sharedState(*(double *)&v4);
if ( (*(_BYTE *)(a1 + 888) & 1) != 0 )
{
sub_10001AD30(&__str, *(const void **)(a1 + 904), *(_QWORD *)(a1 + 896));
}
else
{
__str.__r_.__value_.__r.__words[2] = *(_QWORD *)(a1 + 904);
v4 = *(_OWORD *)(a1 + 888);
*(_OWORD *)&__str.__r_.__value_.__l.0 = v4;
}
std::string::operator=((std::string *)(v5 + 1160), &__str);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
if ( *(_DWORD *)(*(_QWORD *)(a1 + 912) + 544LL) != 2 )
{
LevelBrowserLayer::onBack(a1, a2);
return;
}
v6 = GameLevelManager::sharedState(*(double *)&v4);
v7 = GameLevelManager::sharedState(*(double *)&v4);
if ( (*(_BYTE *)(v7 + 1160) & 1) != 0 )
{
sub_10001AD30(&v15, *(const void **)(v7 + 1176), *(_QWORD *)(v7 + 1168));
if ( (v15 & 1) == 0 )
goto LABEL_12;
LABEL_15:
v9 = (char *)__p;
goto LABEL_16;
}
v8 = v7 + 1160;
__p = *(void **)(v8 + 16);
v4 = *(_OWORD *)v8;
v15 = *(_OWORD *)v8;
if ( (v15 & 1) != 0 )
goto LABEL_15;
LABEL_12:
v9 = (char *)&v15 + 1;
LABEL_16:
v10 = v6;
SearchScene = GameLevelManager::getSearchScene(v6, v9);
if ( (v15 & 1) != 0 )
{
v10 = (__int64)__p;
operator delete(__p);
}
if ( *(_BYTE *)(GameLevelManager::sharedState(*(double *)&v4) + 1216) || !SearchScene )
{
*(_BYTE *)(GameLevelManager::sharedState(*(double *)&v4) + 1216) = 0;
v10 = GJSearchObject::create_2(102);
SearchScene = LevelBrowserLayer::scene(v10);
}
v12 = cocos2d::CCDirector::sharedDirector(v10, v9);
v13 = cocos2d::CCTransitionFade::create_1(SearchScene, 0.5);
cocos2d::CCDirector::replaceScene(v12, v13);
}