//
// EndLevelLayer::customSetup from 0x535c4c to 0x536e1a (4558 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:52:08 +0000
//
int __fastcall EndLevelLayer::customSetup(EndLevelLayer *this)
{
int v2; // r3
int v3; // r6
GJGameLevel *v4; // r11
int v5; // r2
int v6; // r0
int v7; // r2
int v8; // r1
int v9; // r3
float v10; // r10
float v11; // s15
const char *v12; // r1
char *v13; // r0
cocos2d::CCSprite *v14; // r8
int (__fastcall *v15)(cocos2d::CCSprite *, _DWORD *); // r10
GameManager *v16; // r0
GameManager *v17; // r0
int v18; // r10
cocos2d::CCString *v19; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v21; // r2
int v22; // r8
const char *v23; // r1
cocos2d::CCString *v24; // r0
cocos2d::CCLabelBMFont *v25; // r0
const char *v26; // r2
int *v27; // r8
int v28; // r3
int *v29; // r0
int v30; // r8
int v31; // r3
int v32; // r0
cocos2d::CCString *v33; // r0
char *v34; // r0
int v35; // r3
cocos2d::CCString *v36; // r0
cocos2d::CCString *v37; // r0
char *v38; // r0
char *v39; // r0
cocos2d::CCString *v40; // r0
cocos2d::CCLabelBMFont *v41; // r0
const char *v42; // r2
cocos2d::CCLabelBMFont *v43; // r5
cocos2d::CCMenu *v44; // r0
unsigned int v45; // r1
int *v46; // r0
int v47; // r1
cocos2d::CCLabelBMFont *v48; // r2
const char *v49; // r2
cocos2d::CCLabelBMFont *v50; // r0
cocos2d::CCLabelBMFont *v51; // r8
_DWORD *v52; // r8
float v53; // s15
float v54; // s14
_BYTE *v55; // r2
int v56; // r3
int *v57; // r10
int v58; // r1
int v59; // r3
_DWORD *v60; // r8
float v61; // s15
float v62; // s14
void (__fastcall *v63)(_DWORD *, _DWORD *); // r10
int *v64; // r0
cocos2d::CCLabelBMFont *EndText; // r0
const char *v66; // r2
cocos2d::CCLabelBMFont *v67; // r8
int (__fastcall *v68)(cocos2d::CCLabelBMFont *, _DWORD *); // r10
int v69; // r0
const cocos2d::CCPoint *v70; // r10
const cocos2d::CCPoint *v71; // r8
float v72; // s13
const char *v73; // r1
int v74; // r0
void (__fastcall *v75)(char *, _DWORD *); // r9
const char *v76; // r1
int v77; // r9
void (__fastcall *v78)(char *, _DWORD *); // r10
const char *v79; // r1
int v80; // r8
void (__fastcall *v81)(int, _DWORD); // r10
float v82; // s16
float *v83; // r0
int v84; // r9
const cocos2d::CCPoint *v85; // r10
int v86; // r0
int v87; // r9
const cocos2d::CCPoint *v88; // r10
int v89; // r3
int v90; // r0
int v91; // r0
int v92; // r8
void (__fastcall *v93)(int, _DWORD *); // r10
int v94; // r6
const cocos2d::CCPoint *v95; // r9
void (__fastcall *v96)(int, _DWORD *); // r8
cocos2d::CCNode *v97; // r5
cocos2d::CCMenu *v98; // r0
cocos2d::CCMenuItem *v99; // r1
int v100; // r6
cocos2d::CCDirector *v101; // r0
void (__fastcall *v102)(int, _DWORD, _DWORD); // r7
cocos2d::CCDirector *v103; // r0
float v104; // r0
float v105; // s16
cocos2d::CCDirector *v106; // r0
float v107; // r0
unsigned __int8 v108; // r2
cocos2d::CCAction *v109; // r0
cocos2d::CCArray *v110; // r0
int v111; // r9
int v112; // r3
cocos2d::CCObject *v113; // r0
cocos2d::CCArray *v114; // r0
int v115; // r8
const char *v116; // r1
char *v117; // r0
cocos2d::CCObject *v118; // r6
int v119; // r8
GameStatsManager *v120; // r0
GameStatsManager *v121; // r6
GameStatsManager *v122; // r5
const char *v123; // r0
int hasUserCoin; // r0
int v125; // r5
int hasItem; // r0
const char *v127; // r1
PlatformToolbox *v128; // r0
const char *v129; // r1
int v130; // r7
const cocos2d::CCPoint *v131; // r6
const cocos2d::CCPoint *v132; // r8
void (__fastcall *v133)(int, char *); // r9
const char *v134; // r1
int v135; // r7
const cocos2d::CCPoint *v136; // r4
const cocos2d::CCPoint *v137; // r9
void (__fastcall *v138)(int, char *); // r4
int PlayTimerMilli; // r5
char *v141; // r2
char *v142; // r1
size_t v143; // r0
float v144; // r7
void (__fastcall *v145)(cocos2d::CCObject *, char *); // r3
GameStatsManager *v146; // r5
const char *CoinKey; // r0
GameStatsManager *v148; // r5
const char *v149; // r0
char *v150; // r0
cocos2d::CCObject *v151; // r5
void (__fastcall *v152)(cocos2d::CCObject *, int); // r7
int v153; // r0
char *v154; // r0
void (__fastcall *v155)(cocos2d::CCObject *, int); // r7
int v156; // r0
void (__fastcall *v157)(cocos2d::CCObject *, char *); // r3
int v158; // [sp+18h] [bp-14Ch]
char *v159; // [sp+18h] [bp-14Ch]
char *v160; // [sp+18h] [bp-14Ch]
char *v161; // [sp+18h] [bp-14Ch]
char *v162; // [sp+1Ch] [bp-148h]
char *v163; // [sp+1Ch] [bp-148h]
char *v164; // [sp+1Ch] [bp-148h]
cocos2d::CCArray *v165; // [sp+20h] [bp-144h]
cocos2d::CCArray *v166; // [sp+20h] [bp-144h]
cocos2d::CCPoint *v167; // [sp+24h] [bp-140h]
float v168; // [sp+34h] [bp-130h] BYREF
float v169; // [sp+38h] [bp-12Ch]
_BYTE v170[8]; // [sp+3Ch] [bp-128h] BYREF
char v171[4]; // [sp+44h] [bp-120h] BYREF
float v172; // [sp+48h] [bp-11Ch]
char v173[4]; // [sp+4Ch] [bp-118h] BYREF
float v174; // [sp+50h] [bp-114h]
_BYTE v175[8]; // [sp+54h] [bp-110h] BYREF
_BYTE v176[8]; // [sp+5Ch] [bp-108h] BYREF
_BYTE v177[8]; // [sp+64h] [bp-100h] BYREF
_BYTE v178[8]; // [sp+6Ch] [bp-F8h] BYREF
char v179; // [sp+74h] [bp-F0h] BYREF
char v180; // [sp+75h] [bp-EFh]
char v181; // [sp+76h] [bp-EEh]
PlayLayer **(__fastcall *v182)(PlayLayer **, cocos2d::CCObject *); // [sp+7Ch] [bp-E8h]
int v183; // [sp+80h] [bp-E4h]
int (__fastcall *v184)(int, cocos2d::CCObject *); // [sp+84h] [bp-E0h]
int v185; // [sp+88h] [bp-DCh]
int (__fastcall *v186)(int, cocos2d::CCObject *); // [sp+8Ch] [bp-D8h]
int v187; // [sp+90h] [bp-D4h]
cocos2d::CCNode **(__fastcall *v188)(cocos2d::CCNode **, cocos2d::CCObject *); // [sp+94h] [bp-D0h]
int v189; // [sp+98h] [bp-CCh]
float v190[2]; // [sp+9Ch] [bp-C8h] BYREF
_DWORD v191[2]; // [sp+A4h] [bp-C0h] BYREF
_DWORD v192[2]; // [sp+ACh] [bp-B8h] BYREF
int v193[2]; // [sp+B4h] [bp-B0h] BYREF
char *v194; // [sp+BCh] [bp-A8h]
_DWORD v195[3]; // [sp+C0h] [bp-A4h] BYREF
int v196[3]; // [sp+CCh] [bp-98h] BYREF
int v197[3]; // [sp+D8h] [bp-8Ch] BYREF
int v198[3]; // [sp+E4h] [bp-80h] BYREF
int v199[3]; // [sp+F0h] [bp-74h] BYREF
int v200[3]; // [sp+FCh] [bp-68h] BYREF
int v201[3]; // [sp+108h] [bp-5Ch] BYREF
int v202[3]; // [sp+114h] [bp-50h] BYREF
unsigned __int8 v203; // [sp+120h] [bp-44h] BYREF
char v204; // [sp+121h] [bp-43h] BYREF
char *v205; // [sp+128h] [bp-3Ch]
int v206[3]; // [sp+12Ch] [bp-38h] BYREF
int v207[3]; // [sp+138h] [bp-2Ch] BYREF
int v208[3]; // [sp+144h] [bp-20h] BYREF
int v209; // [sp+150h] [bp-14h] BYREF
int v210; // [sp+154h] [bp-10h]
cocos2d::CCLabelBMFont *v211; // [sp+158h] [bp-Ch]
*((_DWORD *)this + 124) = 0;
cocos2d::CCDirector::sharedDirector(this);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v168);
v2 = *((_DWORD *)this + 120);
v3 = *(unsigned __int8 *)(v2 + 10614);
v4 = *(GJGameLevel **)(v2 + 1408);
if ( *(_BYTE *)(v2 + 12104) )
{
v5 = *((_DWORD *)v4 + 193) - *((_DWORD *)v4 + 194);
if ( *((_DWORD *)v4 + 181) == 5 )
*((_DWORD *)this + 133) = v5;
else
*((_DWORD *)this + 132) = v5;
}
v6 = *(_DWORD *)(v2 + 12108);
*((_DWORD *)this + 131) = v6;
v7 = *(_DWORD *)(v2 + 12112);
*((_DWORD *)this + 134) = v7;
v8 = *((_DWORD *)this + 132);
*((_BYTE *)this + 540) = *(_BYTE *)(v2 + 12116);
v9 = *((_DWORD *)this + 133) > 0;
if ( v8 > 0 )
++v9;
if ( v6 > 0 )
++v9;
if ( v7 > 0 )
++v9;
if ( v9 > 2 )
{
v10 = -34.0;
v11 = 16.0;
}
else
{
v10 = -38.0;
if ( v9 == 2 )
v11 = 5.0;
else
v11 = 0.0;
}
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v170,
(float)(v168 * 0.5) + 120.0,
(float)((float)(v169 * 0.5) + 18.0) + v11);
if ( *((int *)this + 132) > 0 || *((int *)this + 133) > 0 )
{
cocos2d::CCPoint::operator=((char *)this + 500, v170);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v191, 0.0, v10);
cocos2d::CCPoint::operator+(v192, v170, v191);
cocos2d::CCPoint::operator=(v170, v192);
}
if ( *((int *)this + 131) > 0 )
{
cocos2d::CCPoint::operator=((char *)this + 508, v170);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v191, 0.0, v10);
cocos2d::CCPoint::operator+(v192, v170, v191);
cocos2d::CCPoint::operator=(v170, v192);
}
if ( *((int *)this + 134) > 0 )
{
cocos2d::CCPoint::operator=((char *)this + 516, v170);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v191, 0.0, v10);
cocos2d::CCPoint::operator+(v192, v170, v191);
cocos2d::CCPoint::operator=(v170, v192);
}
if ( *(_BYTE *)(*((_DWORD *)this + 120) + 10784) )
v13 = "GJ_practiceComplete_001.png";
else
v13 = "GJ_levelComplete_001.png";
v14 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v13, v12);
(*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v14 + 80))(v14, 1061997773);
(*(void (__fastcall **)(_DWORD, cocos2d::CCSprite *, int))(**((_DWORD **)this + 116) + 232))(
*((_DWORD *)this + 116),
v14,
15);
v15 = *(int (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v14 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v192, v168 * 0.5, (float)(v169 * 0.5) + 75.0);
v16 = (GameManager *)v15(v14, v192);
v17 = (GameManager *)GameManager::sharedState(v16);
if ( GameManager::getGameVariable(v17, "0095") )
cocos2d::CCSprite::setFlipX(v14, 1);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 114) + 172))(*((_DWORD *)this + 114), 0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v191, 0.0, 5.0);
cocos2d::CCPoint::operator+(v192, (char *)this + 440, v191);
cocos2d::CCPoint::operator=((char *)this + 440, v192);
v18 = (*(int (__fastcall **)(cocos2d::CCSprite *))(*(_DWORD *)v14 + 96))(v14);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v192, 0.0, -40.0);
cocos2d::CCPoint::operator+(v171, v18, v192);
if ( v3 )
v172 = v172 - 12.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v173, (const cocos2d::CCPoint *)v171);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v175, (const cocos2d::CCPoint *)v171);
if ( v3 )
{
PlayTimerMilli = GJBaseGameLayer::getPlayTimerMilli(*((GJBaseGameLayer **)this + 120));
v158 = PlayTimerMilli / 1000;
v30 = PlayTimerMilli % 1000;
}
else
{
v19 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Attempts: %i",
*(const char **)(*((_DWORD *)this + 120) + 10588));
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v19);
v22 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v21);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 116) + 232))(*((_DWORD *)this + 116), v22, 3);
(*(void (__fastcall **)(int, char *))(*(_DWORD *)v22 + 92))(v22, v173);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v22 + 80))(v22, 1061997773);
(*(void (__fastcall **)(float *, int))(*(_DWORD *)v22 + 168))(v190, v22);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v191, (float)-(float)(v190[0] * 0.5) - 21.0, -2.0);
cocos2d::CCPoint::operator+(v192, v173, v191);
cocos2d::CCPoint::operator=(v175, v192);
v23 = *(const char **)(*((_DWORD *)this + 120) + 12084);
v174 = v174 - 24.0;
v24 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Jumps: %i", v23);
v25 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v24);
v27 = (int *)cocos2d::CCLabelBMFont::create(v25, "goldFont.fnt", v26);
(*(void (__fastcall **)(_DWORD, int *, int))(**((_DWORD **)this + 116) + 232))(*((_DWORD *)this + 116), v27, 3);
(*(void (__fastcall **)(int *, char *))(*v27 + 92))(v27, v173);
v28 = *v27;
v29 = v27;
v30 = 0;
(*(void (__fastcall **)(int *, int))(v28 + 80))(v29, 1061997773);
v31 = *((_DWORD *)this + 120);
v174 = v174 - 24.0;
v158 = (int)*(double *)(v31 + 800);
}
v162 = (char *)(v158 / 60 % 60);
v32 = v158 / 3600;
v193[0] = 0;
v193[1] = 0;
v194 = nullptr;
if ( !v3 || v162 )
{
if ( !v32 )
{
v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%02d:%02d", v162, v158 % 60);
goto LABEL_40;
}
LABEL_42:
v37 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%02d:%02d:%02d",
(const char *)(v158 / 3600),
v158 / 60 % 60,
v158 % 60);
LABEL_40:
v38 = (char *)cocos2d::CCString::getCString(v37);
std::string::assign(v193, v38);
if ( !v3 )
goto LABEL_45;
goto LABEL_36;
}
if ( v32 )
goto LABEL_42;
v33 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(v158 % 60),
0);
v34 = (char *)cocos2d::CCString::getCString(v33);
std::string::assign(v193, v34);
LABEL_36:
v35 = LOBYTE(v193[0]) << 31;
if ( (v193[0] & 1) != 0 )
v36 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s.%03d", v194, v30, v35);
else
v36 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s.%03d",
(const char *)v193 + 1,
v30,
v35);
v39 = (char *)cocos2d::CCString::getCString(v36);
std::string::assign(v193, v39);
LABEL_45:
if ( (v193[0] & 1) != 0 )
v40 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Time: %s", v194);
else
v40 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"Time: %s",
(const char *)v193 + 1);
v41 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v40);
v43 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v41, "goldFont.fnt", v42);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**((_DWORD **)this + 116) + 232))(
*((_DWORD *)this + 116),
v43,
3);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, char *))(*(_DWORD *)v43 + 92))(v43, v173);
v44 = (cocos2d::CCMenu *)cocos2d::CCLabelBMFont::limitLabelWidth(v43, 150.0, 0.8, 0.0);
v174 = v174 - 24.0;
if ( v3 )
{
v45 = *(_DWORD *)(*((_DWORD *)this + 120) + 1392);
if ( v45 )
{
GameToolbox::pointsToString((GameToolbox *)v195, v45);
v46 = std::string::insert(v195, 0, "Points: ");
v47 = v46[1];
v48 = (cocos2d::CCLabelBMFont *)v46[2];
v209 = *v46;
v210 = v47;
v211 = v48;
*v46 = 0;
v46[1] = 0;
v46[2] = 0;
std::string::~string((int)v195);
if ( (v209 & 1) != 0 )
v50 = v211;
else
v50 = (cocos2d::CCLabelBMFont *)((char *)&v209 + 1);
v51 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v50, "goldFont.fnt", v49);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**((_DWORD **)this + 116) + 232))(
*((_DWORD *)this + 116),
v51,
3);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, char *))(*(_DWORD *)v51 + 92))(v51, v173);
cocos2d::CCLabelBMFont::limitLabelWidth(v51, 150.0, 0.8, 0.0);
v174 = v174 - 24.0;
v44 = (cocos2d::CCMenu *)std::string::~string((int)&v209);
}
}
if ( *((_DWORD *)v4 + 238) == 2 )
{
memset(v196, 0, sizeof(v196));
std::string::__init(v196, " ", 1u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v192, 0.5, 1.0);
v52 = (_DWORD *)TextArea::create(
(int)v196,
"bigFont.fnt",
1065353216,
1142620160,
(const cocos2d::CCPoint *)v192,
1101004800,
0,
0);
std::string::~string((int)v196);
(*(void (__fastcall **)(_DWORD, _DWORD *))(**((_DWORD **)this + 116) + 228))(*((_DWORD *)this + 116), v52);
(*(void (__fastcall **)(_DWORD *, int))(*v52 + 80))(v52, 1057803469);
v53 = v168;
v54 = v169;
v52[136] = 1107820544;
v159 = *(char **)(*v52 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v192, v53 * 0.5, (float)(v54 * 0.5) - 51.0);
((void (__fastcall *)(_DWORD *, _DWORD *))v159)(v52, v192);
if ( v3 )
{
v160 = *(char **)(*v52 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v191, 0.0, -12.0);
cocos2d::CCPoint::operator+(v192, v173, v191);
((void (__fastcall *)(_DWORD *, _DWORD *))v160)(v52, v192);
}
v55 = *((_BYTE **)this + 120);
v56 = (unsigned __int8)v55[11797];
if ( v55[11797] )
{
v57 = v197;
memset(v197, 0, sizeof(v197));
std::string::__init(v197, "You cannot verify a level after using Ignore Damage.", 0x34u);
TextArea::setString((int)v52, v197);
}
else
{
v58 = (unsigned __int8)v55[11798];
if ( v55[11798] )
{
v57 = v198;
v198[0] = (unsigned __int8)v55[11797];
v198[1] = v56;
v198[2] = v56;
std::string::__init(v198, "You cannot verify a level after using Speed Changes.", 0x34u);
TextArea::setString((int)v52, v198);
}
else
{
v59 = (unsigned __int8)v55[10836];
if ( v55[10836] )
{
v199[0] = (unsigned __int8)v55[11798];
v57 = v199;
v199[1] = v58;
v199[2] = v58;
std::string::__init(v199, "You cannot verify a level if it has a start pos.", 0x30u);
TextArea::setString((int)v52, v199);
}
else if ( v55[10784] && *((_DWORD *)v4 + 150) - *((_DWORD *)v4 + 151) != 1 )
{
v57 = v200;
v200[0] = (unsigned __int8)v55[10836];
v200[1] = v59;
v200[2] = v59;
std::string::__init(v200, "Complete the level in normal mode to verify it!", 0x2Fu);
TextArea::setString((int)v52, v200);
}
else
{
if ( !GJGameLevel::areCoinsVerified(v4) )
{
EndLevelLayer::getCoinString((EndLevelLayer *)&v203, (int)this, v141, (int)&v203);
v142 = (char *)(v203 << 31);
if ( (v203 & 1) == 0 )
v142 = &v204;
v206[0] = 0;
if ( (v203 & 1) != 0 )
v142 = v205;
v206[1] = 0;
v206[2] = 0;
v164 = v142;
v143 = strlen(v142);
std::string::__init(v206, v164, v143);
TextArea::setString((int)v52, v206);
std::string::~string((int)v206);
v64 = (int *)&v203;
goto LABEL_69;
}
if ( *((int *)v4 + 197) <= 0 )
{
v57 = v202;
memset(v202, 0, sizeof(v202));
std::string::__init(v202, "Level Verified!", 0xFu);
TextArea::setString((int)v52, v202);
}
else
{
v57 = v201;
memset(v201, 0, sizeof(v201));
std::string::__init(v201, "Level and Coins Verified!", 0x19u);
TextArea::setString((int)v52, v201);
}
}
}
}
LABEL_68:
v64 = v57;
LABEL_69:
v44 = (cocos2d::CCMenu *)std::string::~string((int)v64);
goto LABEL_72;
}
if ( *(_BYTE *)(*((_DWORD *)this + 120) + 10784) )
{
memset(v207, 0, sizeof(v207));
std::string::__init(v207, " ", 1u);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v192, 0.5, 1.0);
v60 = (_DWORD *)TextArea::create(
(int)v207,
"bigFont.fnt",
1065353216,
1142620160,
(const cocos2d::CCPoint *)v192,
1101004800,
0,
0);
std::string::~string((int)v207);
(*(void (__fastcall **)(_DWORD, _DWORD *))(**((_DWORD **)this + 116) + 228))(*((_DWORD *)this + 116), v60);
(*(void (__fastcall **)(_DWORD *, int))(*v60 + 80))(v60, 1057803469);
v61 = v168;
v62 = v169;
v60[136] = 1107820544;
v63 = *(void (__fastcall **)(_DWORD *, _DWORD *))(*v60 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v192, v61 * 0.5, (float)(v62 * 0.5) - 51.0);
v63(v60, v192);
v57 = v208;
memset(v208, 0, sizeof(v208));
std::string::__init(v208, "Well done... Now try to complete it without any checkpoints!", 0x3Cu);
TextArea::setString((int)v60, v208);
goto LABEL_68;
}
if ( *((int *)v4 + 197) <= 0 )
{
EndText = (cocos2d::CCLabelBMFont *)EndLevelLayer::getEndText(this);
v67 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(EndText, "bigFont.fnt", v66);
cocos2d::CCLabelBMFont::limitLabelWidth(v67, 260.0, 0.9, 0.0);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**((_DWORD **)this + 116) + 232))(
*((_DWORD *)this + 116),
v67,
3);
v68 = *(int (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD *))(*(_DWORD *)v67 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v192, v168 * 0.5, (float)(v169 * 0.5) - 65.0);
v44 = (cocos2d::CCMenu *)v68(v67, v192);
}
LABEL_72:
v69 = cocos2d::CCMenu::create(v44);
*((_DWORD *)this + 123) = v69;
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 116) + 232))(*((_DWORD *)this + 116), v69, 1);
v70 = *((const cocos2d::CCPoint **)this + 123);
v71 = *((const cocos2d::CCPoint **)this + 116);
v72 = (float)(v169 * 0.5) - 115.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v191, v168 * 0.5, v72 - 10.0);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v192, v71);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v176, v70);
v74 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_replayBtn_001.png", v73);
v183 = 0;
v182 = EndLevelLayer::onReplay;
v161 = (char *)CCMenuItemSpriteExtra::create(v74, 0, (int)this, (int)EndLevelLayer::onReplay, 0);
(*(void (__fastcall **)(_DWORD, char *))(**((_DWORD **)this + 123) + 228))(*((_DWORD *)this + 123), v161);
v75 = *(void (__fastcall **)(char *, _DWORD *))(*(_DWORD *)v161 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v191, -100.0, 0.0);
cocos2d::CCPoint::operator+(v192, v176, v191);
v75(v161, v192);
v77 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_menuBtn_001.png", v76);
v185 = 0;
v184 = EndLevelLayer::onMenu;
v163 = (char *)CCMenuItemSpriteExtra::create(v77, 0, (int)this, (int)EndLevelLayer::onMenu, 0);
(*(void (__fastcall **)(_DWORD, char *))(**((_DWORD **)this + 123) + 228))(*((_DWORD *)this + 123), v163);
v78 = *(void (__fastcall **)(char *, _DWORD *))(*(_DWORD *)v163 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v191, 100.0, 0.0);
cocos2d::CCPoint::operator+(v192, v176, v191);
v78(v163, v192);
if ( *((_DWORD *)v4 + 238) == 2 )
{
v80 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_editBtn_001.png", v79);
v81 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v80 + 80);
v82 = *(float *)(*(int (__fastcall **)(int))(*(_DWORD *)v77 + 164))(v77);
v83 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v80 + 164))(v80);
v81(v80, v82 / *v83);
v187 = 0;
v186 = EndLevelLayer::onEdit;
v84 = CCMenuItemSpriteExtra::create(v80, 0, (int)this, (int)EndLevelLayer::onEdit, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 123) + 228))(*((_DWORD *)this + 123), v84);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v190, v168 * 0.5, v72 - 10.0);
v85 = *((const cocos2d::CCPoint **)this + 123);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v191, *((const cocos2d::CCPoint **)this + 116));
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v192, v85);
cocos2d::CCPoint::operator=(v190, v192);
(*(void (__fastcall **)(int, float *))(*(_DWORD *)v84 + 92))(v84, v190);
}
if ( *(_BYTE *)(*((_DWORD *)this + 120) + 10784) )
{
v86 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_restartCheckBtn_001.png", v79);
v189 = 0;
v188 = EndLevelLayer::onRestartCheckpoint;
v87 = CCMenuItemSpriteExtra::create(v86, 0, (int)this, (int)EndLevelLayer::onRestartCheckpoint, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 123) + 228))(*((_DWORD *)this + 123), v87);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v190, (float)(v168 * 0.5) - 180.0, v72 - 10.0);
v88 = *((const cocos2d::CCPoint **)this + 123);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v191, *((const cocos2d::CCPoint **)this + 116));
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v192, v88);
cocos2d::CCPoint::operator=(v190, v192);
(*(void (__fastcall **)(int, float *))(*(_DWORD *)v87 + 92))(v87, v190);
}
v89 = *((_DWORD *)v4 + 238);
if ( !v3 && v89 == 2 )
goto LABEL_78;
if ( v89 != 1 )
{
v91 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_levelLeaderboardBtn_001.png", v79);
v190[1] = 0.0;
LODWORD(v190[0]) = EndLevelLayer::onLevelLeaderboard;
v92 = CCMenuItemSpriteExtra::create(v91, 0, (int)this, (int)EndLevelLayer::onLevelLeaderboard, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 123) + 228))(*((_DWORD *)this + 123), v92);
v93 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v92 + 92);
v165 = *((cocos2d::CCArray **)this + 123);
v167 = *((cocos2d::CCPoint **)this + 116);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v179, (float)(v168 * 0.5) + 178.0, (float)(v169 * 0.5) + 115.0);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v191, v167);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v192, v165);
v93(v92, v192);
}
if ( !v3 )
{
LABEL_78:
v90 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"sideBtn_death_001.png", v79);
v191[1] = 0;
v191[0] = EndLevelLayer::onDeathTracker;
v94 = CCMenuItemSpriteExtra::create(v90, 0, (int)this, (int)EndLevelLayer::onDeathTracker, 0);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 123) + 228))(*((_DWORD *)this + 123), v94);
v95 = *((const cocos2d::CCPoint **)this + 123);
v96 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v94 + 92);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)&v179, *((const cocos2d::CCPoint **)this + 116));
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v192, v95);
v96(v94, v192);
}
v97 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"hideBtn_001.png", v79);
(*(void (__fastcall **)(cocos2d::CCNode *, _DWORD))(*(_DWORD *)v97 + 456))(v97, 0);
v192[1] = 0;
v192[0] = EndLevelLayer::onHideLayer;
v98 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create((int)v97, 0, (int)this, (int)EndLevelLayer::onHideLayer, 0);
v100 = cocos2d::CCMenu::createWithItem(v98, v99);
v101 = (cocos2d::CCDirector *)(*(int (__fastcall **)(EndLevelLayer *, int, int))(*(_DWORD *)this + 232))(
this,
v100,
100);
v102 = *(void (__fastcall **)(int, _DWORD, _DWORD))(*(_DWORD *)v100 + 100);
v103 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v101);
v104 = COERCE_FLOAT(cocos2d::CCDirector::getScreenRight(v103));
v105 = v104 - 17.0;
v106 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)LODWORD(v104));
v107 = COERCE_FLOAT(cocos2d::CCDirector::getScreenTop(v106));
v102(v100, LODWORD(v105), v107 - 15.0);
v109 = (cocos2d::CCAction *)cocos2d::CCFadeTo::create((cocos2d::CCFadeTo *)0x3F800000, COERCE_FLOAT(125), v108);
v110 = (cocos2d::CCArray *)cocos2d::CCNode::runAction(v97, v109);
*((_BYTE *)this + 484) = *((_DWORD *)v4 + 238) != 1;
*((_BYTE *)this + 485) = *((_BYTE *)v4 + 792)
- *((_BYTE *)v4 + 796)
+ (*((_DWORD *)v4 + 198) - *((_DWORD *)v4 + 199) == 1)
+ *((_BYTE *)v4 + 796)
- *((_BYTE *)v4 + 792);
v111 = *((_DWORD *)v4 + 197);
if ( v111 > 0 )
{
v112 = *((_DWORD *)this + 120);
if ( !*(_BYTE *)(v112 + 10784) && !*(_BYTE *)(v112 + 10836) && *((_DWORD *)v4 + 238) != 2 )
{
v113 = (cocos2d::CCObject *)cocos2d::CCArray::create(v110);
*((_DWORD *)this + 124) = v113;
cocos2d::CCObject::retain(v113);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v178, v168 * 0.5, (float)(v169 * 0.5) + 126.0);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v179, v168 * 0.5, (float)(v169 * 0.5) - 64.0);
v114 = (cocos2d::CCArray *)cocos2d::CCPoint::operator=(v178, &v179);
if ( v111 > 4 )
{
v144 = 13.0;
}
else if ( v111 == 4 )
{
v144 = 15.0;
}
else
{
v144 = 20.0;
}
v115 = 1;
v166 = (cocos2d::CCArray *)cocos2d::CCArray::create(v114);
do
{
if ( *((_BYTE *)this + 484) )
v117 = "secretCoin_2_b_01_001.png";
else
v117 = "secretCoin_b_01_001.png";
v118 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v117, v116);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(**((_DWORD **)this + 116) + 232))(
*((_DWORD *)this + 116),
v118,
8);
cocos2d::CCArray::addObject(v166, v118);
if ( *((_BYTE *)this + 484) && !*((_BYTE *)this + 485) )
{
v145 = *(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_DWORD *)v118 + 480);
v179 = -1;
v180 = -81;
v181 = 75;
v145(v118, &v179);
}
++v115;
}
while ( v115 <= v111 );
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v179, (const cocos2d::CCPoint *)v178);
GameToolbox::alignItemsHorisontally(*(float *)&v166, v144, (int)&v179, 0);
v119 = 1;
while ( 1 )
{
v120 = (GameStatsManager *)cocos2d::CCArray::objectAtIndex(v166, v119 - 1);
v121 = v120;
if ( *((_BYTE *)this + 484) )
{
if ( *((_BYTE *)this + 485) )
{
v146 = (GameStatsManager *)GameStatsManager::sharedState(v120);
CoinKey = (const char *)GJGameLevel::getCoinKey(v4, v119);
hasUserCoin = GameStatsManager::hasUserCoin(v146, CoinKey);
}
else
{
v148 = (GameStatsManager *)GameStatsManager::sharedState(v120);
v149 = (const char *)GJGameLevel::getCoinKey(v4, v119);
hasUserCoin = GameStatsManager::hasPendingUserCoin(v148, v149);
}
}
else
{
v122 = (GameStatsManager *)GameStatsManager::sharedState(v120);
v123 = (const char *)GJGameLevel::getCoinKey(v4, v119);
hasUserCoin = GameStatsManager::hasSecretCoin(v122, v123);
}
v125 = hasUserCoin;
hasItem = GJBaseGameLayer::hasItem(*((GJBaseGameLayer **)this + 120), v119);
if ( v125 )
break;
if ( hasItem )
goto LABEL_127;
LABEL_101:
if ( ++v119 > v111 )
goto LABEL_102;
}
if ( hasItem )
{
LABEL_127:
if ( *((_BYTE *)this + 484) )
v154 = "secretCoinUI2_001.png";
else
v154 = "secretCoinUI_001.png";
v151 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v154, v127);
v155 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v151 + 92);
v156 = (*(int (__fastcall **)(GameStatsManager *))(*(_DWORD *)v121 + 96))(v121);
v155(v151, v156);
cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 124), v151);
*((_BYTE *)this + 488) = 1;
}
else
{
if ( *((_BYTE *)this + 484) )
v150 = "secretCoinUI2_001.png";
else
v150 = "secretCoinUI_001.png";
v151 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v150, v127);
v152 = *(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v151 + 92);
v153 = (*(int (__fastcall **)(GameStatsManager *))(*(_DWORD *)v121 + 96))(v121);
v152(v151, v153);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *, int))(**((_DWORD **)this + 116) + 232))(
*((_DWORD *)this + 116),
v151,
9);
}
if ( *((_BYTE *)this + 484) && !*((_BYTE *)this + 485) )
{
v157 = *(void (__fastcall **)(cocos2d::CCObject *, char *))(*(_DWORD *)v151 + 480);
v179 = -1;
v180 = -81;
v181 = 75;
v157(v151, &v179);
}
goto LABEL_101;
}
}
LABEL_102:
v209 = 0;
v210 = 0;
v211 = nullptr;
std::string::__init(&v209, "Geometry Dash", 0xDu);
PlatformToolbox::tryShowRateDialog((int)&v209);
v128 = (PlatformToolbox *)std::string::~string((int)&v209);
if ( PlatformToolbox::isControllerConnected(v128) )
{
v130 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_Start_001.png", v129);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 116) + 232))(*((_DWORD *)this + 116), v130, 10);
v131 = *((const cocos2d::CCPoint **)this + 116);
v132 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(char *))(*(_DWORD *)v161 + 256))(v161);
(*(void (__fastcall **)(char *))(*(_DWORD *)v161 + 96))(v161);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)&v179, v132);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v177, v131);
v133 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v130 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v178, 0.0, -25.0);
cocos2d::CCPoint::operator+(&v179, v177, v178);
v133(v130, &v179);
v135 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_B_001.png", v134);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 116) + 232))(*((_DWORD *)this + 116), v135, 10);
v136 = *((const cocos2d::CCPoint **)this + 116);
v137 = (const cocos2d::CCPoint *)(*(int (__fastcall **)(char *))(*(_DWORD *)v163 + 256))(v163);
(*(void (__fastcall **)(char *))(*(_DWORD *)v163 + 96))(v163);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v178, v137);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v179, v136);
cocos2d::CCPoint::operator=(v177, &v179);
v138 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v135 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v178, 0.0, -25.0);
cocos2d::CCPoint::operator+(&v179, v177, v178);
v138(v135, &v179);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v135 + 80))(v135, 1061997773);
}
return std::string::~string((int)v193);
}