//
// LevelCell::onClick from 0x100136734 to 0x10013691c (488 bytes)
//
// 6 xrefs:
// > LevelCell::loadLocalLevelCell @ 0x100132ff0
// > LevelCell::loadCustomLevelCell @ 0x100133e3c
// > LevelCell::loadCustomLevelCell @ 0x100134048
// > LevelCell::loadCustomLevelCell @ 0x100134124
// > LevelCell::loadCustomLevelCell @ 0x100134200
// > LevelCell::loadCustomLevelCell @ 0x1001342c8
//
// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!
//
// 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 10:59:27 +0000
//
__int64 (***__fastcall LevelCell::onClick(__int64 a1, __int64 a2))(void)
{
__int64 (***result)(void); // x0
__int64 (*v4)(void); // x5
__int64 v6; // x19
int v7; // w21
_QWORD *v8; // x20
char *v9; // x1
void *__p[2]; // [xsp+8h] [xbp-38h] BYREF
char v11; // [xsp+1Fh] [xbp-21h]
if ( *(_BYTE *)(a1 + 568) != 1 )
{
if ( *(_DWORD *)(a1 + 544) == 29 && (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) )
{
result = (__int64 (***)(void))(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
if ( (unsigned int)((_DWORD)result - 1) > 3 )
return result;
result = *(__int64 (****)(void))(*(_QWORD *)(a1 + 416) + 632LL);
if ( !result )
return result;
}
else
{
if ( *(int *)(*(_QWORD *)(a1 + 560) + 792LL) >= 23 )
{
sub_100009900(__p, "Please update your application to download this level.");
v6 = sub_10034A8F8(0, "Unavailable", __p, "Close", 0);
if ( v11 < 0 )
operator delete(__p[0]);
return (__int64 (***)(void))(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v6 + 1312LL))(v6);
}
if ( (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) != 5
&& (*(unsigned int (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2) != 6 )
{
v7 = *(_DWORD *)(*(_QWORD *)(a1 + 560) + 1292LL);
v8 = (_QWORD *)GameLevelManager::sharedState();
if ( v7 < 1 )
v9 = *(char **)(a1 + 560);
else
v9 = LevelCell::recallLevel(a1);
return (__int64 (***)(void))GameLevelManager::gotoLevelPage(v8, (__int64)v9);
}
(*(void (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);
result = *(__int64 (****)(void))(*(_QWORD *)(a1 + 416) + 632LL);
if ( !result )
return result;
}
v4 = **result;
return (__int64 (***)(void))v4();
}
result = *(__int64 (****)(void))(*(_QWORD *)(a1 + 416) + 632LL);
if ( result )
{
v4 = **result;
return (__int64 (***)(void))v4();
}
return result;
}