//
// LevelListLayer::onRefreshLevelList from 0x100244b08 to 0x100244bf4 (236 bytes)
//
// 1 xrefs:
// > LevelListLayer::init @ 0x1002442e0
//
// 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::onRefreshLevelList(LevelListLayer *a1, cocos2d::CCObject *a2)
{
CCMenuItemSpriteExtra *m_refreshBtn; // x0
GJSearchObject *v4; // x20
const char *Key; // x0
std::string *p_m_searchKey2; // x21
GameLevelManager *v7; // x0
GameLevelManager *v8; // x0
std::string __str; // [xsp+8h] [xbp-38h] BYREF
GameLevelManager::sharedState()->m_levelManagerDelegate = &a1->LevelManagerDelegate;
m_refreshBtn = a1->m_refreshBtn;
if ( m_refreshBtn )
((void (__fastcall *)(CCMenuItemSpriteExtra *, _QWORD))m_refreshBtn->setVisible)(m_refreshBtn, 0);
((void (__fastcall *)(LoadingCircle *, __int64))a1->m_circle->setVisible)(a1->m_circle, 1);
LevelBrowserLayer::setupLevelBrowser(a1, nullptr);
v4 = GJSearchObject::create_2((SearchType)0);
GameToolbox::intToString((unsigned int)a1->m_levelList->m_listID, &__str);
std::string::operator=((std::string *)&v4->m_searchQuery, &__str);
if ( SHIBYTE(__str.__r_.__value_.__r.__words[2]) < 0 )
operator delete(__str.__r_.__value_.__l.__data_);
v4->m_searchMode = 1;
Key = GJSearchObject::getKey(v4);
p_m_searchKey2 = &a1->m_searchKey2;
std::string::assign((std::string *)&a1->m_searchKey2, Key);
v7 = GameLevelManager::sharedState();
if ( a1->m_searchKey2.m_data.m_short.shortStorage.__elems_[22] < 0 )
p_m_searchKey2 = (std::string *)p_m_searchKey2->m_data.m_long.capacitym1;
GameLevelManager::resetTimerForKey(v7, (const char *)p_m_searchKey2);
v8 = GameLevelManager::sharedState();
GameLevelManager::getLevelLists(v8, v4);
}