//
// LevelCell::onClick from 0x100252100 to 0x10025223d (317 bytes)
//
// 6 xrefs:
// > LevelCell::loadLocalLevelCell @ 0x10024eeee
// > LevelCell::loadCustomLevelCell @ 0x10024f9cb
// > LevelCell::loadCustomLevelCell @ 0x10024fb50
// > LevelCell::loadCustomLevelCell @ 0x10024fc37
// > LevelCell::loadCustomLevelCell @ 0x10024fd1e
// > LevelCell::loadCustomLevelCell @ 0x10024fdea
//
// 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 LevelCell::onClick(LevelCell *a1, cocos2d::CCObject *a2)
{
unsigned int v3; // eax
TableViewCellDelegate *m_cellDelegate; // rdi
__int64 v5; // rbx
GameLevelManager *v6; // rax
_QWORD v7[2]; // [rsp+8h] [rbp-28h] BYREF
void *__p; // [rsp+18h] [rbp-18h]
if ( a1->m_listType == Level4 && ((unsigned int (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) )
{
v3 = ((__int64 (__fastcall *)(cocos2d::CCObject *))a2->getTag)(a2) - 1;
if ( v3 <= 3 )
{
m_cellDelegate = a1->m_tableView->m_cellDelegate;
if ( m_cellDelegate )
((void (__fastcall *)(TableViewCellDelegate *, LevelCell *, _QWORD, _QWORD, _QWORD))m_cellDelegate->cellPerformedAction)(
m_cellDelegate,
a1,
(unsigned int)a1->m_listType,
dword_100818040[v3],
0);
}
}
else if ( a1->m_level->m_gameVersion < 23 )
{
v6 = GameLevelManager::sharedState();
GameLevelManager::gotoLevelPage(v6, a1->m_level);
}
else
{
__p = operator new(0x38u);
v7[0] = 57;
v7[1] = 54;
strcpy((char *)__p, "Please update your application to download this level.");
v5 = sub_10049B0F0(0, "Unavailable", v7, "Close", 0);
if ( (v7[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(__int64))(*(_QWORD *)v5 + 1288LL))(v5);
}
}