// // RewardsPage::init from 0x61740c to 0x617d6c (2400 bytes) // // 1 xrefs: // > RewardsPage::create @ 0x616c48 // // 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:54:57 +0000 // int __fastcall RewardsPage::init(RewardsPage *this) { int v2; // r6 cocos2d::CCDirector *v3; // r0 cocos2d::CCLayer *WinSize; // r0 int v5; // r0 int v6; // r3 int v7; // r4 void (__fastcall *v8)(int, _DWORD *); // r8 void (__fastcall *v9)(int, _DWORD *); // r8 const char *v10; // r1 int v11; // r4 void (__fastcall *v12)(int, _DWORD *); // r8 const char *v13; // r1 cocos2d::CCSprite *v14; // r4 float v15; // s15 float v16; // s14 void (__fastcall *v17)(cocos2d::CCSprite *, _DWORD *); // r9 int v18; // r0 cocos2d::CCMenu *v19; // r6 const cocos2d::CCPoint *v20; // r0 float v21; // s14 float v22; // s13 const cocos2d::CCPoint *v23; // r9 int (__fastcall *v24)(cocos2d::CCMenu *, _DWORD *); // r8 GameStatsManager *v25; // r0 int v26; // r6 GameStatsManager *isSpecialChestUnlocked; // r0 GameStatsManager *v28; // r6 int v29; // r0 int v30; // r8 GameStatsManager *v31; // r0 GameStatsManager *v32; // r4 int v33; // r0 int v34; // r8 GameStatsManager *v35; // r0 int v36; // r0 int v37; // r8 GameStatsManager *v38; // r0 int v39; // r0 int v40; // r8 GameStatsManager *v41; // r0 int v42; // r4 GameStatsManager *v43; // r0 int v44; // r8 int v45; // r8 GameStatsManager *v46; // r10 GameStatsManager *v47; // r3 GameManager *v48; // r0 GameManager *v49; // r0 const char *v50; // r1 const char *v51; // r2 int v52; // r0 int v53; // r11 void (__fastcall *v54)(int, _DWORD *); // r10 const char *v55; // r2 int v56; // r0 int v57; // r7 void (__fastcall *v58)(int, _DWORD *); // r8 int v59; // r2 cocos2d::CCSprite *RewardFrame; // r0 const char *v61; // r1 int v62; // r0 int v63; // r8 int v64; // r0 int v65; // r9 int v66; // r9 const cocos2d::CCPoint *v67; // r6 int v68; // r2 cocos2d::CCSprite *v69; // r0 const char *v70; // r1 int v71; // r10 float v72; // s15 int v73; // r0 int v74; // r7 int v75; // r7 const cocos2d::CCPoint *v76; // r10 const cocos2d::CCPoint *v77; // r9 int (__fastcall *v78)(int, _DWORD *); // r4 GameLevelManager *v79; // r0 GameStatsManager *v80; // r0 cocos2d::CCDictionary **v81; // r0 GameLevelManager *v82; // r0 GameLevelManager *v83; // r0 int v85; // r0 cocos2d::CCNode *v86; // r8 int v87; // r6 const cocos2d::CCPoint *v88; // r10 void (__fastcall *v89)(int, _DWORD *); // r9 float v90; // r2 cocos2d::CCEaseInOut *v91; // r0 float v92; // r2 cocos2d::CCSequence *v93; // r6 float v94; // r2 cocos2d::CCEaseInOut *v95; // r0 float v96; // r2 cocos2d::CCFiniteTimeAction *v97; // r0 cocos2d::CCRepeatForever *v98; // r0 cocos2d::CCActionInterval *v99; // r1 cocos2d::CCAction *v100; // r0 cocos2d::CCPoint *v101; // [sp+10h] [bp-ACh] int v102; // [sp+14h] [bp-A8h] cocos2d::CCPoint *v103; // [sp+1Ch] [bp-A0h] float v104; // [sp+20h] [bp-9Ch] BYREF float v105; // [sp+24h] [bp-98h] _BYTE v106[8]; // [sp+28h] [bp-94h] BYREF _BYTE v107[8]; // [sp+30h] [bp-8Ch] BYREF _BYTE v108[8]; // [sp+38h] [bp-84h] BYREF _BYTE v109[8]; // [sp+40h] [bp-7Ch] BYREF int (__fastcall *v110)(RewardsPage *, cocos2d::CCObject *); // [sp+48h] [bp-74h] int v111; // [sp+4Ch] [bp-70h] int (__fastcall *v112)(RewardsPage *, cocos2d::CCObject *); // [sp+50h] [bp-6Ch] int v113; // [sp+54h] [bp-68h] _DWORD (*v114)(RewardsPage *__hidden, cocos2d::CCObject *); // [sp+58h] [bp-64h] int v115; // [sp+5Ch] [bp-60h] _DWORD v116[2]; // [sp+60h] [bp-5Ch] BYREF int v117[3]; // [sp+68h] [bp-54h] BYREF int v118[3]; // [sp+74h] [bp-48h] BYREF int v119[3]; // [sp+80h] [bp-3Ch] BYREF int v120[3]; // [sp+8Ch] [bp-30h] BYREF int v121[3]; // [sp+98h] [bp-24h] BYREF int v122[3]; // [sp+A4h] [bp-18h] BYREF int v123; // [sp+B0h] [bp-Ch] BYREF int v124; // [sp+B4h] [bp-8h] int v125; // [sp+B8h] [bp-4h] _DWORD v126[4]; // [sp+BCh] [bp+0h] BYREF v2 = 0; FLAlertLayer::incrementForcePrio(this); v126[0] = -1778384896; v102 = cocos2d::CCLayerColor::initWithColor(this, v126); if ( !v102 ) return v102; (*(void (__fastcall **)(RewardsPage *, int))(*(_DWORD *)this + 500))(this, 1); v3 = (cocos2d::CCDirector *)(*(int (__fastcall **)(RewardsPage *, int))(*(_DWORD *)this + 536))(this, 1); cocos2d::CCDirector::sharedDirector(v3); WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v104); v5 = cocos2d::CCLayer::create(WinSize); v6 = *(_DWORD *)this; *((_DWORD *)this + 115) = v5; (*(void (__fastcall **)(RewardsPage *, int))(v6 + 228))(this, v5); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v126, 0.0, 0.0, 80.0, 80.0); v7 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v126); (*(void (__fastcall **)(int, int))(*(_DWORD *)v7 + 456))(v7, 255); v8 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v126, 340.0, 220.0); v8(v7, v126); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v7, -1); v9 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v7 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v126, v104 * 0.5, v105 * 0.5); v9(v7, v126); v11 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"rewardsLabel_001.png", v10); (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v11, 20); v12 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v11 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v126, v104 * 0.5, (float)((float)(v105 * 0.5) + 110.0) - 32.0); v12(v11, v126); do { v14 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"rewardCorner_001.png", v13); (*(void (__fastcall **)(_DWORD, cocos2d::CCSprite *, int))(**((_DWORD **)this + 115) + 232))( *((_DWORD *)this + 115), v14, 8); switch ( v2 ) { case 2: cocos2d::CCSprite::setFlipX(v14, 1); cocos2d::CCSprite::setFlipY(v14, 1); v15 = 85.0; LABEL_9: v16 = 145.0; goto LABEL_12; case 3: cocos2d::CCSprite::setFlipX(v14, 1); v15 = -85.0; goto LABEL_9; case 1: cocos2d::CCSprite::setFlipY(v14, 1); v15 = 85.0; break; default: v15 = -85.0; break; } v16 = -145.0; LABEL_12: ++v2; v17 = *(void (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v14 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v126, v16 + (float)(v104 * 0.5), v15 + (float)(v105 * 0.5)); v17(v14, v126); } while ( v2 != 4 ); *((_DWORD *)this + 125) = -1; v18 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v13); v111 = 0; v110 = RewardsPage::onClose; v19 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v18, 0, (int)this, (int)RewardsPage::onClose, 0); CCMenuItemSpriteExtra::setSizeMult((int)v19, 1.6); v20 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v19, nullptr); v21 = (float)(v104 * 0.5) - 170.0; v22 = (float)(v105 * 0.5) + 110.0; *((_DWORD *)this + 111) = v20; v23 = v20; v24 = *(int (__fastcall **)(cocos2d::CCMenu *, _DWORD *))(*(_DWORD *)v19 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v116, v21 + 10.0, v22 - 10.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v126, v23); v25 = (GameStatsManager *)v24(v19, v126); v26 = GameStatsManager::sharedState(v25); memset(v117, 0, sizeof(v117)); std::string::__init(v117, "0007", 4u); isSpecialChestUnlocked = (GameStatsManager *)GameStatsManager::isSpecialChestUnlocked(v26, (int)v117); v28 = isSpecialChestUnlocked; if ( !isSpecialChestUnlocked ) { v46 = nullptr; v32 = nullptr; LABEL_45: v45 = 1; goto LABEL_26; } v29 = GameStatsManager::sharedState(isSpecialChestUnlocked); memset(v118, 0, sizeof(v118)); v30 = v29; std::string::__init(v118, "0008", 4u); v31 = (GameStatsManager *)GameStatsManager::isSpecialChestUnlocked(v30, (int)v118); v32 = v31; if ( !v31 ) { v46 = nullptr; goto LABEL_45; } v33 = GameStatsManager::sharedState(v31); memset(v119, 0, sizeof(v119)); v34 = v33; std::string::__init(v119, "0009", 4u); v35 = (GameStatsManager *)GameStatsManager::isSpecialChestUnlocked(v34, (int)v119); v28 = v35; if ( !v35 ) { v47 = nullptr; v46 = nullptr; LABEL_44: v28 = v32; LABEL_23: if ( v47 ) { v45 = 1; goto LABEL_25; } goto LABEL_45; } v36 = GameStatsManager::sharedState(v35); memset(v120, 0, sizeof(v120)); v37 = v36; std::string::__init(v120, "0010", 4u); v38 = (GameStatsManager *)GameStatsManager::isSpecialChestUnlocked(v37, (int)v120); v32 = v38; if ( !v38 ) { v47 = nullptr; v46 = v28; v32 = v28; goto LABEL_23; } v39 = GameStatsManager::sharedState(v38); memset(v121, 0, sizeof(v121)); v40 = v39; std::string::__init(v121, "0011", 4u); v41 = (GameStatsManager *)GameStatsManager::isSpecialChestUnlocked(v40, (int)v121); v28 = v41; if ( !v41 ) { v47 = v32; v46 = v32; goto LABEL_44; } v42 = GameStatsManager::sharedState(v41); memset(v122, 0, sizeof(v122)); std::string::__init(v122, "0024", 4u); v43 = (GameStatsManager *)GameStatsManager::isSpecialChestUnlocked(v42, (int)v122); if ( v43 ) { v44 = GameStatsManager::sharedState(v43); v123 = 0; v124 = 0; v125 = 0; std::string::__init(&v123, "0025", 4u); v45 = (unsigned __int8)GameStatsManager::isSpecialChestUnlocked(v44, (int)&v123) ^ 1; std::string::~string((int)&v123); } else { v45 = 1; } v32 = v28; std::string::~string((int)v122); v46 = v28; LABEL_25: std::string::~string((int)v121); LABEL_26: if ( v46 ) std::string::~string((int)v120); if ( v32 ) std::string::~string((int)v119); if ( v28 ) std::string::~string((int)v118); v48 = (GameManager *)std::string::~string((int)v117); v49 = (GameManager *)GameManager::sharedState(v48); if ( !GameManager::safeModeEnabled(v49) && v45 ) { v85 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_freeChestBtn_001.png", v50); v113 = 0; v112 = RewardsPage::onFreeStuff; v86 = (cocos2d::CCNode *)v85; v87 = CCMenuItemSpriteExtra::create(v85, 0, (int)this, (int)RewardsPage::onFreeStuff, 0); CCMenuItemSpriteExtra::setSizeMult(v87, 1.6); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v87); v88 = *((const cocos2d::CCPoint **)this + 111); v89 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v87 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v116, (float)((float)(v104 * 0.5) + 170.0) - 10.0, (float)((float)(v105 * 0.5) + 110.0) - 10.0); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v126, v88); v89(v87, v126); v91 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3F000000, 1.1, v90); v93 = (cocos2d::CCSequence *)cocos2d::CCEaseInOut::create(v91, (cocos2d::CCActionInterval *)0x40000000, v92); v95 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create((cocos2d::CCScaleTo *)0x3F000000, 1.0, v94); v97 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create(v95, (cocos2d::CCActionInterval *)0x40000000, v96); v98 = (cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v93, v97, 0); v100 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v98, v99); cocos2d::CCNode::runAction(v86, v100); } (*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))( *((_DWORD *)this + 115), *((_DWORD *)this + 111), 10); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v106, v104 * 0.5, (float)(v105 * 0.5) - 24.0); v52 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"00:00:00", "bigFont.fnt", v51); *((_DWORD *)this + 132) = v52; (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v52, 20); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 132) + 80))(*((_DWORD *)this + 132), 1056964608); v53 = *((_DWORD *)this + 132); v54 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v53 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v116, -70.0, -50.0); cocos2d::CCPoint::operator+(v126, v106, v116); v54(v53, v126); v56 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"00:00:00", "bigFont.fnt", v55); *((_DWORD *)this + 133) = v56; (*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v56, 20); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 133) + 80))(*((_DWORD *)this + 133), 1056964608); v57 = *((_DWORD *)this + 133); v58 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v57 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v116, 70.0, -50.0); cocos2d::CCPoint::operator+(v126, v106, v116); v58(v57, v126); RewardFrame = (cocos2d::CCSprite *)RewardsPage::getRewardFrame((RewardsPage *)((char *)&dword_0 + 2), 1, v59); v62 = cocos2d::CCSprite::createWithSpriteFrameName(RewardFrame, v61); v115 = 0; v114 = RewardsPage::onReward; v63 = v62; v64 = CCMenuItemSpriteExtra::create(v62, 0, (int)this, (int)RewardsPage::onReward, 0); v123 = 0; v124 = 0; v125 = 0; v65 = v64; *((_DWORD *)this + 135) = v64; std::string::__init(&v123, "chestClick.ogg", 0xEu); std::string::operator=((unsigned __int8 *)(v65 + 340), (unsigned __int8 *)&v123); std::string::~string((int)&v123); (*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 135) + 36))(*((_DWORD *)this + 135), 2); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))( *((_DWORD *)this + 111), *((_DWORD *)this + 135)); v66 = *((_DWORD *)this + 135); v67 = *((const cocos2d::CCPoint **)this + 115); v101 = *(cocos2d::CCPoint **)(*(_DWORD *)v66 + 92); v103 = *((cocos2d::CCPoint **)this + 111); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v108, 70.0, 14.0); cocos2d::CCPoint::operator+(v109, v106, v108); cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v116, v67); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v126, v103); ((void (__fastcall *)(int, _DWORD *))v101)(v66, v126); *(_DWORD *)(*((_DWORD *)this + 135) + 312) = 1066024305; v69 = (cocos2d::CCSprite *)RewardsPage::getRewardFrame((RewardsPage *)((char *)&dword_0 + 1), (int)&dword_0 + 1, v68); v71 = cocos2d::CCSprite::createWithSpriteFrameName(v69, v70); v72 = *(float *)((*(int (__fastcall **)(int))(*(_DWORD *)v63 + 164))(v63) + 4); v116[0] = RewardsPage::onReward; v116[1] = 0; v73 = CCMenuItemSpriteExtra::create(v71, 0, (int)this, (int)RewardsPage::onReward, 0); *((_DWORD *)this + 134) = v73; (*(void (__fastcall **)(int, int))(*(_DWORD *)v73 + 36))(v73, 1); v74 = *((_DWORD *)this + 134); v123 = 0; v124 = 0; v125 = 0; std::string::__init(&v123, "chestClick.ogg", 0xEu); std::string::operator=((unsigned __int8 *)(v74 + 340), (unsigned __int8 *)&v123); std::string::~string((int)&v123); (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))( *((_DWORD *)this + 111), *((_DWORD *)this + 134)); v75 = *((_DWORD *)this + 134); v76 = *((const cocos2d::CCPoint **)this + 115); v77 = *((const cocos2d::CCPoint **)this + 111); v78 = *(int (__fastcall **)(int, _DWORD *))(*(_DWORD *)v75 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v107, -70.0, 14.0 - (float)((float)(v72 * 0.2) * 0.5)); cocos2d::CCPoint::operator+(v108, v106, v107); cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v109, v76); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v126, v77); v79 = (GameLevelManager *)v78(v75, v126); *(_DWORD *)(*((_DWORD *)this + 134) + 312) = 1066024305; v80 = (GameStatsManager *)GameLevelManager::sharedState(v79); *((_DWORD *)v80 + 228) = (char *)this + 524; v81 = (cocos2d::CCDictionary **)GameStatsManager::sharedState(v80); if ( GameStatsManager::areRewardsLoaded(v81) ) { RewardsPage::updateTimers((int **)this, 0.0); } else { (*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 132) + 172))(*((_DWORD *)this + 132), 0); v82 = (GameLevelManager *)(*(int (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 133) + 172))( *((_DWORD *)this + 133), 0); v83 = (GameLevelManager *)GameLevelManager::sharedState(v82); GameLevelManager::getGJRewards(v83, nullptr); } v126[0] = RewardsPage::updateTimers; v126[1] = 0; cocos2d::CCNode::schedule(this, RewardsPage::updateTimers, 0, 1065353216); return v102; }
GD Web Decomp Icon

GD Web Decomp

Raw Source