// // EndLevelLayer::customSetup from 0x140203d90 to 0x1402059bb (7211 bytes) // // 2 xrefs: // > @ 0x1407536f8 // > @ 0x14091b134 // // This function is hookable on this platform (idp: pc, 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 11:28:15 +0000 // // Hidden C++ exception states: #wind=11 void __fastcall EndLevelLayer::customSetup(__int64 a1) { __int64 v2; // rax __int64 v3; // rax _DWORD *v4; // r13 char v5; // si int v6; // ecx int v7; // r8d int v8; // ecx unsigned int v9; // ecx float v10; // xmm0_4 float v11; // xmm6_4 __int64 v12; // rax __int64 v13; // rax __int64 v14; // rax const char *v15; // rcx cocos2d::CCSprite *v16; // rdi __int64 v17; // rbx __int64 v18; // rax __int64 v19; // rcx __int64 v20; // rax __int64 v21; // rax __int64 v22; // rbx __int64 v23; // rax double v24; // xmm0_8 int v25; // r8d int v26; // ebx cocos2d::CCString *v27; // rax const char *CString; // rax struct cocos2d::CCLabelBMFont *v29; // rbx float *v30; // rax __int64 v31; // rax cocos2d::CCString *v32; // rax const char *v33; // rax struct cocos2d::CCLabelBMFont *v34; // rbx unsigned int v35; // r9d int v36; // r10d int v37; // edx cocos2d::CCString *v38; // rax char *v39; // rax size_t v40; // r8 cocos2d::CCString *v41; // rax char *v42; // rax size_t v43; // r8 const char *v44; // rdx cocos2d::CCString *v45; // rax char *v46; // rax size_t v47; // r8 const char *v48; // rdx cocos2d::CCString *v49; // rax const char *v50; // rax cocos2d::CCLabelBMFont *v51; // rbx __int64 v52; // rcx signed int v53; // edx __m128i *v54; // rax __int64 v55; // rax void **v56; // rcx cocos2d::CCLabelBMFont *v57; // rbx void *v58; // rcx const struct cocos2d::CCPoint *v59; // rax __int64 *v60; // rdi __int64 v61; // rbx __int64 v62; // rax __int64 v63; // rax _BYTE *v64; // rax _QWORD *v65; // rcx int v66; // eax _QWORD *CoinString; // rax size_t v68; // r8 const struct cocos2d::CCPoint *v69; // rax __int64 *v70; // rdi __int64 v71; // rbx __int64 v72; // rax const char *EndText; // rax cocos2d::CCLabelBMFont *v74; // rdi __int64 v75; // rbx __int64 v76; // rax __int64 v77; // rax float v78; // xmm6_4 __int64 v79; // rbx __int64 v80; // rdi __int64 v81; // rax __int64 v82; // rax int v83; // eax cocos2d::CCObject *v84; // rbx __int64 v85; // rax struct cocos2d::CCSprite *v86; // rbx cocos2d::CCObject *v87; // rdi __int64 v88; // rax int v89; // ecx struct cocos2d::CCSprite *v90; // rsi __int64 v91; // rdi cocos2d::CCObject *v92; // rdi __int64 v93; // rbx __int64 v94; // rax __int64 v95; // rax int v96; // eax cocos2d::CCObject *v97; // rdi __int64 v98; // rbx __int64 v99; // rax __int64 v100; // rax int v101; // eax cocos2d::CCObject *v102; // r14 __int64 v103; // rsi __int64 v104; // rbx __int64 v105; // rdi __int64 v106; // rax __int64 v107; // rax __int64 v108; // rax int v109; // eax cocos2d::CCObject *v110; // rsi __int64 v111; // rdi __int64 v112; // rbx __int64 v113; // rax __int64 v114; // rax struct cocos2d::CCSprite *v115; // rsi cocos2d::CCObject *v116; // rax struct cocos2d::CCMenu *v117; // rdi __int64 v118; // rbx __int64 v119; // rcx cocos2d::CCDirector *v120; // rax __int64 v121; // rcx cocos2d::CCDirector *v122; // rax struct cocos2d::CCAction *v123; // rax __int64 v124; // rcx __int64 v125; // rbx __int64 v126; // rax cocos2d::CCObject *v127; // rax __int64 v128; // rax __int64 v129; // rcx float v130; // xmm6_4 __int64 v131; // rax cocos2d::CCArray *v132; // r14 __int64 v133; // rsi __int64 v134; // rdi const char *v135; // rcx struct cocos2d::CCSprite *v136; // rbx __int64 v137; // rax unsigned int v138; // r12d struct cocos2d::CCObject *v139; // rsi __int64 v140; // rbx __int64 v141; // rax char hasUserCoin; // al __int64 CoinKey; // rax __int64 v144; // rax char v145; // bl __int64 v146; // rdi cocos2d::CCString *v147; // rax const char *v148; // rax size_t v149; // r8 __int64 v150; // rdi void *v151; // rcx const char *v152; // rcx struct cocos2d::CCSprite *v153; // rdi __int64 v154; // rbx __int64 v155; // rax __int16 *v156; // rdx const char *v157; // rcx __int64 v158; // rbx __int64 v159; // rax __int64 v160; // rcx struct cocos2d::CCSprite *v161; // r14 cocos2d::CCObject *v162; // r12 __int64 (__fastcall *v163)(cocos2d::CCObject *); // rdi __int64 v164; // rsi __int64 v165; // rbx __int64 v166; // rax __int64 v167; // rax __int64 v168; // rax struct cocos2d::CCSprite *v169; // r14 __m128i *v170; // r12 __int64 (__fastcall *v171)(__m128i *); // rdi __int64 v172; // rsi __int64 v173; // rbx __int64 v174; // rax __int64 v175; // rax __int64 v176; // rax __int64 v177; // rax __m128i *v178; // [rsp+48h] [rbp-C0h] BYREF _BYTE v179[8]; // [rsp+50h] [rbp-B8h] BYREF int v180; // [rsp+58h] [rbp-B0h] float v181; // [rsp+60h] [rbp-A8h] BYREF float v182; // [rsp+64h] [rbp-A4h] int v183; // [rsp+68h] [rbp-A0h] BYREF __int16 v184; // [rsp+70h] [rbp-98h] BYREF char v185; // [rsp+72h] [rbp-96h] __int16 v186; // [rsp+74h] [rbp-94h] BYREF char v187; // [rsp+76h] [rbp-92h] _BYTE v188[4]; // [rsp+78h] [rbp-90h] BYREF float v189; // [rsp+7Ch] [rbp-8Ch] _BYTE v190[8]; // [rsp+80h] [rbp-88h] BYREF cocos2d::CCObject *v191; // [rsp+88h] [rbp-80h] BYREF void *v192; // [rsp+90h] [rbp-78h] BYREF __int16 v193; // [rsp+98h] [rbp-70h] __int16 v194; // [rsp+9Ch] [rbp-6Ch] BYREF char v195; // [rsp+9Eh] [rbp-6Ah] _BYTE v196[4]; // [rsp+A0h] [rbp-68h] BYREF float v197; // [rsp+A4h] [rbp-64h] _BYTE v198[8]; // [rsp+A8h] [rbp-60h] BYREF __int64 v199; // [rsp+B0h] [rbp-58h] BYREF void *v200; // [rsp+B8h] [rbp-50h] BYREF _BYTE v201[8]; // [rsp+C0h] [rbp-48h] BYREF void *Block[2]; // [rsp+C8h] [rbp-40h] BYREF __int128 v203; // [rsp+D8h] [rbp-30h] __m128i v204; // [rsp+E8h] [rbp-20h] BYREF __int64 v205; // [rsp+F8h] [rbp-10h] unsigned __int64 v206; // [rsp+100h] [rbp-8h] __int128 v207; // [rsp+108h] [rbp+0h] BYREF __int64 v208; // [rsp+118h] [rbp+10h] unsigned __int64 v209; // [rsp+120h] [rbp+18h] _BYTE v210[32]; // [rsp+128h] [rbp+20h] BYREF *(_QWORD *)(a1 + 632) = 0; v2 = cocos2d::CCDirector::sharedDirector(a1); cocos2d::CCDirector::getWinSize(v2, &v181); v3 = *(_QWORD *)(a1 + 608); v4 = *(_DWORD **)(v3 + 2168); v5 = *(_BYTE *)(v3 + 12670); LOBYTE(v180) = v5; if ( *(_BYTE *)(v3 + 15324) ) { v6 = v4[255] - v4[256]; if ( v4[243] == 5 ) *(_DWORD *)(a1 + 672) = v6; else *(_DWORD *)(a1 + 668) = v6; } v7 = *(_DWORD *)(v3 + 15328); *(_DWORD *)(a1 + 664) = v7; v8 = *(_DWORD *)(v3 + 15332); *(_DWORD *)(a1 + 676) = v8; *(_BYTE *)(a1 + 680) = *(_BYTE *)(v3 + 15336); v9 = (*(_DWORD *)(a1 + 672) > 0) + (v7 > 0) + (v8 > 0) + (*(_DWORD *)(a1 + 668) > 0); v10 = 0.0; v11 = -38.0; if ( v9 < 3 ) { if ( v9 == 2 ) v10 = 5.0; } else { v11 = -34.0; v10 = 16.0; } cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v190, (float)(v181 * 0.5) + 120.0, (float)((float)(v182 * 0.5) + 18.0) + v10); if ( *(int *)(a1 + 668) > 0 || *(int *)(a1 + 672) > 0 ) { cocos2d::CCPoint::operator=(a1 + 640, v190); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, 0.0, v11); cocos2d::CCPoint::operator+(v190, v179, v12); cocos2d::CCPoint::operator=(v190, v179); } if ( *(int *)(a1 + 664) > 0 ) { cocos2d::CCPoint::operator=(a1 + 648, v190); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, 0.0, v11); cocos2d::CCPoint::operator+(v190, v179, v13); cocos2d::CCPoint::operator=(v190, v179); } if ( *(int *)(a1 + 676) > 0 ) { cocos2d::CCPoint::operator=(a1 + 656, v190); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, 0.0, v11); cocos2d::CCPoint::operator+(v190, v179, v14); cocos2d::CCPoint::operator=(v190, v179); } v15 = "GJ_practiceComplete_001.png"; if ( !*(_BYTE *)(*(_QWORD *)(a1 + 608) + 13024LL) ) v15 = "GJ_levelComplete_001.png"; v16 = cocos2d::CCSprite::createWithSpriteFrameName(v15); (*(void (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v16 + 160LL))(v16); (*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))( *(_QWORD *)(a1 + 576), v16, 15); v17 = *(_QWORD *)v16; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, v181 * 0.5, (float)(v182 * 0.5) + 75.0); (*(void (__fastcall **)(cocos2d::CCSprite *, __int64))(v17 + 184))(v16, v18); v19 = qword_14090BFD0; if ( !qword_14090BFD0 ) { v191 = (cocos2d::CCObject *)operator new(0x6E8u); qword_14090BFD0 = GameManager::GameManager(v191); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0); v19 = qword_14090BFD0; } if ( (unsigned __int8)GameManager::getGameVariable(v19, "0095") ) cocos2d::CCSprite::setFlipX(v16, 1); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 560) + 336LL))(*(_QWORD *)(a1 + 560), 0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, 0.0, 5.0); cocos2d::CCPoint::operator+(a1 + 544, v179, v20); cocos2d::CCPoint::operator=(a1 + 544, v179); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, 0.0, -40.0); v22 = v21; v23 = (*(__int64 (__fastcall **)(cocos2d::CCSprite *))(*(_QWORD *)v16 + 200LL))(v16); cocos2d::CCPoint::operator+(v23, v196, v22); if ( v5 ) { v197 = v197 + -12.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v188, (const struct cocos2d::CCPoint *)v196); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, (const struct cocos2d::CCPoint *)v196); v24 = *(double *)(*(_QWORD *)(a1 + 608) + 13920LL) * 1000.0; v25 = (int)v24 / 1000; v26 = (int)v24 % 1000; } else { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v188, (const struct cocos2d::CCPoint *)v196); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v198, (const struct cocos2d::CCPoint *)v196); v27 = cocos2d::CCString::createWithFormat("Attempts: %i", *(_DWORD *)(*(_QWORD *)(a1 + 608) + 12644LL)); CString = cocos2d::CCString::getCString(v27); v29 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))( *(_QWORD *)(a1 + 576), v29, 3); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v29 + 184LL))(v29, v188); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v29 + 160LL))(v29); v30 = (float *)(*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *, __m128i **))(*(_QWORD *)v29 + 328LL))( v29, &v178); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v191, (float)((float)-*v30 * 0.5) - 21.0, -2.0); cocos2d::CCPoint::operator+(v188, v179, v31); cocos2d::CCPoint::operator=(v198, v179); v189 = v189 + -24.0; v32 = cocos2d::CCString::createWithFormat("Jumps: %i", *(_DWORD *)(*(_QWORD *)(a1 + 608) + 15304LL)); v33 = cocos2d::CCString::getCString(v32); v34 = cocos2d::CCLabelBMFont::create(v33, "goldFont.fnt"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))( *(_QWORD *)(a1 + 576), v34, 3); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v34 + 184LL))(v34, v188); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v34 + 160LL))(v34); v189 = v189 + -24.0; v26 = 0; v25 = (int)*(double *)(*(_QWORD *)(a1 + 608) + 984LL); } v35 = v25 % 60; v36 = v25 / 60 % 60; v37 = v25 / 3600; v207 = 0; v208 = 0; v209 = 15; LOBYTE(v207) = 0; if ( !v5 || v36 ) { if ( !v37 ) { v41 = cocos2d::CCString::createWithFormat("%02d:%02d", v36, v35); LABEL_34: v42 = (char *)cocos2d::CCString::getCString(v41); v43 = -1; do ++v43; while ( v42[v43] ); sub_1400405A0((void **)&v207, v42, v43); if ( !v5 ) goto LABEL_42; goto LABEL_37; } LABEL_33: v41 = cocos2d::CCString::createWithFormat("%02d:%02d:%02d", v37, v36, v35); goto LABEL_34; } if ( v37 ) goto LABEL_33; v38 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v35); v39 = (char *)cocos2d::CCString::getCString(v38); v40 = -1; do ++v40; while ( v39[v40] ); sub_1400405A0((void **)&v207, v39, v40); LABEL_37: v44 = (const char *)&v207; if ( v209 > 0xF ) v44 = (const char *)v207; v45 = cocos2d::CCString::createWithFormat("%s.%03d", v44, v26); v46 = (char *)cocos2d::CCString::getCString(v45); v47 = -1; do ++v47; while ( v46[v47] ); sub_1400405A0((void **)&v207, v46, v47); LABEL_42: v48 = (const char *)&v207; if ( v209 > 0xF ) v48 = (const char *)v207; v49 = cocos2d::CCString::createWithFormat("Time: %s", v48); v50 = cocos2d::CCString::getCString(v49); v51 = cocos2d::CCLabelBMFont::create(v50, "goldFont.fnt"); (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))( *(_QWORD *)(a1 + 576), v51, 3); (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v51 + 184LL))(v51, v188); cocos2d::CCLabelBMFont::limitLabelWidth(v51, 150.0, 0.80000001, 0.0); v189 = v189 + -24.0; if ( v5 ) { v53 = *(_DWORD *)(*(_QWORD *)(a1 + 608) + 2148LL); if ( v53 ) { v54 = GameToolbox::pointsToString(&v204, v53); v55 = sub_140059D70(v54, 0, "Points: ", 8u); *(_OWORD *)Block = 0; v203 = 0u; *(_OWORD *)Block = *(_OWORD *)v55; v203 = *(_OWORD *)(v55 + 16); *(_QWORD *)(v55 + 16) = 0; *(_QWORD *)(v55 + 24) = 15; *(_BYTE *)v55 = 0; sub_14003D310((__int64)&v204); v56 = Block; if ( *((_QWORD *)&v203 + 1) > 0xFu ) v56 = (void **)Block[0]; v57 = cocos2d::CCLabelBMFont::create((const char *)v56, "goldFont.fnt"); (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))( *(_QWORD *)(a1 + 576), v57, 3); (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v57 + 184LL))(v57, v188); cocos2d::CCLabelBMFont::limitLabelWidth(v57, 150.0, 0.80000001, 0.0); v189 = v189 + -24.0; if ( *((_QWORD *)&v203 + 1) > 0xFu ) { v58 = Block[0]; if ( (unsigned __int64)(*((_QWORD *)&v203 + 1) + 1LL) >= 0x1000 ) { v58 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v58 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v58); } } } v199 = 1; if ( v4[305] == 2 ) { v178 = &v204; v204 = 0; v205 = 1; v206 = 15; v204.m128i_i16[0] = (unsigned __int8)asc_1406ED6E4[0]; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v191, 0.5, 1.0); v60 = (__int64 *)TextArea::create((__int64)&v204, &qword_140704F78, 1.0, 620.0, v59, 1101004800, 0, 0); (*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 576) + 464LL))(*(_QWORD *)(a1 + 576), v60); (*(void (__fastcall **)(__int64 *))(*v60 + 160))(v60); *((_DWORD *)v60 + 166) = 1107820544; v61 = *v60; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, v181 * 0.5, (float)(v182 * 0.5) - 51.0); (*(void (__fastcall **)(__int64 *, __int64))(v61 + 184))(v60, v62); if ( v5 ) { cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, 0.0, -12.0); cocos2d::CCPoint::operator+(v188, v179, v63); (*(void (__fastcall **)(__int64 *, _BYTE *))(*v60 + 184))(v60, v179); } v64 = *(_BYTE **)(a1 + 608); if ( v64[14841] ) { *(_OWORD *)Block = 0; v203 = 0u; v65 = sub_14003D460(0x40u); Block[0] = v65; *(_QWORD *)&v203 = 52; *((_QWORD *)&v203 + 1) = 63; qmemcpy(v65, "You cannot verify a level after using Ignore Dam", 48); v66 = 778397537; LABEL_60: *((_DWORD *)v65 + 12) = v66; *((_BYTE *)v65 + 52) = 0; TextArea::setString(v60, (__int64)Block); goto LABEL_80; } if ( v64[14842] ) { *(_OWORD *)Block = 0; v203 = 0u; v65 = sub_14003D460(0x40u); Block[0] = v65; *(_QWORD *)&v203 = 52; *((_QWORD *)&v203 + 1) = 63; qmemcpy(v65, "You cannot verify a level after using Speed Chan", 48); v66 = 779314535; goto LABEL_60; } if ( v64[13096] ) { *(_OWORD *)Block = 0; v203 = 0u; Block[0] = sub_14003D460(0x40u); *(_QWORD *)&v203 = 48; *((_QWORD *)&v203 + 1) = 63; strcpy((char *)Block[0], "You cannot verify a level if it has a start pos."); TextArea::setString(v60, (__int64)Block); } else if ( !v64[13024] || v4[212] - v4[213] == 1 ) { if ( (unsigned __int8)GJGameLevel::areCoinsVerified(v4) ) { if ( (int)v4[259] <= 0 ) { *(_QWORD *)&v203 = 15; *((_QWORD *)&v203 + 1) = 15; strcpy((char *)Block, "Level Verified!"); } else { *(_OWORD *)Block = 0; v203 = 0u; Block[0] = sub_14003D460(0x20u); *(_QWORD *)&v203 = 25; *((_QWORD *)&v203 + 1) = 31; strcpy((char *)Block[0], "Level and Coins Verified!"); } TextArea::setString(v60, (__int64)Block); } else { CoinString = (_QWORD *)EndLevelLayer::getCoinString(a1, v210); if ( CoinString[3] > 0xFu ) CoinString = (_QWORD *)*CoinString; *(_OWORD *)Block = 0; v203 = 0u; v68 = -1; do ++v68; while ( *((_BYTE *)CoinString + v68) ); sub_14003D230(Block, CoinString, v68); TextArea::setString(v60, (__int64)Block); sub_14003D310((__int64)v210); } } else { *(_OWORD *)Block = 0; v203 = 0u; Block[0] = sub_14003D460(0x30u); *(_QWORD *)&v203 = 47; *((_QWORD *)&v203 + 1) = 47; strcpy((char *)Block[0], "Complete the level in normal mode to verify it!"); TextArea::setString(v60, (__int64)Block); } } else if ( *(_BYTE *)(*(_QWORD *)(a1 + 608) + 13024LL) ) { v178 = &v204; v204 = 0; v205 = 1; v206 = 15; v204.m128i_i16[0] = (unsigned __int8)asc_1406ED6E4[0]; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v191, 0.5, 1.0); v70 = (__int64 *)TextArea::create((__int64)&v204, &qword_140704F78, 1.0, 620.0, v69, 1101004800, 0, 0); (*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 576) + 464LL))(*(_QWORD *)(a1 + 576), v70); (*(void (__fastcall **)(__int64 *))(*v70 + 160))(v70); *((_DWORD *)v70 + 166) = 1107820544; v71 = *v70; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, v181 * 0.5, (float)(v182 * 0.5) - 51.0); (*(void (__fastcall **)(__int64 *, __int64))(v71 + 184))(v70, v72); *(_OWORD *)Block = 0; v203 = 0u; Block[0] = sub_14003D460(0x40u); *(_QWORD *)&v203 = 60; *((_QWORD *)&v203 + 1) = 63; strcpy((char *)Block[0], "Well done... Now try to complete it without any checkpoints!"); TextArea::setString(v70, (__int64)Block); } else if ( (int)v4[259] <= 0 ) { EndText = (const char *)EndLevelLayer::getEndText(); v74 = cocos2d::CCLabelBMFont::create(EndText, (const char *)&qword_140704F78); cocos2d::CCLabelBMFont::limitLabelWidth(v74, 260.0, 0.89999998, 0.0); (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))( *(_QWORD *)(a1 + 576), v74, 3); v75 = *(_QWORD *)v74; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, v181 * 0.5, (float)(v182 * 0.5) - 65.0); (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64))(v75 + 184))(v74, v76); } LABEL_80: v77 = cocos2d::CCMenu::create(v52); *(_QWORD *)(a1 + 624) = v77; (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 576) + 456LL))(*(_QWORD *)(a1 + 576), v77, 1); v78 = (float)((float)(v182 * 0.5) - 115.0) - 10.0; v79 = *(_QWORD *)(a1 + 576); v80 = *(_QWORD *)(a1 + 624); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, v181 * 0.5, v78); cocos2d::CCNode::convertToWorldSpace(v79, &v191, v81); cocos2d::CCNode::convertToNodeSpace(v80, v201, v82); v83 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_replayBtn_001.png"); v84 = CCMenuItemSpriteExtra::create(v83, 0, a1, (__int64)EndLevelLayer::onReplay); v191 = v84; (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 624) + 464LL))(*(_QWORD *)(a1 + 624), v84); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v178, -100.0, 0.0); cocos2d::CCPoint::operator+(v201, v179, v85); (*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v84 + 184LL))(v84, v179); v86 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_menuBtn_001.png"); v87 = CCMenuItemSpriteExtra::create((int)v86, 0, a1, (__int64)EndLevelLayer::onMenu); v178 = (__m128i *)v87; (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 624) + 464LL))(*(_QWORD *)(a1 + 624), v87); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v183, 100.0, 0.0); cocos2d::CCPoint::operator+(v201, v179, v88); (*(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_QWORD *)v87 + 184LL))(v87, v179); v89 = v4[305]; if ( v89 == 2 ) { v90 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_editBtn_001.png"); v91 = *(_QWORD *)v90; (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v86 + 320LL))(v86); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v90 + 320LL))(v90); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(v91 + 160))(v90); v92 = CCMenuItemSpriteExtra::create((int)v90, 0, a1, (__int64)EndLevelLayer::onEdit); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 624) + 464LL))(*(_QWORD *)(a1 + 624), v92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v183, v181 * 0.5, v78); v93 = *(_QWORD *)(a1 + 624); cocos2d::CCNode::convertToWorldSpace(*(_QWORD *)(a1 + 576), v179, &v183); cocos2d::CCNode::convertToNodeSpace(v93, &v192, v94); cocos2d::CCPoint::operator=(&v183, v95); (*(void (__fastcall **)(cocos2d::CCObject *, int *))(*(_QWORD *)v92 + 184LL))(v92, &v183); v89 = v4[305]; v5 = v180; } if ( *(_BYTE *)(*(_QWORD *)(a1 + 608) + 13024LL) ) { v96 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_restartCheckBtn_001.png"); v97 = CCMenuItemSpriteExtra::create(v96, 0, a1, (__int64)EndLevelLayer::onRestartCheckpoint); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 624) + 464LL))(*(_QWORD *)(a1 + 624), v97); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v183, (float)(v181 * 0.5) - 180.0, v78); v98 = *(_QWORD *)(a1 + 624); cocos2d::CCNode::convertToWorldSpace(*(_QWORD *)(a1 + 576), &v192, &v183); cocos2d::CCNode::convertToNodeSpace(v98, v179, v99); cocos2d::CCPoint::operator=(&v183, v100); (*(void (__fastcall **)(cocos2d::CCObject *, int *))(*(_QWORD *)v97 + 184LL))(v97, &v183); v89 = v4[305]; } if ( !v5 && v89 == 2 ) goto LABEL_89; if ( v89 != 1 ) { v101 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("GJ_levelLeaderboardBtn_001.png"); v102 = CCMenuItemSpriteExtra::create(v101, 0, a1, (__int64)EndLevelLayer::onLevelLeaderboard); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 624) + 464LL))(*(_QWORD *)(a1 + 624), v102); v103 = *(_QWORD *)v102; v104 = *(_QWORD *)(a1 + 576); v105 = *(_QWORD *)(a1 + 624); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v192, (float)(v181 * 0.5) + 178.0, (float)(v182 * 0.5) + 115.0); cocos2d::CCNode::convertToWorldSpace(v104, v179, v106); cocos2d::CCNode::convertToNodeSpace(v105, &v183, v107); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v103 + 184))(v102, v108); v5 = v180; } if ( !v5 ) { LABEL_89: v109 = (unsigned int)cocos2d::CCSprite::createWithSpriteFrameName("sideBtn_death_001.png"); v110 = CCMenuItemSpriteExtra::create(v109, 0, a1, (__int64)EndLevelLayer::onDeathTracker); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 624) + 464LL))(*(_QWORD *)(a1 + 624), v110); v111 = *(_QWORD *)v110; v112 = *(_QWORD *)(a1 + 624); cocos2d::CCNode::convertToWorldSpace(*(_QWORD *)(a1 + 576), &v192, v198); cocos2d::CCNode::convertToNodeSpace(v112, v179, v113); (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v111 + 184))(v110, v114); } v115 = cocos2d::CCSprite::createWithSpriteFrameName("hideBtn_001.png"); (*(void (__fastcall **)(__int64, _QWORD))(*((_QWORD *)v115 + 40) + 40LL))((__int64)v115 + 320, 0); v116 = CCMenuItemSpriteExtra::create((int)v115, 0, a1, (__int64)EndLevelLayer::onHideLayer); v117 = cocos2d::CCMenu::createWithItem(v116); (*(void (__fastcall **)(__int64, struct cocos2d::CCMenu *, __int64))(*(_QWORD *)a1 + 456LL))(a1, v117, 100); v118 = *(_QWORD *)v117; v120 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v119); cocos2d::CCDirector::getScreenTop(v120); v122 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v121); cocos2d::CCDirector::getScreenRight(v122); (*(void (__fastcall **)(struct cocos2d::CCMenu *))(v118 + 176))(v117); v123 = cocos2d::CCFadeTo::create(1.0, 0x7Du); cocos2d::CCNode::runAction(v115, v123); *(_BYTE *)(a1 + 616) = v4[305] != 1; *(_BYTE *)(a1 + 617) = v4[260] - v4[261] == 1; v125 = (unsigned int)v4[259]; v183 = v125; if ( (int)v125 > 0 ) { v126 = *(_QWORD *)(a1 + 608); if ( !*(_BYTE *)(v126 + 13024) && !*(_BYTE *)(v126 + 13096) && v4[305] != 2 ) { v127 = (cocos2d::CCObject *)cocos2d::CCArray::create(v124); *(_QWORD *)(a1 + 632) = v127; cocos2d::CCObject::retain(v127); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v179, v181 * 0.5, (float)(v182 * 0.5) + 126.0); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v192, v181 * 0.5, (float)(v182 * 0.5) - 64.0); cocos2d::CCPoint::operator=(v179, v128); if ( (int)v125 < 5 ) { if ( (int)v125 >= 4 ) { v131 = cocos2d::CCArray::create(v129); v130 = 15.0; goto LABEL_100; } v130 = 20.0; } else { v130 = 13.0; } v131 = cocos2d::CCArray::create(v129); LABEL_100: v132 = (cocos2d::CCArray *)v131; v133 = v131; v134 = v125; do { v135 = "secretCoin_b_01_001.png"; if ( *(_BYTE *)(a1 + 616) ) v135 = "secretCoin_2_b_01_001.png"; v136 = cocos2d::CCSprite::createWithSpriteFrameName(v135); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))( *(_QWORD *)(a1 + 576), v136, 8); cocos2d::CCArray::addObject(v132, v136); if ( *(_BYTE *)(a1 + 616) && !*(_BYTE *)(a1 + 617) ) { v184 = -20481; v186 = -20481; v187 = 75; (**((void (__fastcall ***)(__int64, __int16 *))v136 + 40))((__int64)v136 + 320, &v186); } --v134; } while ( v134 ); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v192, (const struct cocos2d::CCPoint *)v179); GameToolbox::alignItemsHorisontally(v133, v130, v137, 0); v138 = v199; while ( 1 ) { v139 = cocos2d::CCArray::objectAtIndex(v132, v138 - 1); v140 = qword_14090BFE0; if ( *(_BYTE *)(a1 + 616) ) { if ( *(_BYTE *)(a1 + 617) ) { if ( !qword_14090BFE0 ) { v199 = (__int64)operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480(v199); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v140 = qword_14090BFE0; } CoinKey = GJGameLevel::getCoinKey(v4, v138, (unsigned int)(v4[248] - v4[249])); hasUserCoin = GameStatsManager::hasUserCoin(v140, CoinKey); } else { if ( !qword_14090BFE0 ) { v200 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480(v200); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v140 = qword_14090BFE0; } v144 = GJGameLevel::getCoinKey(v4, v138, (unsigned int)(v4[248] - v4[249])); hasUserCoin = GameStatsManager::hasPendingUserCoin(v140, v144); } } else { if ( !qword_14090BFE0 ) { v192 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480(v192); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v140 = qword_14090BFE0; } v141 = GJGameLevel::getCoinKey(v4, v138, (unsigned int)(v4[248] - v4[249])); hasUserCoin = GameStatsManager::hasSecretCoin(v140, v141); } v145 = hasUserCoin; v146 = *(_QWORD *)(a1 + 608); v147 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, v138); v148 = cocos2d::CCString::getCString(v147); v204 = 0; v205 = 0; v206 = 0; v149 = -1; do ++v149; while ( v148[v149] ); sub_14003D230(&v204, v148, v149); v150 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(v146 + 13064), &v204); if ( v206 > 0xF ) { v151 = (void *)v204.m128i_i64[0]; if ( v206 + 1 >= 0x1000 ) { v151 = *(void **)(v204.m128i_i64[0] - 8); if ( (unsigned __int64)(v204.m128i_i64[0] - (_QWORD)v151 - 8) > 0x1F ) invoke_watson(nullptr, nullptr, nullptr, 0, 0); } j_j_free(v151); } if ( v145 ) break; if ( v150 ) goto LABEL_133; LABEL_139: if ( (int)++v138 > v183 ) goto LABEL_140; } if ( v150 ) { LABEL_133: v157 = "secretCoinUI_001.png"; if ( *(_BYTE *)(a1 + 616) ) v157 = "secretCoinUI2_001.png"; v153 = cocos2d::CCSprite::createWithSpriteFrameName(v157); v158 = *(_QWORD *)v153; v159 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v139 + 200LL))(v139); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v158 + 184))(v153, v159); cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 632), v153); *(_BYTE *)(a1 + 620) = 1; if ( !*(_BYTE *)(a1 + 616) || *(_BYTE *)(a1 + 617) ) goto LABEL_139; v193 = -20481; v194 = -20481; v195 = 75; v156 = &v194; } else { v152 = "secretCoinUI_001.png"; if ( *(_BYTE *)(a1 + 616) ) v152 = "secretCoinUI2_001.png"; v153 = cocos2d::CCSprite::createWithSpriteFrameName(v152); v154 = *(_QWORD *)v153; v155 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v139 + 200LL))(v139); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v154 + 184))(v153, v155); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))( *(_QWORD *)(a1 + 576), v153, 9); if ( !*(_BYTE *)(a1 + 616) || *(_BYTE *)(a1 + 617) ) goto LABEL_139; v186 = -20481; v184 = -20481; v185 = 75; v156 = &v184; } (**((void (__fastcall ***)(__int64, __int16 *))v153 + 40))((__int64)v153 + 320, v156); goto LABEL_139; } } LABEL_140: *(_QWORD *)&v203 = 13; *((_QWORD *)&v203 + 1) = 15; strcpy((char *)Block, "Geometry Dash"); HIWORD(Block[1]) = 0; sub_14003D310((__int64)Block); if ( *(_BYTE *)(cocos2d::CCApplication::sharedApplication(v160) + 209) ) { v161 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_Start_001.png"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))( *(_QWORD *)(a1 + 576), v161, 10); v162 = v191; v163 = *(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v191 + 504LL); v164 = *(_QWORD *)(a1 + 576); v165 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v191 + 200LL))(v191); v166 = v163(v162); cocos2d::CCNode::convertToWorldSpace(v166, &v200, v165); cocos2d::CCNode::convertToNodeSpace(v164, &v183, v167); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v192, 0.0, -25.0); cocos2d::CCPoint::operator+(&v183, &v191, v168); (*(void (__fastcall **)(struct cocos2d::CCSprite *, cocos2d::CCObject **))(*(_QWORD *)v161 + 184LL))(v161, &v191); v169 = cocos2d::CCSprite::createWithSpriteFrameName("controllerBtn_B_001.png"); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 576) + 456LL))( *(_QWORD *)(a1 + 576), v169, 10); v170 = v178; v171 = *(__int64 (__fastcall **)(__m128i *))(v178->m128i_i64[0] + 504); v172 = *(_QWORD *)(a1 + 576); v173 = (*(__int64 (__fastcall **)(__m128i *))(v178->m128i_i64[0] + 200))(v178); v174 = v171(v170); cocos2d::CCNode::convertToWorldSpace(v174, &v200, v173); cocos2d::CCNode::convertToNodeSpace(v172, &v192, v175); cocos2d::CCPoint::operator=(&v183, v176); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v199, 0.0, -25.0); cocos2d::CCPoint::operator+(&v183, &v178, v177); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __m128i **))(*(_QWORD *)v169 + 184LL))(v169, &v178); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v169 + 160LL))(v169); } sub_14003D310((__int64)&v207); }