// // EndLevelLayer::customSetup from 0x8fbf00 to 0x8fda14 (6932 bytes) // // 2 xrefs: // > @ 0xafd80 // > @ 0x1462bc8 // // 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 12:57:04 +0000 // __int64 __fastcall EndLevelLayer::customSetup(EndLevelLayer *this) { cocos2d::CCDirector *v2; // x0 cocos2d::CCDirector *v3; // x0 __int64 v4; // x1 __int64 v5; // x2 GJGameLevel *v6; // x27 int v7; // w24 int v8; // w0 int v9; // w4 int v10; // w3 int v11; // w0 int v12; // w1 float v13; // s8 float v14; // s1 const char *v15; // x1 char *v16; // x0 cocos2d::CCSprite *v17; // x21 __int64 (__fastcall *v18)(cocos2d::CCSprite *, __int64 *); // x22 GameManager *v19; // x0 GameManager *v20; // x0 long double v21; // q0 __int64 v22; // x21 int PlayTimerMilli; // w0 unsigned __int64 v24; // x1 _BOOL4 v25; // w6 __int64 v26; // x2 unsigned int v27; // w22 __int64 v28; // x3 cocos2d::CCString *v29; // x0 char *CString; // x0 const char *v31; // x1 cocos2d::CCString *v32; // x0 char *v33; // x0 cocos2d::CCString *v34; // x0 cocos2d::CCLabelBMFont *v35; // x0 const char *v36; // x2 cocos2d::CCLabelBMFont *v37; // x22 GameToolbox *v38; // x0 unsigned __int64 v39; // x0 __int64 v40; // x0 __int64 v41; // x3 cocos2d::CCNode *v42; // x22 cocos2d::CCNode *v43; // x21 float v44; // s8 const char *v45; // x1 __int64 v46; // x0 void (__fastcall *v47)(__int64, __int64 *); // x22 const char *v48; // x1 __int64 v49; // x26 __int64 v50; // x22 void (__fastcall *v51)(__int64, __int64 *); // x22 const char *v52; // x1 __int64 v53; // x0 __int64 v54; // x22 void (__fastcall *v55)(__int64, __int64 *); // x28 cocos2d::CCNode *v56; // x26 cocos2d::CCNode *v57; // x24 cocos2d::CCMenu *v58; // x0 cocos2d::CCMenuItem *v59; // x1 cocos2d::CCDirector **v60; // x21 void (__fastcall *v61)(cocos2d::CCDirector **, float, float); // x22 cocos2d::CCDirector *v62; // x0 cocos2d::CCDirector *ScreenRight; // x0 float v64; // s0 float v65; // s8 cocos2d::CCDirector *v66; // x0 float v67; // s0 unsigned __int8 v68; // w1 cocos2d::CCAction *v69; // x0 int v70; // w25 PlatformToolbox *v71; // x0 const char *v72; // x1 __int64 v74; // x0 __int64 v75; // x21 cocos2d::CCNode *v76; // x24 void (__fastcall *v77)(__int64, __int64 *); // x22 cocos2d::CCString *v78; // x0 cocos2d::CCLabelBMFont *v79; // x0 const char *v80; // x2 __int64 v81; // x26 const char *v82; // x1 cocos2d::CCString *v83; // x0 cocos2d::CCLabelBMFont *v84; // x0 const char *v85; // x2 __int64 v86; // x26 double v87; // d0 cocos2d::CCString *v88; // x0 char *v89; // x0 cocos2d::CCArray *v90; // x0 cocos2d::CCObject *v91; // x0 cocos2d::CCArray *v92; // x0 const char *v93; // x1 cocos2d::CCArray *v94; // x26 int i; // w21 cocos2d::CCSprite *v96; // x0 cocos2d::CCObject *v97; // x20 void (__fastcall *v98)(cocos2d::CCObject *, __int64 *); // x2 int j; // w20 __int64 v100; // x22 GameStatsManager *v101; // x0 GameStatsManager *v102; // x21 const char *CoinKey; // x0 bool hasUserCoin; // w0 unsigned int v105; // w24 const char *v106; // x1 unsigned int hasItem; // w21 char *v108; // x0 __int64 v109; // x24 __int64 v110; // x0 const char *v111; // x1 char *v112; // x0 cocos2d::CCObject *v113; // x21 __int64 v114; // x0 __int64 (__fastcall *v115)(__int64); // x1 void (__fastcall *v116)(cocos2d::CCObject *, __int64); // x22 __int64 v117; // x0 int v118; // w0 void (__fastcall *v119)(cocos2d::CCObject *, __int64 *); // x2 __int64 v120; // x0 __int64 v121; // x22 cocos2d::CCNode *v122; // x26 long double v123; // q0 __int64 v124; // x20 cocos2d::CCNode *v125; // x22 cocos2d::CCNode *v126; // x21 const cocos2d::CCPoint *v127; // x0 void (__fastcall *v128)(__int64, __int64 *); // x22 const char *v129; // x1 __int64 v130; // x20 cocos2d::CCNode *v131; // x19 cocos2d::CCNode *v132; // x22 const cocos2d::CCPoint *v133; // x0 void (__fastcall *v134)(__int64, __int64 *); // x19 __int64 *v135; // x21 __int64 v136; // x1 float v137; // s1 float v138; // s0 void (__fastcall *v139)(__int64 *, __int64 *); // x22 size_t v140; // x3 unsigned __int64 v141; // x1 char *v142; // x28 char *v143; // x4 size_t v144; // x3 cocos2d::CCLabelBMFont *v145; // x0 cocos2d::CCLabelBMFont *v146; // x22 char *EndText; // x0 const char *v148; // x2 cocos2d::CCLabelBMFont *v149; // x22 __int64 (__fastcall *v150)(cocos2d::CCLabelBMFont *, __int64 *); // x21 void (__fastcall *v151)(__int64, __int64 *); // x2 GameStatsManager *v152; // x21 const char *v153; // x0 GameStatsManager *v154; // x21 const char *v155; // x0 __int64 v156; // x21 void (__fastcall *v157)(__int64, float); // x22 float v158; // s10 float *v159; // x0 __int64 v160; // x22 cocos2d::CCNode *v161; // x26 long double v162; // q0 __int64 *v163; // x26 __int64 v164; // x1 float v165; // s1 float v166; // s0 void (__fastcall *v167)(__int64 *, __int64 *); // x22 float v168; // s8 void (__fastcall *v169)(__int64 *, __int64 *); // x22 const char *v170; // x1 size_t v171; // x0 __int64 v172; // [xsp+80h] [xbp+80h] __int64 v173; // [xsp+88h] [xbp+88h] cocos2d::CCSprite *v174; // [xsp+A0h] [xbp+A0h] cocos2d::CCNode *v175; // [xsp+A8h] [xbp+A8h] cocos2d::CCNode *v176; // [xsp+A8h] [xbp+A8h] cocos2d::CCNode *v177; // [xsp+A8h] [xbp+A8h] cocos2d::CCNode *v178; // [xsp+A8h] [xbp+A8h] __int64 v179; // [xsp+B0h] [xbp+B0h] BYREF char v180[8]; // [xsp+B8h] [xbp+B8h] BYREF __int64 v181; // [xsp+C0h] [xbp+C0h] BYREF _BYTE v182[4]; // [xsp+C8h] [xbp+C8h] BYREF float v183; // [xsp+CCh] [xbp+CCh] char v184[8]; // [xsp+D0h] [xbp+D0h] BYREF __int64 v185; // [xsp+D8h] [xbp+D8h] BYREF __int64 v186; // [xsp+E0h] [xbp+E0h] BYREF __int64 v187; // [xsp+E8h] [xbp+E8h] BYREF __int64 v188; // [xsp+F0h] [xbp+F0h] BYREF __int64 v189; // [xsp+F8h] [xbp+F8h] BYREF __int64 v190; // [xsp+100h] [xbp+100h] char *v191; // [xsp+108h] [xbp+108h] PlatformToolbox *v192; // [xsp+110h] [xbp+110h] BYREF size_t v193; // [xsp+118h] [xbp+118h] char *v194; // [xsp+120h] [xbp+120h] __int64 v195[2]; // [xsp+128h] [xbp+128h] BYREF void *v196; // [xsp+138h] [xbp+138h] __int64 v197[2]; // [xsp+140h] [xbp+140h] BYREF void *v198; // [xsp+150h] [xbp+150h] __int64 v199[2]; // [xsp+158h] [xbp+158h] BYREF void *v200; // [xsp+168h] [xbp+168h] __int64 v201[2]; // [xsp+170h] [xbp+170h] BYREF void *v202; // [xsp+180h] [xbp+180h] __int64 v203[2]; // [xsp+188h] [xbp+188h] BYREF void *v204; // [xsp+198h] [xbp+198h] __int64 v205[2]; // [xsp+1A0h] [xbp+1A0h] BYREF void *v206; // [xsp+1B0h] [xbp+1B0h] __int64 v207[2]; // [xsp+1B8h] [xbp+1B8h] BYREF void *v208; // [xsp+1C8h] [xbp+1C8h] __int64 v209[2]; // [xsp+1D0h] [xbp+1D0h] BYREF void *v210; // [xsp+1E0h] [xbp+1E0h] __int64 v211[2]; // [xsp+1E8h] [xbp+1E8h] BYREF void *v212; // [xsp+1F8h] [xbp+1F8h] __int64 v213[2]; // [xsp+200h] [xbp+200h] BYREF void *v214; // [xsp+210h] [xbp+210h] __int64 v215[2]; // [xsp+218h] [xbp+218h] BYREF void *v216; // [xsp+228h] [xbp+228h] PlatformToolbox *v217; // [xsp+230h] [xbp+230h] BYREF size_t v218; // [xsp+238h] [xbp+238h] void *v219; // [xsp+240h] [xbp+240h] cocos2d::CCDirector *v220; // [xsp+248h] [xbp+248h] v2 = (cocos2d::CCDirector *)_stack_chk_guard; *((_QWORD *)this + 79) = 0; v220 = v2; v3 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v2); cocos2d::CCDirector::getWinSize(&v179, v3); v4 = *((_QWORD *)this + 76); v5 = v4 + 12288; v6 = *(GJGameLevel **)(v4 + 1936); v7 = *(unsigned __int8 *)(v4 + 12238); if ( *(_BYTE *)(v4 + 14644) ) { if ( *((_DWORD *)v6 + 225) == 5 ) { v8 = *((_DWORD *)this + 167); v9 = *((_DWORD *)v6 + 237) - *((_DWORD *)v6 + 238); *((_DWORD *)this + 168) = v9; } else { v9 = *((_DWORD *)this + 168); v8 = *((_DWORD *)v6 + 237) - *((_DWORD *)v6 + 238); *((_DWORD *)this + 167) = v8; } } else { v8 = *((_DWORD *)this + 167); v9 = *((_DWORD *)this + 168); } v10 = *(_DWORD *)(v4 + 14648); *((_DWORD *)this + 166) = v10; v11 = v8 > 0; v12 = *(_DWORD *)(v4 + 14652); if ( v9 > 0 ) ++v11; *((_DWORD *)this + 169) = v12; if ( v10 > 0 ) ++v11; if ( v12 > 0 ) ++v11; *((_BYTE *)this + 680) = *(_BYTE *)(v5 + 2368); if ( v11 > 2 ) { v13 = -34.0; v14 = 16.0; } else { v13 = -38.0; if ( v11 == 2 ) v14 = 5.0; else v14 = 0.0; } cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v180, (float)(*(float *)&v179 * 0.5) + 120.0, (float)((float)(*((float *)&v179 + 1) * 0.5) + 18.0) + v14); if ( *((int *)this + 167) > 0 || *((int *)this + 168) > 0 ) { cocos2d::CCPoint::operator=((char *)this + 640, v180); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, 0.0, v13); cocos2d::CCPoint::operator+(&v188, v180); cocos2d::CCPoint::operator=(v180, &v188); } if ( *((int *)this + 166) > 0 ) { cocos2d::CCPoint::operator=((char *)this + 648, v180); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, 0.0, v13); cocos2d::CCPoint::operator+(&v188, v180); cocos2d::CCPoint::operator=(v180, &v188); } if ( *((int *)this + 169) > 0 ) { cocos2d::CCPoint::operator=((char *)this + 656, v180); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, 0.0, v13); cocos2d::CCPoint::operator+(&v188, v180); cocos2d::CCPoint::operator=(v180, &v188); } if ( *(_BYTE *)(*((_QWORD *)this + 76) + 12544LL) ) v16 = "GJ_practiceComplete_001.png"; else v16 = "GJ_levelComplete_001.png"; v17 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v16, v15); (*(void (__fastcall **)(cocos2d::CCSprite *, float))(*(_QWORD *)v17 + 160LL))(v17, 0.8); (*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64))(**((_QWORD **)this + 72) + 464LL))( *((_QWORD *)this + 72), v17, 15); v18 = *(__int64 (__fastcall **)(cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v17 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v188, *(float *)&v179 * 0.5, (float)(*((float *)&v179 + 1) * 0.5) + 75.0); v19 = (GameManager *)v18(v17, &v188); v20 = (GameManager *)GameManager::sharedState(v19); if ( (unsigned __int8)GameManager::getGameVariable(v20, "0095") ) cocos2d::CCSprite::setFlipX(v17, 1); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 70) + 344LL))(*((_QWORD *)this + 70), 0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, 0.0, 5.0); cocos2d::CCPoint::operator+(&v188, (char *)this + 544); *(__n128 *)&v21 = cocos2d::CCPoint::operator=((char *)this + 544, &v188); v22 = (*(__int64 (__fastcall **)(cocos2d::CCSprite *, long double))(*(_QWORD *)v17 + 192LL))(v17, v21); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v188, 0.0, -40.0); cocos2d::CCPoint::operator+(&v181, v22); if ( v7 ) { *((float *)&v181 + 1) = *((float *)&v181 + 1) - 12.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v182, (const cocos2d::CCPoint *)&v181); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v184, (const cocos2d::CCPoint *)&v181); PlayTimerMilli = GJBaseGameLayer::getPlayTimerMilli(*((GJBaseGameLayer **)this + 76)); v189 = 0; v190 = 0; v191 = nullptr; v24 = (unsigned int)(PlayTimerMilli / 1000 / 3600); v25 = PlayTimerMilli / 1000 / 3600 == 0; v26 = (unsigned int)(PlayTimerMilli / 1000 / 60 % 60); v27 = PlayTimerMilli % 1000; v28 = (unsigned int)(PlayTimerMilli / 1000 % 60); if ( !(_DWORD)v26 ) { if ( !(PlayTimerMilli / 1000 / 3600) ) { v29 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", (const char *)(unsigned int)v28, v26); CString = (char *)cocos2d::CCString::getCString(v29); std::string::assign(&v189, CString); goto LABEL_29; } goto LABEL_65; } } else { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v182, (const cocos2d::CCPoint *)&v181); v27 = 0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v184, (const cocos2d::CCPoint *)&v181); v78 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Attempts: %i", (const char *)*(unsigned int *)(*((_QWORD *)this + 76) + 12212LL)); v79 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v78); v81 = cocos2d::CCLabelBMFont::create(v79, "goldFont.fnt", v80); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 72) + 464LL))( *((_QWORD *)this + 72), v81, 3); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v81 + 184LL))(v81, v182); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v81 + 160LL))(v81, 0.8); (*(void (__fastcall **)(__int64))(*(_QWORD *)v81 + 336LL))(v81); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, -21.0 - (float)(*(float *)&v186 * 0.5), -2.0); cocos2d::CCPoint::operator+(&v188, v182); cocos2d::CCPoint::operator=(v184, &v188); v82 = (const char *)*(unsigned int *)(*((_QWORD *)this + 76) + 14624LL); v183 = v183 - 24.0; v83 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Jumps: %i", v82); v84 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v83); v86 = cocos2d::CCLabelBMFont::create(v84, "goldFont.fnt", v85); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 72) + 464LL))( *((_QWORD *)this + 72), v86, 3); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v86 + 184LL))(v86, v182); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v86 + 160LL))(v86, 0.8); v87 = *(double *)(*((_QWORD *)this + 76) + 936LL); v189 = 0; v190 = 0; v191 = nullptr; v24 = (unsigned int)((int)v87 / 3600); v28 = (unsigned int)((int)v87 % 60); v26 = (unsigned int)((int)v87 / 60 % 60); v25 = (int)v87 / 3600 == 0; v183 = v183 - 24.0; } if ( v25 ) { v88 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%02d:%02d", (const char *)(unsigned int)v26, (unsigned int)v28); goto LABEL_59; } LABEL_65: v88 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%02d:%02d:%02d", (const char *)v24, v26, v28); LABEL_59: v89 = (char *)cocos2d::CCString::getCString(v88); std::string::assign(&v189, v89); if ( v7 ) { LABEL_29: v31 = (char *)&v189 + 1; if ( (v189 & 1) != 0 ) v31 = v191; v32 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s.%03d", v31, v27); v33 = (char *)cocos2d::CCString::getCString(v32); std::string::assign(&v189, v33); if ( (v189 & 1) == 0 ) goto LABEL_32; LABEL_61: v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"Time: %s", v191); goto LABEL_33; } if ( (v189 & 1) != 0 ) goto LABEL_61; LABEL_32: v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Time: %s", (const char *)&v189 + 1); LABEL_33: v35 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v34); v37 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v35, "goldFont.fnt", v36); (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**((_QWORD **)this + 72) + 464LL))( *((_QWORD *)this + 72), v37, 3); (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v37 + 184LL))(v37, v182); cocos2d::CCLabelBMFont::limitLabelWidth(v37, 150.0, 0.8, 0.0); v183 = v183 - 24.0; if ( !v7 ) goto LABEL_35; v38 = (GameToolbox *)*(unsigned int *)(*((_QWORD *)this + 76) + 1916LL); if ( !(_DWORD)v38 ) goto LABEL_35; GameToolbox::pointsToString(v38, (unsigned __int64 *)&v192); if ( ((unsigned __int8)v192 & 1) != 0 ) { v140 = v193; v141 = ((unsigned __int64)v192 & 0xFFFFFFFFFFFFFFFELL) - 1; if ( v141 - v193 > 7 ) { v142 = v194; LABEL_105: v143 = "Points: "; if ( v140 ) { if ( v142 <= "Points: " && &v142[v140] > "Points: " ) v143 = ""; v174 = (cocos2d::CCSprite *)v143; v177 = (cocos2d::CCNode *)v140; memmove(v142 + 8, v142, v140); v140 = (size_t)v177; v143 = (char *)v174; } v144 = v140 + 8; *(_QWORD *)v142 = *(_QWORD *)v143; if ( ((unsigned __int8)v192 & 1) != 0 ) v193 = v144; else LOBYTE(v192) = 2 * v144; v142[v144] = 0; goto LABEL_113; } } else { v140 = (unsigned __int8)v192 >> 1; v141 = 22; v142 = (char *)&v192 + 1; if ( 22 - v140 > 7 ) goto LABEL_105; } std::string::__grow_by_and_replace((__int64)&v192, v141, v140 + 8 - v141, v140, 0, 0, 8u, "Points: "); LABEL_113: v217 = v192; v145 = (cocos2d::CCLabelBMFont *)((char *)&v217 + 1); v218 = v193; if ( ((unsigned __int8)v192 & 1) != 0 ) v145 = (cocos2d::CCLabelBMFont *)v194; v219 = v194; v146 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v145, "goldFont.fnt", v194); (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**((_QWORD **)this + 72) + 464LL))( *((_QWORD *)this + 72), v146, 3); (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v146 + 184LL))(v146, v182); cocos2d::CCLabelBMFont::limitLabelWidth(v146, 150.0, 0.8, 0.0); v183 = v183 - 24.0; if ( ((unsigned __int8)v217 & 1) != 0 ) operator delete(v219); LABEL_35: if ( *((_DWORD *)v6 + 285) == 2 ) { v195[0] = 0; v195[1] = 0; v196 = nullptr; std::string::__init(v195, &byte_11E1A70, 1u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v188, 0.5, 1.0); v163 = (__int64 *)TextArea::create( (char *)v195, "bigFont.fnt", (const cocos2d::CCPoint *)&v188, 0, 0, 1.0, 620.0, 20.0); if ( (v195[0] & 1) != 0 ) operator delete(v196); (*(void (__fastcall **)(_QWORD, __int64 *))(**((_QWORD **)this + 72) + 456LL))(*((_QWORD *)this + 72), v163); (*(void (__fastcall **)(__int64 *, float))(*v163 + 160))(v163, 0.55); v164 = *v163; v165 = (float)(*((float *)&v179 + 1) * 0.5) + -51.0; v166 = *(float *)&v179 * 0.5; *((_DWORD *)v163 + 162) = 1107820544; v167 = *(void (__fastcall **)(__int64 *, __int64 *))(v164 + 184); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v188, v166, v165); v167(v163, &v188); if ( v7 ) { v169 = *(void (__fastcall **)(__int64 *, __int64 *))(*v163 + 184); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, 0.0, -12.0); cocos2d::CCPoint::operator+(&v188, v182); v169(v163, &v188); } if ( *(_BYTE *)(*((_QWORD *)this + 76) + 14185LL) ) { v197[0] = 0; v197[1] = 0; v198 = nullptr; std::string::__init(v197, "You cannot verify a level after using Ignore Damage.", 0x34u); TextArea::setString(v163, (char *)v197); v39 = LOBYTE(v197[0]); if ( (v197[0] & 1) != 0 ) operator delete(v198); } else if ( *(_BYTE *)(*((_QWORD *)this + 76) + 14186LL) ) { v199[0] = 0; v199[1] = 0; v200 = nullptr; std::string::__init(v199, "You cannot verify a level after using Speed Changes.", 0x34u); TextArea::setString(v163, (char *)v199); v39 = LOBYTE(v199[0]); if ( (v199[0] & 1) != 0 ) operator delete(v200); } else if ( *(_BYTE *)(*((_QWORD *)this + 76) + 12616LL) ) { v201[0] = 0; v201[1] = 0; v202 = nullptr; std::string::__init(v201, "You cannot verify a level if it has a start pos.", 0x30u); TextArea::setString(v163, (char *)v201); v39 = LOBYTE(v201[0]); if ( (v201[0] & 1) != 0 ) operator delete(v202); } else if ( !*(_BYTE *)(*((_QWORD *)this + 76) + 12544LL) || *((_DWORD *)v6 + 194) - *((_DWORD *)v6 + 195) == 1 ) { if ( (unsigned __int8)GJGameLevel::areCoinsVerified(v6) ) { if ( *((int *)v6 + 241) <= 0 ) { v207[0] = 0; v207[1] = 0; v208 = nullptr; std::string::__init(v207, "Level Verified!", 0xFu); TextArea::setString(v163, (char *)v207); v39 = LOBYTE(v207[0]); if ( (v207[0] & 1) != 0 ) operator delete(v208); } else { v205[0] = 0; v205[1] = 0; v206 = nullptr; std::string::__init(v205, "Level and Coins Verified!", 0x19u); TextArea::setString(v163, (char *)v205); v39 = LOBYTE(v205[0]); if ( (v205[0] & 1) != 0 ) operator delete(v206); } } else { EndLevelLayer::getCoinString(this, v209); v170 = (char *)v209 + 1; if ( (v209[0] & 1) != 0 ) v170 = (const char *)v210; v178 = (cocos2d::CCNode *)v170; v211[0] = 0; v211[1] = 0; v212 = nullptr; v171 = strlen(v170); std::string::__init(v211, v178, v171); TextArea::setString(v163, (char *)v211); if ( (v211[0] & 1) != 0 ) operator delete(v212); v39 = LOBYTE(v209[0]); if ( (v209[0] & 1) != 0 ) operator delete(v210); } } else { v203[0] = 0; v203[1] = 0; v204 = nullptr; std::string::__init(v203, "Complete the level in normal mode to verify it!", 0x2Fu); TextArea::setString(v163, (char *)v203); v39 = LOBYTE(v203[0]); if ( (v203[0] & 1) != 0 ) operator delete(v204); } } else if ( *(_BYTE *)(*((_QWORD *)this + 76) + 12544LL) ) { v213[0] = 0; v213[1] = 0; v214 = nullptr; std::string::__init(v213, &byte_11E1A70, 1u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v188, 0.5, 1.0); v135 = (__int64 *)TextArea::create( (char *)v213, "bigFont.fnt", (const cocos2d::CCPoint *)&v188, 0, 0, 1.0, 620.0, 20.0); if ( (v213[0] & 1) != 0 ) operator delete(v214); (*(void (__fastcall **)(_QWORD, __int64 *))(**((_QWORD **)this + 72) + 456LL))(*((_QWORD *)this + 72), v135); (*(void (__fastcall **)(__int64 *, float))(*v135 + 160))(v135, 0.55); v136 = *v135; v137 = (float)(*((float *)&v179 + 1) * 0.5) + -51.0; v138 = *(float *)&v179 * 0.5; *((_DWORD *)v135 + 162) = 1107820544; v139 = *(void (__fastcall **)(__int64 *, __int64 *))(v136 + 184); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v188, v138, v137); v139(v135, &v188); v215[0] = 0; v215[1] = 0; v216 = nullptr; std::string::__init(v215, "Well done... Now try to complete it without any checkpoints!", 0x3Cu); TextArea::setString(v135, (char *)v215); v39 = LOBYTE(v215[0]); if ( (v215[0] & 1) != 0 ) operator delete(v216); } else { v39 = *((unsigned int *)v6 + 241); if ( (int)v39 <= 0 ) { EndText = EndLevelLayer::getEndText(this); v149 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create( (cocos2d::CCLabelBMFont *)EndText, "bigFont.fnt", v148); cocos2d::CCLabelBMFont::limitLabelWidth(v149, 260.0, 0.9, 0.0); (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**((_QWORD **)this + 72) + 464LL))( *((_QWORD *)this + 72), v149, 3); v150 = *(__int64 (__fastcall **)(cocos2d::CCLabelBMFont *, __int64 *))(*(_QWORD *)v149 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v188, *(float *)&v179 * 0.5, (float)(*((float *)&v179 + 1) * 0.5) + -65.0); v39 = v150(v149, &v188); } } v40 = cocos2d::CCMenu::create((cocos2d::CCMenu *)v39); v41 = *((_QWORD *)this + 72); *((_QWORD *)this + 78) = v40; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v41 + 464LL))(v41, v40, 1); v42 = *((cocos2d::CCNode **)this + 78); v43 = *((cocos2d::CCNode **)this + 72); v44 = (float)((float)(*((float *)&v179 + 1) * 0.5) + -115.0) - 10.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, *(float *)&v179 * 0.5, v44); cocos2d::CCNode::convertToWorldSpace(&v188, v43, (const cocos2d::CCPoint *)&v187); cocos2d::CCNode::convertToNodeSpace(&v185, v42, (const cocos2d::CCPoint *)&v188); v46 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_replayBtn_001.png", v45); v172 = CCMenuItemSpriteExtra::create(v46, 0, (__int64)this, (__int64)EndLevelLayer::onReplay, 0); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 78) + 456LL))(*((_QWORD *)this + 78), v172); v47 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v172 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, -100.0, 0.0); cocos2d::CCPoint::operator+(&v188, &v185); v47(v172, &v188); v49 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_menuBtn_001.png", v48); v50 = CCMenuItemSpriteExtra::create(v49, 0, (__int64)this, (__int64)EndLevelLayer::onMenu, 0); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 78) + 456LL))(*((_QWORD *)this + 78), v50); v173 = v50; v51 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v50 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, 100.0, 0.0); cocos2d::CCPoint::operator+(&v188, &v185); v51(v173, &v188); if ( *((_DWORD *)v6 + 285) == 2 ) { v156 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_editBtn_001.png", v52); v157 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v156 + 160LL); v158 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v49 + 328LL))(v49); v159 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v156 + 328LL))(v156); v157(v156, v158 / *v159); v160 = CCMenuItemSpriteExtra::create(v156, 0, (__int64)this, (__int64)EndLevelLayer::onEdit, 0); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 78) + 456LL))(*((_QWORD *)this + 78), v160); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v186, *(float *)&v179 * 0.5, v44); v161 = *((cocos2d::CCNode **)this + 78); cocos2d::CCNode::convertToWorldSpace(&v187, *((cocos2d::CCNode **)this + 72), (const cocos2d::CCPoint *)&v186); cocos2d::CCNode::convertToNodeSpace(&v188, v161, (const cocos2d::CCPoint *)&v187); *(__n128 *)&v162 = cocos2d::CCPoint::operator=(&v186, &v188); (*(void (__fastcall **)(__int64, __int64 *, long double))(*(_QWORD *)v160 + 184LL))(v160, &v186, v162); } if ( *(_BYTE *)(*((_QWORD *)this + 76) + 12544LL) ) { v120 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_restartCheckBtn_001.png", v52); v121 = CCMenuItemSpriteExtra::create(v120, 0, (__int64)this, (__int64)EndLevelLayer::onRestartCheckpoint, 0); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 78) + 456LL))(*((_QWORD *)this + 78), v121); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v186, (float)(*(float *)&v179 * 0.5) + -180.0, v44); v122 = *((cocos2d::CCNode **)this + 78); cocos2d::CCNode::convertToWorldSpace(&v187, *((cocos2d::CCNode **)this + 72), (const cocos2d::CCPoint *)&v186); cocos2d::CCNode::convertToNodeSpace(&v188, v122, (const cocos2d::CCPoint *)&v187); *(__n128 *)&v123 = cocos2d::CCPoint::operator=(&v186, &v188); (*(void (__fastcall **)(__int64, __int64 *, long double))(*(_QWORD *)v121 + 184LL))(v121, &v186, v123); } if ( v7 ) { if ( *((_DWORD *)v6 + 285) == 1 ) goto LABEL_46; } else if ( (unsigned int)(*((_DWORD *)v6 + 285) - 1) <= 1 ) { LABEL_55: v74 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"sideBtn_death_001.png", v52); v75 = CCMenuItemSpriteExtra::create(v74, 0, (__int64)this, (__int64)EndLevelLayer::onDeathTracker, 0); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 78) + 456LL))(*((_QWORD *)this + 78), v75); v76 = *((cocos2d::CCNode **)this + 78); v77 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v75 + 184LL); cocos2d::CCNode::convertToWorldSpace(&v187, *((cocos2d::CCNode **)this + 72), (const cocos2d::CCPoint *)v184); cocos2d::CCNode::convertToNodeSpace(&v188, v76, (const cocos2d::CCPoint *)&v187); v77(v75, &v188); goto LABEL_46; } v53 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_levelLeaderboardBtn_001.png", v52); v54 = CCMenuItemSpriteExtra::create(v53, 0, (__int64)this, (__int64)EndLevelLayer::onLevelLeaderboard, 0); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 78) + 456LL))(*((_QWORD *)this + 78), v54); v55 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v54 + 184LL); v175 = *((cocos2d::CCNode **)this + 78); v56 = *((cocos2d::CCNode **)this + 72); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v186, (float)(*(float *)&v179 * 0.5) + 178.0, (float)(*((float *)&v179 + 1) * 0.5) + 115.0); cocos2d::CCNode::convertToWorldSpace(&v187, v56, (const cocos2d::CCPoint *)&v186); cocos2d::CCNode::convertToNodeSpace(&v188, v175, (const cocos2d::CCPoint *)&v187); v55(v54, &v188); if ( !v7 ) goto LABEL_55; LABEL_46: v57 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"hideBtn_001.png", v52); (*(void (__fastcall **)(cocos2d::CCNode *, _QWORD))(*(_QWORD *)v57 + 912LL))(v57, 0); v58 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create( (__int64)v57, 0, (__int64)this, (__int64)EndLevelLayer::onHideLayer, 0); v60 = (cocos2d::CCDirector **)cocos2d::CCMenu::createWithItem(v58, v59); (*(void (__fastcall **)(EndLevelLayer *, cocos2d::CCDirector **, __int64))(*(_QWORD *)this + 464LL))(this, v60, 100); v61 = *((void (__fastcall **)(cocos2d::CCDirector **, float, float))*v60 + 25); v62 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(*v60); ScreenRight = (cocos2d::CCDirector *)cocos2d::CCDirector::getScreenRight(v62); v65 = v64 - 17.0; v66 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(ScreenRight); cocos2d::CCDirector::getScreenTop(v66); v61(v60, v65, v67 - 15.0); v69 = (cocos2d::CCAction *)cocos2d::CCFadeTo::create((cocos2d::CCFadeTo *)((char *)&dword_7C + 1), 1.0, v68); cocos2d::CCNode::runAction(v57, v69); *((_BYTE *)this + 616) = *((_DWORD *)v6 + 285) != 1; *((_BYTE *)this + 617) = *((_DWORD *)v6 + 242) - *((_DWORD *)v6 + 243) == 1; v70 = *((_DWORD *)v6 + 241); if ( v70 > 0 && !*(_BYTE *)(*((_QWORD *)this + 76) + 12544LL) && !*(_BYTE *)(*((_QWORD *)this + 76) + 12616LL) ) { v90 = (cocos2d::CCArray *)*((unsigned int *)v6 + 285); if ( (_DWORD)v90 != 2 ) { v91 = (cocos2d::CCObject *)cocos2d::CCArray::create(v90); *((_QWORD *)this + 79) = v91; cocos2d::CCObject::retain(v91); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v187, *(float *)&v179 * 0.5, (float)(*((float *)&v179 + 1) * 0.5) + 126.0); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v188, *(float *)&v179 * 0.5, (float)(*((float *)&v179 + 1) * 0.5) + -64.0); cocos2d::CCPoint::operator=(&v187, &v188); if ( v70 > 4 ) { v168 = 13.0; } else if ( v70 == 4 ) { v168 = 15.0; } else { v168 = 20.0; } v94 = (cocos2d::CCArray *)cocos2d::CCArray::create(v92); for ( i = 1; i <= v70; ++i ) { while ( 1 ) { v96 = (cocos2d::CCSprite *)(*((_BYTE *)this + 616) ? "secretCoin_2_b_01_001.png" : "secretCoin_b_01_001.png"); v97 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(v96, v93); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *, __int64))(**((_QWORD **)this + 72) + 464LL))( *((_QWORD *)this + 72), v97, 8); cocos2d::CCArray::addObject(v94, v97); if ( *((_BYTE *)this + 616) ) { if ( !*((_BYTE *)this + 617) ) break; } if ( v70 < ++i ) goto LABEL_80; } v98 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v97 + 960LL); LOWORD(v188) = -20481; BYTE2(v188) = 75; v98(v97, &v188); } LABEL_80: cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v188, (const cocos2d::CCPoint *)&v187); GameToolbox::alignItemsHorisontally((__int64)v94, (__int64)&v188, 0, v168); for ( j = 1; v70 >= j; ++j ) { v100 = cocos2d::CCArray::objectAtIndex(v94, j - 1); if ( *((_BYTE *)this + 616) ) { v101 = (GameStatsManager *)*((unsigned __int8 *)this + 617); if ( *((_BYTE *)this + 617) ) { v102 = (GameStatsManager *)GameStatsManager::sharedState(v101); CoinKey = (const char *)GJGameLevel::getCoinKey(v6, j); hasUserCoin = GameStatsManager::hasUserCoin(v102, CoinKey); } else { v152 = (GameStatsManager *)GameStatsManager::sharedState(v101); v153 = (const char *)GJGameLevel::getCoinKey(v6, j); hasUserCoin = GameStatsManager::hasPendingUserCoin(v152, v153); } } else { v154 = (GameStatsManager *)GameStatsManager::sharedState((GameStatsManager *)*((unsigned __int8 *)this + 616)); v155 = (const char *)GJGameLevel::getCoinKey(v6, j); hasUserCoin = GameStatsManager::hasSecretCoin(v154, v155); } v105 = hasUserCoin; hasItem = (unsigned __int8)GJBaseGameLayer::hasItem(*((GJBaseGameLayer **)this + 76), j); if ( v105 <= hasItem ) goto LABEL_120; v108 = "secretCoinUI2_001.png"; if ( !*((_BYTE *)this + 616) ) v108 = "secretCoinUI_001.png"; v109 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v108, v106); v176 = *(cocos2d::CCNode **)(*(_QWORD *)v109 + 184LL); v110 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v100 + 192LL))(v100); ((void (__fastcall *)(__int64, __int64))v176)(v109, v110); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 72) + 464LL))( *((_QWORD *)this + 72), v109, 9); if ( *((_BYTE *)this + 616) ) { if ( !*((_BYTE *)this + 617) ) { v151 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v109 + 960LL); LOWORD(v188) = -20481; BYTE2(v188) = 75; v151(v109, &v188); LABEL_120: if ( hasItem ) { v111 = (const char *)*((unsigned __int8 *)this + 616); v112 = "secretCoinUI_001.png"; if ( *((_BYTE *)this + 616) ) v112 = "secretCoinUI2_001.png"; goto LABEL_91; } continue; } if ( hasItem ) { v112 = "secretCoinUI2_001.png"; LABEL_91: v113 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v112, v111); v114 = v100; v115 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v100 + 192LL); v116 = *(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v113 + 184LL); v117 = v115(v114); v116(v113, v117); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 79), v113); v118 = *((unsigned __int8 *)this + 616); *((_BYTE *)this + 620) = 1; if ( v118 && !*((_BYTE *)this + 617) ) { v119 = *(void (__fastcall **)(cocos2d::CCObject *, __int64 *))(*(_QWORD *)v113 + 960LL); LOWORD(v188) = -20481; BYTE2(v188) = 75; v119(v113, &v188); } } } else if ( hasItem ) { v112 = "secretCoinUI_001.png"; goto LABEL_91; } } } } v217 = nullptr; v218 = 0; v219 = nullptr; std::string::__init((__int64 *)&v217, "Geometry Dash", 0xDu); PlatformToolbox::tryShowRateDialog((__int64)&v217); v71 = (PlatformToolbox *)(unsigned __int8)v217; if ( ((unsigned __int8)v217 & 1) != 0 ) operator delete(v219); if ( (unsigned __int8)PlatformToolbox::isControllerConnected(v71) ) { v124 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_Start_001.png", v72); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 72) + 464LL))( *((_QWORD *)this + 72), v124, 10); v125 = *((cocos2d::CCNode **)this + 72); v126 = (cocos2d::CCNode *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v172 + 512LL))(v172); v127 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v172 + 192LL))(v172); cocos2d::CCNode::convertToWorldSpace(&v188, v126, v127); cocos2d::CCNode::convertToNodeSpace(&v186, v125, (const cocos2d::CCPoint *)&v188); v128 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v124 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, 0.0, -25.0); cocos2d::CCPoint::operator+(&v188, &v186); v128(v124, &v188); v130 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"controllerBtn_B_001.png", v129); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 72) + 464LL))( *((_QWORD *)this + 72), v130, 10); v131 = *((cocos2d::CCNode **)this + 72); v132 = (cocos2d::CCNode *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v173 + 512LL))(v173); v133 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v173 + 192LL))(v173); cocos2d::CCNode::convertToWorldSpace(&v187, v132, v133); cocos2d::CCNode::convertToNodeSpace(&v188, v131, (const cocos2d::CCPoint *)&v187); cocos2d::CCPoint::operator=(&v186, &v188); v134 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v130 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v187, 0.0, -25.0); cocos2d::CCPoint::operator+(&v188, &v186); v134(v130, &v188); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v130 + 160LL))(v130, 0.8); } if ( (v189 & 1) != 0 ) operator delete(v191); return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source