//
// LevelPage::updateDynamicPage from 0x140443df0 to 0x14044523b (5195 bytes)
//
// 2 xrefs:
// > LevelSelectLayer::updatePageWithObject @ 0x1404425ce
// > ??> @ 0x1409271d0
//
// 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:32:23 +0000
//
// Hidden C++ exception states: #wind=12
void __fastcall LevelPage::updateDynamicPage(__int64 a1, cocos2d::CCObject *a2)
{
struct cocos2d::CCParticleSystemQuad *v4; // r14
cocos2d::CCObject *v5; // rcx
unsigned int i; // ebx
struct cocos2d::CCObject *v7; // rax
__int64 v8; // rcx
__int64 v9; // rax
unsigned int j; // ebx
struct cocos2d::CCObject *v11; // rax
__int64 v12; // rdx
unsigned int k; // ebx
struct cocos2d::CCObject *v14; // rax
__int64 v15; // rdx
float v16; // xmm1_4
float v17; // xmm3_4
float *v18; // rax
__int64 v19; // rdi
__int64 *v20; // rbx
__int64 v21; // rax
float *v22; // rdx
__int64 v23; // rdi
__int64 *v24; // rbx
__int64 v25; // rax
cocos2d::CCString *v26; // rax
const char *CString; // rax
cocos2d::CCString *v28; // rax
const char *v29; // rax
__int64 v30; // rcx
_QWORD *v31; // rdx
__int64 *v32; // rcx
__int64 v33; // rbx
int v34; // ecx
signed int v35; // r13d
int v36; // edx
cocos2d::CCString *v37; // rax
const char *v38; // rdi
_QWORD *v39; // rcx
__int64 v40; // rsi
_QWORD *v41; // rbx
__int64 v42; // rdx
cocos2d::CCSpriteFrameCache *v43; // rax
struct cocos2d::CCSpriteFrame *v44; // rax
float *v45; // rbx
double v46; // xmm0_8
float v47; // xmm9_4
float v48; // xmm6_4
__int64 v49; // rdi
__int64 v50; // rbx
__int64 v51; // rax
__int64 v52; // rdi
float v53; // xmm6_4
float *v54; // rax
__int64 v55; // rbx
__int64 v56; // rax
void (__fastcall **v57)(__int64, const char *); // rdi
__int64 v58; // rbx
cocos2d::CCString *v59; // rax
const char *v60; // rax
__int64 v61; // rcx
bool hasCompletedStarLevel; // al
void (__fastcall ***v63)(_QWORD, __int16 *); // rcx
__int16 *v64; // rdx
__int64 v65; // rbx
const char *CoinKey; // rax
bool hasSecretCoin; // si
__int64 v68; // rdx
__int64 v69; // rcx
struct cocos2d::CCObject *v70; // r12
__int64 v71; // rdi
const char *v72; // rbx
cocos2d::CCSpriteFrameCache *v73; // rax
struct cocos2d::CCSpriteFrame *v74; // rax
__int16 *v75; // rdx
int v76; // edi
int v77; // r12d
unsigned int v78; // r14d
struct cocos2d::CCObject *v79; // rax
struct cocos2d::CCSprite *v80; // r14
__int64 v81; // rbx
__int64 v82; // rax
struct cocos2d::CCObject *v83; // rsi
__int64 v84; // rbx
__int64 v85; // rax
cocos2d::CCString *v86; // rax
const char *v87; // rax
struct cocos2d::CCObject *v88; // rdi
__int64 v89; // rbx
__int64 v90; // rax
__int64 v91; // rax
__int64 v92; // rbx
__int64 v93; // rax
__int64 v94; // rcx
int BaseCurrencyForLevel; // edi
__int64 v96; // rbx
_QWORD *v97; // rcx
int AwardedCurrencyForLevel; // ebx
cocos2d::CCString *v99; // rax
const char *v100; // rax
__int64 v101; // rbx
__int64 v102; // rax
__int64 v103; // rbx
__int64 v104; // rax
__int64 v105; // rbx
float v106; // xmm8_4
float v107; // xmm6_4
double v108; // xmm0_8
float v109; // xmm7_4
__int64 v110; // rax
cocos2d::CCArray *v111; // rcx
unsigned int v112; // ebx
struct cocos2d::CCObject *v113; // rax
cocos2d::CCNode *v114; // rsi
cocos2d::CCObject *v115; // rbx
struct cocos2d::CCMenu *v116; // rdi
__int64 v117; // rbx
__int64 v118; // rax
struct cocos2d::CCSprite *v119; // rdi
__int64 v120; // rbx
float v121; // xmm6_4
float *v122; // rax
__int64 v123; // rax
const struct cocos2d::CCPoint *v124; // rax
struct cocos2d::CCActionInterval *v125; // rax
struct cocos2d::CCFiniteTimeAction *v126; // rbx
const struct cocos2d::CCPoint *v127; // rax
struct cocos2d::CCActionInterval *v128; // rax
struct cocos2d::CCEaseInOut *v129; // rax
struct cocos2d::CCActionInterval *v130; // rax
struct cocos2d::CCAction *v131; // rax
_WORD *v132; // rax
struct cocos2d::CCParticleSystemQuad *v133; // r12
__int64 v134; // rbx
float v135; // xmm6_4
float *v136; // rax
__int64 v137; // rax
_WORD *v138; // rax
struct cocos2d::CCParticleSystemQuad *v139; // rdi
__int64 v140; // rbx
float v141; // xmm6_4
float *v142; // rax
__int64 v143; // rax
__int64 v144; // rbx
float v145; // xmm6_4
float *v146; // rax
__int64 v147; // rax
__int64 v148; // rbx
struct cocos2d::CCObject *v149; // rax
struct cocos2d::CCLabelBMFont *v150; // rdi
__int64 v151; // rbx
__int64 v152; // rax
__int64 v153; // rcx
__int64 v154; // rdx
__int16 v155; // [rsp+38h] [rbp-D0h] BYREF
char v156; // [rsp+3Ah] [rbp-CEh]
__int64 v157[2]; // [rsp+40h] [rbp-C8h] BYREF
__int16 v158; // [rsp+50h] [rbp-B8h] BYREF
char v159; // [rsp+52h] [rbp-B6h]
__int16 v160; // [rsp+54h] [rbp-B4h]
__int16 v161; // [rsp+58h] [rbp-B0h] BYREF
char v162; // [rsp+5Ah] [rbp-AEh]
void *v163; // [rsp+60h] [rbp-A8h] BYREF
float v164; // [rsp+68h] [rbp-A0h] BYREF
float v165; // [rsp+6Ch] [rbp-9Ch]
_QWORD v166[3]; // [rsp+70h] [rbp-98h] BYREF
__int64 v167; // [rsp+88h] [rbp-80h]
unsigned __int64 v168; // [rsp+90h] [rbp-78h]
__int128 v169; // [rsp+98h] [rbp-70h] BYREF
__int64 v170; // [rsp+A8h] [rbp-60h]
__int64 v171; // [rsp+B0h] [rbp-58h]
__int128 v172; // [rsp+B8h] [rbp-50h] BYREF
__int64 v173; // [rsp+C8h] [rbp-40h]
__int64 v174; // [rsp+D0h] [rbp-38h]
unsigned int v175[66]; // [rsp+D8h] [rbp-30h] BYREF
_BYTE v176[40]; // [rsp+1E0h] [rbp+D8h] BYREF
unsigned int v177[66]; // [rsp+208h] [rbp+100h] BYREF
_BYTE v178[40]; // [rsp+310h] [rbp+208h] BYREF
unsigned int v179[66]; // [rsp+338h] [rbp+230h] BYREF
_BYTE v180[40]; // [rsp+440h] [rbp+338h] BYREF
v4 = nullptr;
if ( *(_BYTE *)(a1 + 416) )
return;
v5 = *(cocos2d::CCObject **)(a1 + 424);
if ( v5 )
{
if ( *((_DWORD *)a2 + 82) - *((_DWORD *)a2 + 83) == *((_DWORD *)v5 + 82) - *((_DWORD *)v5 + 83) )
return;
cocos2d::CCObject::release(v5);
*(_QWORD *)(a1 + 424) = 0;
}
for ( i = 0; i < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 536)); ++i )
{
v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 536), i);
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v7 + 512LL))(v7);
}
cocos2d::CCArray::removeAllObjects(*(cocos2d::CCArray **)(a1 + 536));
*(_QWORD *)(a1 + 568) = 0;
*(_QWORD *)(a1 + 424) = a2;
cocos2d::CCObject::retain(a2);
v9 = cocos2d::CCDirector::sharedDirector(v8);
cocos2d::CCDirector::getWinSize(v9, &v164);
if ( *(_DWORD *)(*(_QWORD *)(a1 + 424) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 424) + 332LL) <= 0 )
{
v111 = *(cocos2d::CCArray **)(a1 + 552);
if ( *(_DWORD *)(*(_QWORD *)(a1 + 424) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 424) + 332LL) != -2 )
{
if ( cocos2d::CCArray::count(v111) )
{
do
{
v149 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 552), (unsigned int)v4);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v149 + 336LL))(v149, 0);
LODWORD(v4) = (_DWORD)v4 + 1;
}
while ( (unsigned int)v4 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 552)) );
}
v150 = cocos2d::CCLabelBMFont::create("Coming Soon!", (const char *)&qword_140704F78);
(*(void (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)a1 + 464LL))(a1, v150);
v151 = *(_QWORD *)v150;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, v164 * 0.5, (float)(v165 * 0.5) + 50.0);
(*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v151 + 184))(v150, v152);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 536), v150);
LevelPage::addSecretDoor(a1);
goto LABEL_71;
}
v112 = 0;
if ( cocos2d::CCArray::count(v111) )
{
do
{
v113 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 552), v112);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v113 + 336LL))(v113, 0);
++v112;
}
while ( v112 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 552)) );
}
v114 = cocos2d::CCSprite::createWithSpriteFrameName("theTowerDoor_001.png");
v157[0] = (__int64)operator new(0x208u);
v115 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v157[0]);
if ( v115 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v115, (__int64 *)v114, 0, a1, (__int64)LevelPage::onTheTower) )
{
cocos2d::CCObject::autorelease(v115);
LABEL_57:
v116 = cocos2d::CCMenu::createWithItem(v115);
(*(void (__fastcall **)(__int64, struct cocos2d::CCMenu *))(*(_QWORD *)a1 + 464LL))(a1, v116);
v117 = *(_QWORD *)v116;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, v164 * 0.5, (float)(v165 * 0.5) - 5.0);
(*(void (__fastcall **)(struct cocos2d::CCMenu *, __int64))(v117 + 184))(v116, v118);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 536), v116);
v119 = cocos2d::CCSprite::createWithSpriteFrameName("theTowerLabel_001.png");
(*(void (__fastcall **)(cocos2d::CCNode *, struct cocos2d::CCSprite *))(*(_QWORD *)v114 + 464LL))(v114, v119);
v120 = *(_QWORD *)v119;
v121 = *(float *)((*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v114 + 320LL))(v114) + 4) + 23.0;
v122 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v114 + 320LL))(v114);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, *v122 * 0.5, v121);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v120 + 184))(v119, v123);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, 0.0, 5.0);
v125 = cocos2d::CCMoveBy::create(2.5, v124);
v126 = cocos2d::CCEaseInOut::create(v125, 1.8);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, 0.0, -5.0);
v128 = cocos2d::CCMoveBy::create(2.5, v127);
v129 = cocos2d::CCEaseInOut::create(v128, 1.8);
v130 = cocos2d::CCSequence::create(v126, v129, 0);
v131 = cocos2d::CCRepeatForever::create(v130);
cocos2d::CCNode::runAction(v114, v131);
*(_OWORD *)&v166[1] = 0;
v167 = 0;
v168 = 0;
v132 = sub_14003D460(0xC0u);
v166[1] = v132;
v167 = 189;
v168 = 191;
qmemcpy(
v132,
"30a-1a2.2a0.48a11a90a180a29a0a11a0a0a0a0a0a0a0a5a1a0a0a0.0745098a0a0a0a0.611765a0a1a0a2a1a0a0a0a0a0.937255a0a1"
"a0a1a0a0.54a0a0.57a0a56a0a11a0a-25a17a1a2a1a0a0a1a0a0a0a0a0a0a0a0a0a0a0a0a0a0a",
188);
v132[94] = (unsigned __int8)a30a1a22a048a11[188];
if ( v167 )
{
sub_14006BF90((__int64)v175);
GameToolbox::particleStringToStruct(&v166[1], (__int64)v175);
v133 = GameToolbox::particleFromStruct(v175, nullptr, 0);
sub_14003D310((__int64)v176);
}
else
{
v133 = nullptr;
}
(*(void (__fastcall **)(cocos2d::CCNode *, struct cocos2d::CCParticleSystemQuad *, __int64))(*(_QWORD *)v114 + 456LL))(
v114,
v133,
11);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v133 + 160LL))(v133);
cocos2d::CCParticleSystem::resetSystem(v133);
v134 = *(_QWORD *)v133;
v135 = *(float *)((*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v114 + 320LL))(v114) + 4) * 0.5;
v136 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v114 + 320LL))(v114);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, *v136 * 0.5, v135);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __int64))(v134 + 184))(v133, v137);
v172 = 0;
v173 = 0;
v174 = 0;
v138 = sub_14003D460(0xC0u);
*(_QWORD *)&v172 = v138;
v173 = 183;
v174 = 191;
qmemcpy(
v138,
"20a-1a2a0.3a8a90a90a0a2a27a30a0a0a0a0a0a0a75a28a0a360a0a0a0.839216a0a1a0a0.05a0a0a0a0a0a0.184314a0a0a0a1a0a0.0"
"5a0a0.73a0a0.71a0a0a0a0a0a0a0a0a2a1a1a0a0a184a0a0a0a0a0a0a1a0a0a0a0a0a0a",
182);
v138[91] = *(unsigned __int8 *)(0x140000000LL + 7937414);
if ( v173 )
{
sub_14006BF90((__int64)v177);
GameToolbox::particleStringToStruct((__int64 *)&v172, (__int64)v177);
v139 = GameToolbox::particleFromStruct(v177, nullptr, 0);
sub_14003D310((__int64)v178);
}
else
{
v139 = nullptr;
}
(*(void (__fastcall **)(cocos2d::CCNode *, struct cocos2d::CCParticleSystemQuad *, __int64))(*(_QWORD *)v114 + 456LL))(
v114,
v139,
11);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v139 + 160LL))(v139);
cocos2d::CCParticleSystem::resetSystem(v139);
v140 = *(_QWORD *)v139;
v141 = *(float *)((*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v114 + 320LL))(v114) + 4) * 0.5;
v142 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v114 + 320LL))(v114);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, *v142 * 0.5, v141);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __int64))(v140 + 184))(v139, v143);
v169 = 0;
v170 = 0;
v171 = 0;
*(_QWORD *)&v169 = sub_14003D460(0xC0u);
v170 = 178;
v171 = 191;
strcpy(
(char *)v169,
"3a-1a3a0.3a1a90a90a0a2a11a13a0a0a0a0a0a0a15a5a0a0a0a0a0.839216a0a1a0a0.15a0.16a0a0a0a0a0.184314a0a0a0a1a0a0.21"
"a0.07a1a0a1a0a0a0a0a0a0a0a0a2a1a1a0a0a34a0a0a0a0a0a0a1a0a0a0a0a0a0a0");
if ( v170 )
{
sub_14006BF90((__int64)v179);
GameToolbox::particleStringToStruct((__int64 *)&v169, (__int64)v179);
v4 = GameToolbox::particleFromStruct(v179, nullptr, 0);
sub_14003D310((__int64)v180);
}
(*(void (__fastcall **)(cocos2d::CCNode *, struct cocos2d::CCParticleSystemQuad *, __int64))(*(_QWORD *)v114 + 456LL))(
v114,
v4,
11);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v4 + 160LL))(v4);
cocos2d::CCParticleSystem::resetSystem(v4);
v144 = *(_QWORD *)v4;
v145 = *(float *)((*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v114 + 320LL))(v114) + 4) * 0.5;
v146 = (float *)(*(__int64 (__fastcall **)(cocos2d::CCNode *))(*(_QWORD *)v114 + 320LL))(v114);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, *v146 * 0.5, v145);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *, __int64))(v144 + 184))(v4, v147);
v148 = 20;
do
{
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v133 + 32LL))(v133);
(*(void (__fastcall **)(struct cocos2d::CCParticleSystemQuad *))(*(_QWORD *)v139 + 32LL))(v139);
--v148;
}
while ( v148 );
sub_14003D310((__int64)&v169);
sub_14003D310((__int64)&v172);
sub_14003D310((__int64)&v166[1]);
goto LABEL_71;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v115 + 8LL))(v115, 1);
}
v115 = nullptr;
goto LABEL_57;
}
for ( j = 0; j < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 552)); ++j )
{
v11 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 552), j);
LOBYTE(v12) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v11 + 336LL))(v11, v12);
}
for ( k = 0; k < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 544)); ++k )
{
v14 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 544), k);
LOBYTE(v15) = 1;
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(*(_QWORD *)v14 + 336LL))(v14, v15);
}
v16 = (float)(*(_DWORD *)(*(_QWORD *)(a1 + 424) + 932LL) - *(_DWORD *)(*(_QWORD *)(a1 + 424) + 928LL)) / 100.0;
v17 = *(float *)(a1 + 480);
if ( (float)(v17 * v16) <= v17 )
v17 = v17 * v16;
v18 = *(float **)(a1 + 488);
v19 = *(_QWORD *)v18;
v20 = (__int64 *)v18;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v157, 0.0, 0.0, v17, v18[109]);
(*(void (__fastcall **)(__int64 *, __int64))(v19 + 992))(v20, v21);
v22 = *(float **)(a1 + 496);
v23 = *(_QWORD *)v22;
v24 = (__int64 *)v22;
cocos2d::CCRect::CCRect(
(cocos2d::CCRect *)v157,
0.0,
0.0,
fminf(*(float *)(a1 + 480), (float)((float)*(int *)(*(_QWORD *)(a1 + 424) + 960LL) / 100.0) * *(float *)(a1 + 480)),
v22[109]);
(*(void (__fastcall **)(__int64 *, __int64))(v23 + 992))(v24, v25);
v26 = cocos2d::CCString::createWithFormat(
"%i%%",
*(_DWORD *)(*(_QWORD *)(a1 + 424) + 932LL) - *(_DWORD *)(*(_QWORD *)(a1 + 424) + 928LL));
CString = cocos2d::CCString::getCString(v26);
(**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 448) + 360LL))(
*(_QWORD *)(a1 + 448) + 360LL,
CString);
v28 = cocos2d::CCString::createWithFormat("%i%%", *(_DWORD *)(*(_QWORD *)(a1 + 424) + 960LL));
v29 = cocos2d::CCString::getCString(v28);
(**(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 456) + 360LL))(*(_QWORD *)(a1 + 456) + 360LL, v29);
v30 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v163 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v163);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v30 = qword_14090BFE0;
}
LODWORD(v166[0]) = GameStatsManager::getStat(v30, &word_14070D038);
LODWORD(v163) = *(_DWORD *)(*(_QWORD *)(a1 + 424) + 1188LL);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 464) + 160LL))(*(_QWORD *)(a1 + 464));
sub_14003F4F0((__int64)&v166[1], *(_QWORD *)(a1 + 424) + 344LL);
v31 = &v166[1];
if ( v168 > 0xF )
v31 = (_QWORD *)v166[1];
(**(void (__fastcall ***)(__int64, _QWORD *))(*(_QWORD *)(a1 + 464) + 360LL))(*(_QWORD *)(a1 + 464) + 360LL, v31);
sub_14003D310((__int64)&v166[1]);
if ( *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 464) + 320LL))(*(_QWORD *)(a1 + 464)) > 250.0 )
{
v32 = *(__int64 **)(a1 + 464);
v33 = *v32;
(*(__int64 (__fastcall **)(__int64 *))(*v32 + 320))(v32);
(*(void (__fastcall **)(_QWORD))(v33 + 160))(*(_QWORD *)(a1 + 464));
}
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 464) + 168LL))(*(_QWORD *)(a1 + 464));
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 464) + 160LL))(*(_QWORD *)(a1 + 464));
v34 = *(_DWORD *)(*(_QWORD *)(a1 + 424) + 672LL);
v35 = 1;
if ( v34 <= 1 )
{
v36 = 1;
}
else
{
v36 = 6;
if ( v34 < 6 )
v36 = *(_DWORD *)(*(_QWORD *)(a1 + 424) + 672LL);
}
v37 = cocos2d::CCString::createWithFormat("diffIcon_%02d_btn_001.png", v36);
v38 = cocos2d::CCString::getCString(v37);
v39 = *(_QWORD **)(a1 + 504);
v40 = *v39;
v41 = v39;
v43 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v39, v42);
v44 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v43, v38);
(*(void (__fastcall **)(_QWORD *, struct cocos2d::CCSpriteFrame *))(v40 + 1008))(v41, v44);
v45 = *(float **)(a1 + 504);
v46 = (*(double (__fastcall **)(float *))(*(_QWORD *)v45 + 168LL))(v45);
v47 = *(float *)&v46 * v45[108];
v48 = *(float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 464) + 320LL))(*(_QWORD *)(a1 + 464));
*(float *)&v46 = (*(float (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 464) + 168LL))(*(_QWORD *)(a1 + 464));
v49 = **(_QWORD **)(a1 + 504);
v50 = *(_QWORD *)(a1 + 504);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v157,
(float)((float)(*(float *)(a1 + 520) * 0.5)
- (float)((float)((float)((float)((float)(*(float *)&v46 * v48) + 5.0) + (float)(v47 * 0.5)) + 30.0) * 0.5))
+ (float)(v47 * 0.5),
(float)(*(float *)(a1 + 524) * 0.5) + 3.0);
(*(void (__fastcall **)(__int64, __int64))(v49 + 184))(v50, v51);
v52 = **(_QWORD **)(a1 + 464);
v53 = (float)(*(float *)(a1 + 524) * 0.5) + 3.0;
v54 = (float *)(*(__int64 (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 504) + 200LL))(*(_QWORD *)(a1 + 504));
v55 = *(_QWORD *)(a1 + 464);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, *v54 + 30.0, v53);
(*(void (__fastcall **)(__int64, __int64))(v52 + 184))(v55, v56);
v57 = *(void (__fastcall ***)(__int64, const char *))(*(_QWORD *)(a1 + 472) + 360LL);
v58 = *(_QWORD *)(a1 + 472);
v59 = cocos2d::CCString::createWithFormat(
(const char *)&word_1406ED6F8,
(unsigned int)(*(_DWORD *)(*(_QWORD *)(a1 + 424) + 1020LL) - *(_DWORD *)(*(_QWORD *)(a1 + 424) + 1024LL)));
v60 = cocos2d::CCString::getCString(v59);
(*v57)(v58 + 360, v60);
v61 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v157[0] = (__int64)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v157[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v61 = qword_14090BFE0;
}
hasCompletedStarLevel = GameStatsManager::hasCompletedStarLevel(v61, *(_QWORD *)(a1 + 424));
v63 = (void (__fastcall ***)(_QWORD, __int16 *))(*(_QWORD *)(a1 + 472) + 368LL);
if ( hasCompletedStarLevel )
{
v155 = -1;
v156 = 50;
v64 = &v155;
}
else
{
v64 = &word_140703BD0;
}
(**v63)(v63, v64);
do
{
v65 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v157[0] = (__int64)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v157[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v65 = qword_14090BFE0;
}
CoinKey = GJGameLevel::getCoinKey(
*(_QWORD *)(a1 + 424),
v35,
*(_DWORD *)(*(_QWORD *)(a1 + 424) + 992LL) - *(_DWORD *)(*(_QWORD *)(a1 + 424) + 996LL));
hasSecretCoin = GameStatsManager::hasSecretCoin(v65, CoinKey);
v70 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 528), v35 - 1);
v71 = *(_QWORD *)v70;
v72 = "GJ_coinsIcon_001.png";
if ( !hasSecretCoin )
v72 = "GJ_coinsIcon_gray_001.png";
v73 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v69, v68);
v74 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v73, v72);
(*(void (__fastcall **)(struct cocos2d::CCObject *, struct cocos2d::CCSpriteFrame *))(v71 + 1008))(v70, v74);
if ( hasSecretCoin )
{
v158 = -1;
v159 = -1;
v75 = &v158;
}
else
{
v160 = -7711;
v161 = -7711;
v162 = -31;
v75 = &v161;
}
(**((void (__fastcall ***)(__int64, __int16 *))v70 + 40))((__int64)v70 + 320, v75);
++v35;
}
while ( v35 <= 3 );
v76 = v166[0];
v77 = (int)v163;
v78 = 0;
if ( (int)v163 <= SLODWORD(v166[0]) )
{
v94 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v157[0] = (__int64)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v157[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v94 = qword_14090BFE0;
}
BaseCurrencyForLevel = GameStatsManager::getBaseCurrencyForLevel(v94, *(_DWORD **)(a1 + 424));
v96 = *(_QWORD *)(a1 + 424);
v97 = (_QWORD *)qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v157[0] = (__int64)operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v157[0]);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v97 = (_QWORD *)qword_14090BFE0;
}
AwardedCurrencyForLevel = GameStatsManager::getAwardedCurrencyForLevel(
v97,
v96,
*(_DWORD *)(v96 + 992) - *(_DWORD *)(v96 + 996));
v83 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)&xmmword_14071BE38);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 440) + 464LL))(
*(_QWORD *)(a1 + 440),
v83);
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v83 + 160LL))(v83);
v99 = cocos2d::CCString::createWithFormat(
"%i/%i",
AwardedCurrencyForLevel,
(int)(float)((float)BaseCurrencyForLevel * 0.25) + BaseCurrencyForLevel);
v100 = cocos2d::CCString::getCString(v99);
v88 = cocos2d::CCLabelBMFont::create(v100, (const char *)&qword_140704F78);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 440) + 464LL))(
*(_QWORD *)(a1 + 440),
v88);
v101 = *(_QWORD *)v88;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, 0.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v101 + 288))(v88, v102);
v103 = *(_QWORD *)v88;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, 8.0, 12.0);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v103 + 184))(v88, v104);
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v88 + 160LL))(v88);
v105 = *(_QWORD *)v83;
v106 = *(float *)((*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v88 + 200LL))(v88) + 4) - 0.5;
v107 = *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v88 + 320LL))(v88);
v108 = (*(double (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v88 + 168LL))(v88);
v109 = (float)((float)(*(float *)&v108 * v107)
+ *(float *)(*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v88 + 200LL))(v88))
+ 9.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, v109, v106);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v105 + 184))(v83, v110);
}
else
{
if ( cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 544)) )
{
do
{
v79 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 544), v78);
(*(void (__fastcall **)(struct cocos2d::CCObject *, _QWORD))(*(_QWORD *)v79 + 336LL))(v79, 0);
++v78;
}
while ( v78 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 544)) );
}
v80 = cocos2d::CCSprite::createWithSpriteFrameName("GJLargeLock_001.png");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *))(**(_QWORD **)(a1 + 440) + 464LL))(
*(_QWORD *)(a1 + 440),
v80);
v81 = *(_QWORD *)v80;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, *(float *)(a1 + 520) * 0.5, *(float *)(a1 + 524) * 0.5);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v81 + 184))(v80, v82);
v83 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_coinsIcon_001.png");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 440) + 464LL))(
*(_QWORD *)(a1 + 440),
v83);
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v83 + 160LL))(v83);
v84 = *(_QWORD *)v83;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, *(float *)(a1 + 520) - 15.0, 15.0);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v84 + 184))(v83, v85);
v86 = cocos2d::CCString::createWithFormat("%i/%i", v76, v77);
v87 = cocos2d::CCString::getCString(v86);
v88 = cocos2d::CCLabelBMFont::create(v87, (const char *)&qword_140704F78);
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCObject *))(**(_QWORD **)(a1 + 440) + 464LL))(
*(_QWORD *)(a1 + 440),
v88);
v89 = *(_QWORD *)v88;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, 1.0, 0.5);
(*(void (__fastcall **)(struct cocos2d::CCObject *, __int64))(v89 + 288))(v88, v90);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v157, -15.0, 0.5);
v92 = v91;
v93 = (*(__int64 (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v83 + 200LL))(v83);
cocos2d::CCPoint::operator+(v93, &v163, v92);
(*(void (__fastcall **)(struct cocos2d::CCObject *, void **))(*(_QWORD *)v88 + 184LL))(v88, &v163);
(*(void (__fastcall **)(struct cocos2d::CCObject *))(*(_QWORD *)v88 + 160LL))(v88);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 536), v80);
}
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 536), v83);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(a1 + 536), v88);
LABEL_71:
v153 = *(_QWORD *)(a1 + 560);
if ( v153 )
{
v154 = (unsigned int)(*(_DWORD *)(*(_QWORD *)(a1 + 424) + 328LL) - *(_DWORD *)(*(_QWORD *)(a1 + 424) + 332LL));
LOBYTE(v154) = (_DWORD)v154 == -1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v153 + 336LL))(v153, v154);
}
*(_BYTE *)(a1 + 416) = 0;
}