//
// LevelListLayer::onBack from 0x10035fb10 to 0x10035fcb1 (417 bytes)
//
// 1 xrefs:
// > ??> @ 0x100918678
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
void __fastcall LevelListLayer::onBack(LevelListLayer *a1, cocos2d::CCObject *a2)
{
__int128 v2; // xmm0
CCTextInputNode *m_titleInput; // rdi
GameLevelManager *v5; // r15
GameLevelManager *v6; // rbx
GameLevelManager *v7; // rax
std::string *p_m_searchKey; // rax
const char *v9; // rsi
cocos2d::CCScene *SearchScene; // rbx
GJSearchObject *v11; // rax
cocos2d::CCDirector *v12; // r14
cocos2d::CCTransitionFade *v13; // rax
std::string __str; // [rsp+0h] [rbp-50h] BYREF
__int128 v15; // [rsp+20h] [rbp-30h] BYREF
void *__p; // [rsp+30h] [rbp-20h]
if ( a1->m_exiting )
return;
((void (__fastcall *)(LevelListLayer *, _QWORD))a1->setKeypadEnabled)(a1, 0);
m_titleInput = a1->m_titleInput;
if ( m_titleInput )
((void (__fastcall *)(CCTextInputNode *, _QWORD))m_titleInput->onClickTrackNode)(m_titleInput, 0);
LevelListLayer::verifyListName(a1);
v5 = GameLevelManager::sharedState();
if ( (a1->m_searchKey1.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(
&__str,
a1->m_searchKey1.m_data.m_long.longStorage,
a1->m_searchKey1.m_data.m_long.size,
*(double *)&v2);
}
else
{
__str.__r_.__value_.__r.__words[2] = (std::string::size_type)a1->m_searchKey1.m_data.m_long.longStorage;
v2 = *(_OWORD *)&a1->m_searchKey1.m_data.m_short.sizex2;
*(_OWORD *)&__str.__r_.__value_.__l.0 = v2;
}
std::string::operator=((std::string *)&v5->m_searchKey, &__str);
if ( (*(_BYTE *)&__str.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__str.__r_.__value_.__l.__data_);
if ( a1->m_levelList->m_listType != Editor )
{
LevelBrowserLayer::onBack(a1, a2);
return;
}
v6 = GameLevelManager::sharedState();
v7 = GameLevelManager::sharedState();
if ( (v7->m_searchKey.m_data.m_short.sizex2 & 1) != 0 )
{
sub_100006B70(&v15, v7->m_searchKey.m_data.m_long.longStorage, v7->m_searchKey.m_data.m_long.size, *(double *)&v2);
if ( (v15 & 1) == 0 )
goto LABEL_12;
LABEL_15:
v9 = (const char *)__p;
goto LABEL_16;
}
p_m_searchKey = &v7->m_searchKey;
__p = p_m_searchKey->m_data.m_long.longStorage;
v15 = *(_OWORD *)&p_m_searchKey->m_data.m_short.sizex2;
if ( (v15 & 1) != 0 )
goto LABEL_15;
LABEL_12:
v9 = (char *)&v15 + 1;
LABEL_16:
SearchScene = GameLevelManager::getSearchScene(v6, v9);
if ( (v15 & 1) != 0 )
operator delete(__p);
if ( GameLevelManager::sharedState()->m_returnToLocalLevels || !SearchScene )
{
GameLevelManager::sharedState()->m_returnToLocalLevels = 0;
v11 = GJSearchObject::create_2(MyLists);
SearchScene = LevelBrowserLayer::scene(v11);
}
v12 = cocos2d::CCDirector::sharedDirector();
v13 = cocos2d::CCTransitionFade::create_1(0.5, SearchScene);
cocos2d::CCDirector::replaceScene(v12, v13);
}