//
// GauntletSelectLayer::onRefresh from 0x1401f98d0 to 0x1401f99ed (285 bytes)
//
// 2 xrefs:
// > GauntletSelectLayer::init @ 0x1401f95fb
// > ??> @ 0x1406cc990
//
// 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
//
// Hidden C++ exception states: #wind=3
void GauntletSelectLayer::onRefresh(GauntletSelectLayer *a1, cocos2d::CCObject *a2)
{
_BOOL8 v3; // rdx
BoomScrollLayer *m_scrollLayer; // r8
_BOOL8 v5; // rdx
__int64 v6; // rcx
_BOOL8 v7; // rdx
LevelManagerDelegate *v8; // rbx
GameLevelManager *v9; // rcx
void *v10; // [rsp+30h] [rbp+8h]
void *v11; // [rsp+30h] [rbp+8h]
a1->m_refreshButton->setVisible(a1->m_refreshButton, 0);
m_scrollLayer = a1->m_scrollLayer;
if ( m_scrollLayer )
{
LOBYTE(v3) = 1;
m_scrollLayer->removeFromParentAndCleanup(a1->m_scrollLayer, v3);
m_scrollLayer = nullptr;
a1->m_scrollLayer = nullptr;
}
LOBYTE(v3) = m_scrollLayer != nullptr;
a1->m_leftButton->setVisible(a1->m_leftButton, v3);
LOBYTE(v5) = a1->m_scrollLayer != nullptr;
a1->m_rightButton->setVisible(a1->m_rightButton, v5);
v6 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v10 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v10);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v6 = qword_1406C2EC0;
}
cocos2d::CCDictionary::removeAllObjects(*(cocos2d::CCDictionary **)(v6 + 576));
LOBYTE(v7) = 1;
a1->m_loadingCircle->setVisible(a1->m_loadingCircle, v7);
v8 = &a1->LevelManagerDelegate;
v9 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v11 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v11);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v9 = (GameLevelManager *)qword_1406C2EC0;
}
v9->m_levelManagerDelegate = v8;
GameLevelManager::getGauntlets(v9);
}