//
// LevelCell::onClick from 0x427aa4 to 0x427bea (326 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:48:05 +0000
//
unsigned int __fastcall LevelCell::onClick(LevelCell *this, cocos2d::CCObject *a2)
{
unsigned int result; // r0
int (__fastcall **v5)(unsigned int); // r2
int *v6; // r4
_BOOL4 v7; // r0
GameLevelManager *v8; // r5
GJGameLevel *v9; // r1
GameLevelManager *v10; // r0
int v11[3]; // [sp+8h] [bp-14h] BYREF
if ( *((_BYTE *)this + 428) )
{
result = *(_DWORD *)(*((_DWORD *)this + 80) + 464);
if ( result )
return (**(int (__fastcall ***)(unsigned int))result)(result);
return result;
}
if ( *((_DWORD *)this + 104) == 29 && (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2) )
{
result = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2) - 1;
if ( result <= 3 )
{
result += (unsigned int)dword_BEB920;
if ( *(_BYTE *)(result + 156) )
{
result = *(_DWORD *)(*((_DWORD *)this + 80) + 464);
if ( result )
{
v5 = *(int (__fastcall ***)(unsigned int))result;
return (*v5)(result);
}
}
}
}
else
{
if ( *(int *)(*((_DWORD *)this + 106) + 616) > 22 )
{
memset(v11, 0, sizeof(v11));
std::string::__init(v11, "Please update your application to download this level.", 0x36u);
v6 = FLAlertLayer::create(0, (cocos2d::CCLabelBMFont *)"Unavailable", (int)v11, (ButtonSprite *)"Close", nullptr);
std::string::~string((int)v11);
return (*(int (__fastcall **)(int *))(*v6 + 656))(v6);
}
if ( (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2) == 5
|| (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2) == 6 )
{
(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)a2 + 32))(a2);
result = *(_DWORD *)(*((_DWORD *)this + 80) + 464);
if ( !result )
return result;
v5 = *(int (__fastcall ***)(unsigned int))result;
return (*v5)(result);
}
v7 = LevelCell::inRecallMode(this);
if ( v7 )
{
v8 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)v7);
v9 = (GJGameLevel *)LevelCell::recallLevel((GJGameLevel **)this);
v10 = v8;
}
else
{
v10 = (GameLevelManager *)GameLevelManager::sharedState(nullptr);
v9 = *((GJGameLevel **)this + 106);
}
return GameLevelManager::gotoLevelPage(v10, v9);
}
return result;
}