//
// LevelPage::updateDynamicPage from 0x514108 to 0x514c80 (2936 bytes)
//
// 1 xrefs:
// > LevelSelectLayer::updatePageWithObject @ 0x514cc4
//
// 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:51:36 +0000
//
int __fastcall LevelPage::updateDynamicPage(int this, GJGameLevel *a2)
{
int v3; // r4
unsigned int i; // r5
bool v5; // cf
cocos2d::CCArray *v6; // r0
unsigned int v7; // r1
int v8; // r0
unsigned int v9; // r5
cocos2d::CCDirector *v10; // r0
int v11; // r3
int v12; // r0
unsigned int j; // r5
int v14; // r0
float v15; // s17
float v16; // s15
bool v17; // fzf
bool v18; // fnf
float v19; // s17
float *v20; // r6
void (__fastcall *v21)(float *, _DWORD *); // r7
float v22; // s14
float *v23; // r6
void (__fastcall *v24)(float *, _DWORD *); // r7
float v25; // r3
const char *NormalPercent; // r0
cocos2d::CCString *v27; // r0
int CString; // r0
cocos2d::CCString *v29; // r0
int v30; // r0
GameStatsManager *v31; // r0
GameStatsManager *v32; // r0
const char *Stat; // r0
int v34; // r8
const char *v35; // r9
int v36; // r10
void (__fastcall *v37)(int, char *); // r7
int v38; // r3
int *v39; // r3
int v40; // r1
int v41; // r2
char *v42; // r1
int v43; // r6
void (__fastcall *v44)(int, _DWORD); // r7
float *v45; // r0
int v46; // r6
void (__fastcall *v47)(int, int); // r7
int v48; // r1
const char *v49; // r1
cocos2d::CCString *v50; // r0
cocos2d::CCSpriteFrameCache *v51; // r0
int v52; // r6
void (__fastcall *v53)(int, int); // r7
const char *v54; // r10
cocos2d::CCSpriteFrameCache *v55; // r0
int v56; // r0
float *v57; // r0
float v58; // s17
float v59; // s15
float v60; // s18
float v61; // r0
int v62; // r6
void (__fastcall *v63)(int, _DWORD *); // r7
int v64; // r6
void (__fastcall *v65)(int, _DWORD *); // r7
float *v66; // r0
int v67; // r6
int (__fastcall *v68)(int, int); // r7
cocos2d::CCString *v69; // r0
int v70; // r0
GameStatsManager *v71; // r0
GameStatsManager *v72; // r0
int hasCompletedStarLevel; // r0
int v74; // r2
int (__fastcall *v75)(int, _DWORD *); // r6
int v76; // r0
GameStatsManager *v77; // r0
int k; // r6
GameStatsManager *v79; // r7
const char *CoinKey; // r0
const char *v81; // r12
cocos2d::CCSpriteFrameCache *v82; // r7
cocos2d::CCSpriteFrameCache *v83; // r0
int v84; // r0
int (__fastcall *v85)(cocos2d::CCSpriteFrameCache *, _DWORD *); // r2
unsigned int m; // r6
const char *v87; // r1
int v88; // r0
cocos2d::CCObject *v89; // r10
void (__fastcall *v90)(cocos2d::CCObject *, _DWORD *); // r6
const char *v91; // r1
cocos2d::CCObject *v92; // r7
void (__fastcall *v93)(cocos2d::CCObject *, _DWORD *); // r6
cocos2d::CCString *v94; // r0
cocos2d::CCLabelBMFont *v95; // r0
const char *v96; // r2
cocos2d::CCObject *v97; // r6
void (__fastcall *v98)(cocos2d::CCObject *, _DWORD *); // r8
void (__fastcall *v99)(cocos2d::CCObject *, _DWORD *); // r9
int v100; // r11
GameStatsManager *v101; // r0
GameStatsManager *BaseCurrencyForLevel; // r6
GameStatsManager *v103; // r0
const char *AwardedCurrencyForLevel; // r8
const char *v105; // r1
cocos2d::CCString *v106; // r0
cocos2d::CCLabelBMFont *v107; // r0
const char *v108; // r2
void (__fastcall *v109)(cocos2d::CCObject *, _DWORD *); // r8
void (__fastcall *v110)(cocos2d::CCObject *, _DWORD *); // r8
void (__fastcall *v111)(cocos2d::CCObject *, _DWORD *); // r8
float v112; // s17
float v113; // s19
float v114; // s18
int v115; // r0
const char *v116; // r1
int v117; // r0
int v118; // r0
cocos2d::CCNode *v119; // r5
cocos2d::CCMenu *v120; // r0
cocos2d::CCMenuItem *v121; // r1
cocos2d::CCObject *v122; // r8
void (__fastcall *v123)(cocos2d::CCObject *, _BYTE *); // r9
const char *v124; // r1
int v125; // r8
void (__fastcall *v126)(int, _BYTE *); // r9
float v127; // s17
int v128; // r0
const cocos2d::CCPoint *v129; // r2
cocos2d::CCEaseInOut *v130; // r0
float v131; // r2
cocos2d::CCSequence *v132; // r8
const cocos2d::CCPoint *v133; // r2
cocos2d::CCEaseInOut *v134; // r0
float v135; // r2
cocos2d::CCFiniteTimeAction *v136; // r0
cocos2d::CCRepeatForever *v137; // r0
cocos2d::CCActionInterval *v138; // r1
cocos2d::CCAction *v139; // r0
cocos2d::CCParticleSystem *v140; // r7
void (__fastcall *v141)(cocos2d::CCParticleSystem *, _BYTE *); // r8
float v142; // s17
int v143; // r0
cocos2d::CCParticleSystem *v144; // r8
void (__fastcall *v145)(cocos2d::CCParticleSystem *, _BYTE *); // r9
float v146; // s17
int v147; // r0
cocos2d::CCParticleSystem *v148; // r9
float v149; // s17
int v150; // r0
int v151; // r5
const char *v152; // r2
int v153; // r0
cocos2d::CCObject *v154; // r5
void (__fastcall *v155)(cocos2d::CCObject *, _DWORD *); // r7
void (__fastcall *v156)(cocos2d::CCSpriteFrameCache *, int); // [sp+10h] [bp-5Ch]
void (__fastcall *v157)(cocos2d::CCParticleSystem *, _BYTE *); // [sp+10h] [bp-5Ch]
char *v158; // [sp+18h] [bp-54h]
int hasSecretCoin; // [sp+1Ch] [bp-50h]
float v160; // [sp+20h] [bp-4Ch] BYREF
float v161; // [sp+24h] [bp-48h]
_BYTE v162[8]; // [sp+28h] [bp-44h] BYREF
int v163[3]; // [sp+30h] [bp-3Ch] BYREF
int v164[3]; // [sp+3Ch] [bp-30h] BYREF
int v165; // [sp+48h] [bp-24h] BYREF
int v166; // [sp+4Ch] [bp-20h]
char *v167; // [sp+50h] [bp-1Ch]
_DWORD v168[4]; // [sp+54h] [bp-18h] BYREF
v3 = this;
if ( !*(_BYTE *)(this + 320) )
{
this = *(_DWORD *)(this + 324);
if ( this )
{
if ( *((_DWORD *)a2 + 67) - *((_DWORD *)a2 + 68) == *(_DWORD *)(this + 268) - *(_DWORD *)(this + 272) )
return this;
cocos2d::CCObject::release((cocos2d::CCObject *)this);
*(_DWORD *)(v3 + 324) = 0;
}
for ( i = 0; ; ++i )
{
v5 = i >= cocos2d::CCArray::count(*(cocos2d::CCArray **)(v3 + 384));
v6 = *(cocos2d::CCArray **)(v3 + 384);
if ( v5 )
break;
v7 = i;
v8 = cocos2d::CCArray::objectAtIndex(v6, v7);
(*(void (__fastcall **)(int))(*(_DWORD *)v8 + 260))(v8);
}
cocos2d::CCArray::removeAllObjects(v6);
v9 = 0;
*(_DWORD *)(v3 + 400) = 0;
*(_DWORD *)(v3 + 324) = a2;
v10 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(a2);
cocos2d::CCDirector::sharedDirector(v10);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v160);
v11 = *(_DWORD *)(*(_DWORD *)(v3 + 324) + 268) - *(_DWORD *)(*(_DWORD *)(v3 + 324) + 272);
if ( v11 <= 0 )
{
if ( v11 == -2 )
{
while ( v9 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(v3 + 392)) )
{
v117 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v3 + 392), v9++);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v117 + 172))(v117, 0);
}
v118 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"theTowerDoor_001.png", v116);
v168[0] = LevelPage::onTheTower;
v168[1] = 0;
v119 = (cocos2d::CCNode *)v118;
v120 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v118, 0, v3, (int)LevelPage::onTheTower, 0);
v122 = (cocos2d::CCObject *)cocos2d::CCMenu::createWithItem(v120, v121);
(*(void (__fastcall **)(int, cocos2d::CCObject *))(*(_DWORD *)v3 + 228))(v3, v122);
v123 = *(void (__fastcall **)(cocos2d::CCObject *, _BYTE *))(*(_DWORD *)v122 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v162, v160 * 0.5, (float)(v161 * 0.5) - 5.0);
v123(v122, v162);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v3 + 384), v122);
v125 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"theTowerLabel_001.png", v124);
(*(void (__fastcall **)(cocos2d::CCNode *, int))(*(_DWORD *)v119 + 228))(v119, v125);
v126 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v125 + 92);
v127 = *(float *)(*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v119 + 164))(v119);
v128 = (*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v119 + 164))(v119);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v162, v127 * 0.5, *(float *)(v128 + 4) + 23.0);
v126(v125, v162);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v162, 0.0, 5.0);
v130 = (cocos2d::CCEaseInOut *)cocos2d::CCMoveBy::create(
(cocos2d::CCMoveBy *)0x40200000,
COERCE_FLOAT(v162),
v129);
v132 = (cocos2d::CCSequence *)cocos2d::CCEaseInOut::create(v130, (cocos2d::CCActionInterval *)0x3FE66666, v131);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v162, 0.0, -5.0);
v134 = (cocos2d::CCEaseInOut *)cocos2d::CCMoveBy::create(
(cocos2d::CCMoveBy *)0x40200000,
COERCE_FLOAT(v162),
v133);
v136 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create(
v134,
(cocos2d::CCActionInterval *)0x3FE66666,
v135);
v137 = (cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v132, v136, 0);
v139 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v137, v138);
cocos2d::CCNode::runAction(v119, v139);
memset(v163, 0, sizeof(v163));
std::string::__init(
v163,
"30a-1a2.2a0.48a11a90a180a29a0a11a0a0a0a0a0a0a0a5a1a0a0a0.0745098a0a0a0a0.611765a0a1a0a2a1a0a0a0a0a0.937255a0a1"
"a0a1a0a0.54a0a0.57a0a56a0a11a0a-25a17a1a2a1a0a0a1a0a0a0a0a0a0a0a0a0a0a0a0a0a0a0",
0xBDu);
v140 = (cocos2d::CCParticleSystem *)GameToolbox::particleFromString((unsigned __int8 *)v163, 0, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCParticleSystem *, int))(*(_DWORD *)v119 + 232))(
v119,
v140,
11);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v140 + 80))(v140, 1065353216);
cocos2d::CCParticleSystem::resetSystem(v140);
v141 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _BYTE *))(*(_DWORD *)v140 + 92);
v142 = *(float *)(*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v119 + 164))(v119);
v143 = (*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v119 + 164))(v119);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v162, v142 * 0.5, *(float *)(v143 + 4) * 0.5);
v141(v140, v162);
memset(v164, 0, sizeof(v164));
std::string::__init(
v164,
"20a-1a2a0.3a8a90a90a0a2a27a30a0a0a0a0a0a0a75a28a0a360a0a0a0.839216a0a1a0a0.05a0a0a0a0a0a0.184314a0a0a0a1a0a0.0"
"5a0a0.73a0a0.71a0a0a0a0a0a0a0a0a2a1a1a0a0a184a0a0a0a0a0a0a1a0a0a0a0a0a0a0",
0xB7u);
v144 = (cocos2d::CCParticleSystem *)GameToolbox::particleFromString((unsigned __int8 *)v164, 0, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCParticleSystem *, int))(*(_DWORD *)v119 + 232))(
v119,
v144,
11);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v144 + 80))(v144, 1065353216);
cocos2d::CCParticleSystem::resetSystem(v144);
v145 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _BYTE *))(*(_DWORD *)v144 + 92);
v146 = *(float *)(*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v119 + 164))(v119);
v147 = (*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v119 + 164))(v119);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v162, v146 * 0.5, *(float *)(v147 + 4) * 0.5);
v145(v144, v162);
v165 = 0;
v166 = 0;
v167 = nullptr;
std::string::__init(
&v165,
"3a-1a3a0.3a1a90a90a0a2a11a13a0a0a0a0a0a0a15a5a0a0a0a0a0.839216a0a1a0a0.15a0.16a0a0a0a0a0.184314a0a0a0a1a0a0.21"
"a0.07a1a0a1a0a0a0a0a0a0a0a0a2a1a1a0a0a34a0a0a0a0a0a0a1a0a0a0a0a0a0a0",
0xB2u);
v148 = (cocos2d::CCParticleSystem *)GameToolbox::particleFromString((unsigned __int8 *)&v165, 0, 0);
(*(void (__fastcall **)(cocos2d::CCNode *, cocos2d::CCParticleSystem *, int))(*(_DWORD *)v119 + 232))(
v119,
v148,
11);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v148 + 80))(v148, 1065353216);
cocos2d::CCParticleSystem::resetSystem(v148);
v157 = *(void (__fastcall **)(cocos2d::CCParticleSystem *, _BYTE *))(*(_DWORD *)v148 + 92);
v149 = *(float *)(*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v119 + 164))(v119);
v150 = (*(int (__fastcall **)(cocos2d::CCNode *))(*(_DWORD *)v119 + 164))(v119);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v162, v149 * 0.5, *(float *)(v150 + 4) * 0.5);
v157(v148, v162);
v151 = 20;
do
{
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v140 + 20))(v140, 1036831949);
(*(void (__fastcall **)(cocos2d::CCParticleSystem *, int))(*(_DWORD *)v144 + 20))(v144, 1036831949);
--v151;
}
while ( v151 );
std::string::~string((int)&v165);
std::string::~string((int)v164);
std::string::~string((int)v163);
}
else
{
while ( v9 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(v3 + 392)) )
{
v153 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v3 + 392), v9++);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v153 + 172))(v153, 0);
}
v154 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(
(cocos2d::CCLabelBMFont *)"Coming Soon!",
"bigFont.fnt",
v152);
(*(void (__fastcall **)(int, cocos2d::CCObject *))(*(_DWORD *)v3 + 228))(v3, v154);
v155 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v154 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v168, v160 * 0.5, (float)(v161 * 0.5) + 50.0);
v155(v154, v168);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v3 + 384), v154);
LevelPage::addSecretDoor((cocos2d::CCArray **)v3);
}
}
else
{
while ( v9 < cocos2d::CCArray::count(*(cocos2d::CCArray **)(v3 + 392)) )
{
v12 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v3 + 392), v9++);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v12 + 172))(v12, 1);
}
for ( j = 0; j < cocos2d::CCArray::count(*(cocos2d::CCArray **)(v3 + 388)); ++j )
{
v14 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v3 + 388), j);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v14 + 172))(v14, 1);
}
v15 = *(float *)(v3 + 352);
v16 = v15 * (float)((float)GJGameLevel::getNormalPercent(*(GJGameLevel **)(v3 + 324)) / 100.0);
v17 = v15 == v16;
v18 = v15 < v16;
v19 = *(float *)(v3 + 352);
if ( !v18 && !v17 )
v19 = v19 * (float)((float)GJGameLevel::getNormalPercent(*(GJGameLevel **)(v3 + 324)) / 100.0);
v20 = *(float **)(v3 + 356);
v21 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v20 + 568);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v168, 0.0, 0.0, v19, v20[87]);
v21(v20, v168);
v22 = *(float *)(v3 + 352);
v23 = *(float **)(v3 + 360);
v24 = *(void (__fastcall **)(float *, _DWORD *))(*(_DWORD *)v23 + 568);
if ( v22 > (float)(v22 * (float)((float)*(int *)(*(_DWORD *)(v3 + 324) + 712) / 100.0)) )
v25 = v22 * (float)((float)*(int *)(*(_DWORD *)(v3 + 324) + 712) / 100.0);
else
v25 = *(float *)(v3 + 352);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v168, 0.0, 0.0, v25, v23[87]);
v24(v23, v168);
NormalPercent = (const char *)GJGameLevel::getNormalPercent(*(GJGameLevel **)(v3 + 324));
v27 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i%%", NormalPercent);
CString = cocos2d::CCString::getCString(v27);
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v3 + 336) + 464))(*(_DWORD *)(v3 + 336), CString);
v29 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i%%",
*(const char **)(*(_DWORD *)(v3 + 324) + 712));
v30 = cocos2d::CCString::getCString(v29);
v31 = (GameStatsManager *)(*(int (__fastcall **)(_DWORD, int))(**(_DWORD **)(v3 + 340) + 464))(
*(_DWORD *)(v3 + 340),
v30);
v32 = (GameStatsManager *)GameStatsManager::sharedState(v31);
Stat = (const char *)GameStatsManager::getStat(v32, (const char *)&a1i2r3e45s789g[10]);
v34 = *(_DWORD *)(*(_DWORD *)(v3 + 324) + 920);
v35 = Stat;
(*(void (__fastcall **)(_DWORD, int))(**(_DWORD **)(v3 + 344) + 80))(*(_DWORD *)(v3 + 344), 1065353216);
v36 = *(_DWORD *)(v3 + 344);
v37 = *(void (__fastcall **)(int, char *))(*(_DWORD *)v36 + 464);
v38 = *(_DWORD *)(v3 + 324);
v165 = 0;
v166 = 0;
v167 = nullptr;
if ( (*(_BYTE *)(v38 + 280) & 1) != 0 )
{
std::string::__init(&v165, *(const void **)(v38 + 288), *(_DWORD *)(v38 + 284));
}
else
{
v39 = (int *)(v38 + 280);
v40 = v39[1];
v41 = v39[2];
v165 = *v39;
v166 = v40;
v167 = (char *)v41;
}
if ( (v165 & 1) != 0 )
v42 = v167;
else
v42 = (char *)&v165 + 1;
v37(v36, v42);
std::string::~string((int)&v165);
if ( *(float *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v3 + 344) + 164))(*(_DWORD *)(v3 + 344)) > 250.0 )
{
v43 = *(_DWORD *)(v3 + 344);
v44 = *(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v43 + 80);
v45 = (float *)(*(int (__fastcall **)(int))(*(_DWORD *)v43 + 164))(v43);
v44(v43, 250.0 / *v45);
}
v46 = *(_DWORD *)(v3 + 344);
v47 = *(void (__fastcall **)(int, int))(*(_DWORD *)v46 + 80);
if ( (*(float (__fastcall **)(int))(*(_DWORD *)v46 + 84))(v46) > 1.0 )
{
v48 = 1.0;
}
else
{
v46 = *(_DWORD *)(v3 + 344);
v48 = (*(int (__fastcall **)(int))(*(_DWORD *)v46 + 84))(v46);
}
v47(v46, v48);
v49 = *(const char **)(*(_DWORD *)(v3 + 324) + 428);
if ( (int)v49 <= 0 )
{
v49 = (char *)&dword_0 + 1;
}
else if ( (int)v49 >= 6 )
{
v49 = &byte_6;
}
v50 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"diffIcon_%02d_btn_001.png",
v49);
v51 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCString::getCString(v50);
v52 = *(_DWORD *)(v3 + 364);
v53 = *(void (__fastcall **)(int, int))(*(_DWORD *)v52 + 580);
v54 = (const char *)v51;
v55 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v51);
v56 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v55, v54);
v53(v52, v56);
v57 = *(float **)(v3 + 364);
v58 = v57[86];
v59 = COERCE_FLOAT((*(int (__fastcall **)(float *))(*(_DWORD *)v57 + 84))(v57));
v60 = *(float *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v3 + 344) + 164))(*(_DWORD *)(v3 + 344));
v61 = (*(float (__fastcall **)(_DWORD))(**(_DWORD **)(v3 + 344) + 84))(*(_DWORD *)(v3 + 344));
v62 = *(_DWORD *)(v3 + 364);
v63 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v62 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v168,
(float)((float)(*(float *)(v3 + 372) * 0.5)
- (float)((float)((float)((float)((float)(v58 * v59) * 0.5) + (float)((float)(v60 * v61) + 5.0)) + 30.0)
* 0.5))
+ (float)((float)(v58 * v59) * 0.5),
(float)(*(float *)(v3 + 376) * 0.5) + 3.0);
v63(v62, v168);
v64 = *(_DWORD *)(v3 + 344);
v65 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v64 + 92);
v66 = (float *)(*(int (__fastcall **)(_DWORD))(**(_DWORD **)(v3 + 364) + 96))(*(_DWORD *)(v3 + 364));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v168, *v66 + 30.0, (float)(*(float *)(v3 + 376) * 0.5) + 3.0);
v65(v64, v168);
v67 = *(_DWORD *)(v3 + 348);
v68 = *(int (__fastcall **)(int, int))(*(_DWORD *)v67 + 464);
v69 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)(*(_DWORD *)(*(_DWORD *)(v3 + 324) + 772)
- *(_DWORD *)(*(_DWORD *)(v3 + 324) + 776)));
v70 = cocos2d::CCString::getCString(v69);
v71 = (GameStatsManager *)v68(v67, v70);
v72 = (GameStatsManager *)GameStatsManager::sharedState(v71);
hasCompletedStarLevel = GameStatsManager::hasCompletedStarLevel(v72, *(GJGameLevel **)(v3 + 324));
v74 = **(_DWORD **)(v3 + 348);
if ( hasCompletedStarLevel )
{
v75 = *(int (__fastcall **)(int, _DWORD *))(v74 + 536);
v76 = *(_DWORD *)(v3 + 348);
LOWORD(v168[0]) = -1;
BYTE2(v168[0]) = 50;
v77 = (GameStatsManager *)v75(v76, v168);
}
else
{
v77 = (GameStatsManager *)(*(int (__fastcall **)(_DWORD, __int16 *))(v74 + 536))(
*(_DWORD *)(v3 + 348),
&word_BECC58);
}
for ( k = 1; k != 4; ++k )
{
v79 = (GameStatsManager *)GameStatsManager::sharedState(v77);
CoinKey = (const char *)GJGameLevel::getCoinKey(*(GJGameLevel **)(v3 + 324), k);
hasSecretCoin = GameStatsManager::hasSecretCoin(v79, CoinKey);
if ( hasSecretCoin )
v81 = "GJ_coinsIcon_001.png";
else
v81 = "GJ_coinsIcon_gray_001.png";
v158 = (char *)v81;
v82 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v3 + 380), k - 1);
v156 = *(void (__fastcall **)(cocos2d::CCSpriteFrameCache *, int))(*(_DWORD *)v82 + 580);
v83 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v82);
v84 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v83, v158);
v156(v82, v84);
v85 = *(int (__fastcall **)(cocos2d::CCSpriteFrameCache *, _DWORD *))(*(_DWORD *)v82 + 480);
if ( hasSecretCoin )
{
LOWORD(v168[0]) = -1;
BYTE2(v168[0]) = -1;
}
else
{
LOWORD(v168[0]) = -7711;
BYTE2(v168[0]) = -31;
}
v77 = (GameStatsManager *)v85(v82, v168);
}
if ( v34 <= (int)v35 )
{
v101 = (GameStatsManager *)GameStatsManager::sharedState(v77);
BaseCurrencyForLevel = (GameStatsManager *)GameStatsManager::getBaseCurrencyForLevel(
v101,
*(GJGameLevel **)(v3 + 324));
v103 = (GameStatsManager *)GameStatsManager::sharedState(BaseCurrencyForLevel);
AwardedCurrencyForLevel = (const char *)GameStatsManager::getAwardedCurrencyForLevel(
v103,
*(GJGameLevel **)(v3 + 324));
v92 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"currencyOrbIcon_001.png",
v105);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v3 + 332) + 228))(
*(_DWORD *)(v3 + 332),
v92);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v92 + 80))(v92, 1060320051);
v106 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i/%i",
AwardedCurrencyForLevel,
(char *)BaseCurrencyForLevel
+ (int)vcvts_n_f32_s32((unsigned int)BaseCurrencyForLevel, 2u));
v107 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v106);
v97 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v107, "bigFont.fnt", v108);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v3 + 332) + 228))(
*(_DWORD *)(v3 + 332),
v97);
v109 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v97 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v168, 0.0, 0.5);
v109(v97, v168);
v110 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v97 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v168, 8.0, 12.0);
v110(v97, v168);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v97 + 80))(v97, 1053609165);
v111 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v92 + 92);
v112 = *(float *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v97 + 96))(v97);
v113 = *(float *)(*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v97 + 164))(v97);
v114 = COERCE_FLOAT((*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v97 + 84))(v97));
v115 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v97 + 96))(v97);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v168,
(float)(v112 + (float)(v113 * v114)) + 9.0,
*(float *)(v115 + 4) - 0.5);
v111(v92, v168);
}
else
{
for ( m = 0; m < cocos2d::CCArray::count(*(cocos2d::CCArray **)(v3 + 388)); ++m )
{
v88 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(v3 + 388), m);
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v88 + 172))(v88, 0);
}
v89 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJLargeLock_001.png",
v87);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v3 + 332) + 228))(
*(_DWORD *)(v3 + 332),
v89);
v90 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v89 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v168, *(float *)(v3 + 372) * 0.5, *(float *)(v3 + 376) * 0.5);
v90(v89, v168);
v92 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_coinsIcon_001.png",
v91);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v3 + 332) + 228))(
*(_DWORD *)(v3 + 332),
v92);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v92 + 80))(v92, 1065353216);
v93 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v92 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v168, *(float *)(v3 + 372) - 15.0, 15.0);
v93(v92, v168);
v94 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i/%i", v35, v34);
v95 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v94);
v97 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v95, "bigFont.fnt", v96);
(*(void (__fastcall **)(_DWORD, cocos2d::CCObject *))(**(_DWORD **)(v3 + 332) + 228))(
*(_DWORD *)(v3 + 332),
v97);
v98 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v97 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v168, 1.0, 0.5);
v98(v97, v168);
v99 = *(void (__fastcall **)(cocos2d::CCObject *, _DWORD *))(*(_DWORD *)v97 + 92);
v100 = (*(int (__fastcall **)(cocos2d::CCObject *))(*(_DWORD *)v92 + 96))(v92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v162, -15.0, 0.5);
cocos2d::CCPoint::operator+(v168, v100, v162);
v99(v97, v168);
(*(void (__fastcall **)(cocos2d::CCObject *, int))(*(_DWORD *)v97 + 80))(v97, 1060320051);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v3 + 384), v89);
}
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v3 + 384), v92);
cocos2d::CCArray::addObject(*(cocos2d::CCArray **)(v3 + 384), v97);
}
this = *(_DWORD *)(v3 + 396);
if ( this )
this = (*(int (__fastcall **)(int, bool))(*(_DWORD *)this + 172))(
this,
*(_DWORD *)(*(_DWORD *)(v3 + 324) + 268) - *(_DWORD *)(*(_DWORD *)(v3 + 324) + 272) == -1);
*(_BYTE *)(v3 + 320) = 0;
}
return this;
}