// // RewardsPage::init from 0xa85ad0 to 0xa868fc (3628 bytes) // // 3 xrefs: // > RewardsPage::create @ 0xa86a94 // > @ 0x67510 // > @ 0x1498330 // // This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True! // // Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings // Generated at Fri, 27 Nov 2026 13:00:35 +0000 // __int64 __fastcall RewardsPage::init(cocos2d::CCNode **this) { unsigned __int8 v2; // w0 unsigned int v3; // w23 int v5; // w22 cocos2d::CCDirector *v6; // x0 cocos2d::CCDirector *v7; // x0 cocos2d::CCLayer *WinSize; // x0 __int64 v9; // x0 __int64 v10; // x24 void (__fastcall *v11)(__int64, __int64 *); // x25 void (__fastcall *v12)(__int64, __int64 *); // x25 const char *v13; // x1 __int64 v14; // x24 void (__fastcall *v15)(__int64, __int64 *); // x25 const char *v16; // x1 cocos2d::CCSprite *v17; // x24 void (__fastcall *v18)(cocos2d::CCSprite *, __int64 *); // x25 void (__fastcall *v19)(cocos2d::CCSprite *, __int64 *); // x22 __int64 v20; // x0 cocos2d::CCMenu *v21; // x24 __int64 v22; // x0 cocos2d::CCNode *v23; // x25 __int64 (__fastcall *v24)(cocos2d::CCMenu *, __int64 *); // x26 GameStatsManager *v25; // x0 __int64 v26; // x25 _BOOL8 isSpecialChestUnlocked; // x0 _BOOL4 v28; // w27 _BOOL4 v29; // w26 _BOOL4 v30; // w25 unsigned int v31; // w28 GameManager *v32; // x0 GameManager *v33; // x0 const char *v34; // x1 const char *v35; // x2 __int64 v36; // x0 __int64 v37; // x28 const char *v38; // x2 __int64 v39; // x0 __int64 v40; // x26 void (__fastcall *v41)(__int64, __int64 *); // x27 cocos2d::CCSprite *RewardFrame; // x0 const char *v43; // x1 __int64 v44; // x28 __int64 v45; // x26 __int64 *v46; // x0 cocos2d::CCSprite *v47; // x0 const char *v48; // x1 float v49; // s8 __int64 v50; // x0 __int64 v51; // x28 __int64 *v52; // x0 __int64 v53; // x24 void (__fastcall *v54)(__int64, __int64 *); // x28 GameLevelManager *v55; // x0 GameStatsManager *v56; // x0 cocos2d::CCDictionary **v57; // x0 GameLevelManager *v58; // x0 GameLevelManager *v59; // x0 float v60; // s0 void (__fastcall *v61)(cocos2d::CCSprite *, __int64 *); // x25 __int64 v62; // x25 cocos2d::CCNode *v63; // x26 __int64 (__fastcall *v64)(__int64, __int64 *); // x27 cocos2d::CCScaleTo *v65; // x0 cocos2d::CCEaseInOut *v66; // x0 cocos2d::CCActionInterval *v67; // x1 cocos2d::CCScaleTo *v68; // x25 cocos2d::CCEaseInOut *v69; // x0 cocos2d::CCActionInterval *v70; // x1 cocos2d::CCFiniteTimeAction *v71; // x0 cocos2d::CCRepeatForever *v72; // x0 cocos2d::CCActionInterval *v73; // x1 cocos2d::CCAction *v74; // x0 __int64 v75; // x25 _BOOL8 v76; // x0 __int64 v77; // x26 _BOOL8 v78; // x0 __int64 v79; // x25 _BOOL8 v80; // x0 _BOOL4 v81; // w24 __int64 v82; // x26 _BOOL8 v83; // x0 __int64 v84; // x26 _BOOL8 v85; // x0 __int64 v86; // x26 cocos2d::CCNode *v87; // [xsp+A0h] [xbp+A0h] __int64 v88; // [xsp+A8h] [xbp+A8h] cocos2d::CCNode *v89; // [xsp+B0h] [xbp+B0h] cocos2d::CCNode *v90; // [xsp+B0h] [xbp+B0h] cocos2d::CCNode *v91; // [xsp+B8h] [xbp+B8h] cocos2d::CCNode *v92; // [xsp+B8h] [xbp+B8h] cocos2d::CCNode *v93; // [xsp+B8h] [xbp+B8h] cocos2d::CCNode *v94; // [xsp+B8h] [xbp+B8h] cocos2d::CCNode *v95; // [xsp+B8h] [xbp+B8h] __int64 v96; // [xsp+C8h] [xbp+C8h] BYREF char v97[8]; // [xsp+D0h] [xbp+D0h] BYREF char v98[8]; // [xsp+D8h] [xbp+D8h] BYREF __int64 v99; // [xsp+E0h] [xbp+E0h] BYREF __int64 v100; // [xsp+E8h] [xbp+E8h] BYREF __int64 v101[2]; // [xsp+F0h] [xbp+F0h] BYREF GameManager *v102[2]; // [xsp+100h] [xbp+100h] BYREF void *v103; // [xsp+110h] [xbp+110h] __int64 v104[2]; // [xsp+118h] [xbp+118h] BYREF void *v105; // [xsp+128h] [xbp+128h] __int64 v106[2]; // [xsp+130h] [xbp+130h] BYREF void *v107; // [xsp+140h] [xbp+140h] __int64 v108[2]; // [xsp+148h] [xbp+148h] BYREF void *v109; // [xsp+158h] [xbp+158h] __int64 v110[2]; // [xsp+160h] [xbp+160h] BYREF void *v111; // [xsp+170h] [xbp+170h] __int64 v112[2]; // [xsp+178h] [xbp+178h] BYREF void *v113; // [xsp+188h] [xbp+188h] __int64 v114; // [xsp+190h] [xbp+190h] BYREF size_t v115; // [xsp+198h] [xbp+198h] void *v116; // [xsp+1A0h] [xbp+1A0h] FLAlertLayer::incrementForcePrio((cocos2d::CCObject *)this); LODWORD(v101[0]) = -1778384896; v2 = cocos2d::CCLayerColor::initWithColor(this, v101); v3 = v2; if ( !v2 ) return v3; v5 = 1; (*((void (__fastcall **)(cocos2d::CCNode **, __int64))*this + 125))(this, 1); v6 = (cocos2d::CCDirector *)(*((__int64 (__fastcall **)(cocos2d::CCNode **, __int64))*this + 134))(this, 1); v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6); WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize(&v96, v7); v9 = cocos2d::CCLayer::create(WinSize); *(this + 73) = (cocos2d::CCNode *)v9; (*((void (__fastcall **)(cocos2d::CCNode **, __int64))*this + 57))(this, v9); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v101, 0.0, 0.0, 80.0, 80.0); v10 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v101); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v10 + 912LL))(v10, 0xFFFFFFFFLL); v11 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v10 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v101, 340.0, 220.0); v11(v10, v101); (*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 73) + 464LL))(*(this + 73), v10, 0xFFFFFFFFLL); v12 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v10 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v101, *(float *)&v96 * 0.5, *((float *)&v96 + 1) * 0.5); v12(v10, v101); v14 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"rewardsLabel_001.png", v13); (*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 73) + 464LL))(*(this + 73), v14, 20); v15 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v14 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v101, *(float *)&v96 * 0.5, (float)((float)(*((float *)&v96 + 1) * 0.5) + 110.0) - 32.0); v15(v14, v101); while ( 1 ) { while ( 1 ) { v17 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"rewardCorner_001.png", v16); (*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64))(*(_QWORD *)*(this + 73) + 464LL))( *(this + 73), v17, 8); if ( v5 != 3 ) break; cocos2d::CCSprite::setFlipX(v17, 1); cocos2d::CCSprite::setFlipY(v17, 1); v60 = 145.0; LABEL_39: ++v5; v61 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v17 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v101, v60 + (float)(*(float *)&v96 * 0.5), (float)(*((float *)&v96 + 1) * 0.5) + 85.0); v61(v17, v101); } if ( v5 == 4 ) break; if ( v5 == 2 ) { cocos2d::CCSprite::setFlipY(v17, 1); v60 = -145.0; goto LABEL_39; } v18 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v17 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v101, (float)(*(float *)&v96 * 0.5) + -145.0, (float)(*((float *)&v96 + 1) * 0.5) + -85.0); v18(v17, v101); ++v5; } cocos2d::CCSprite::setFlipX(v17, 1); v19 = *(void (__fastcall **)(cocos2d::CCSprite *, __int64 *))(*(_QWORD *)v17 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v101, (float)(*(float *)&v96 * 0.5) + 145.0, (float)(*((float *)&v96 + 1) * 0.5) + -85.0); v19(v17, v101); *((_DWORD *)this + 160) = -1; v20 = cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_closeBtn_001.png", (const char *)0xFFFFFFFFLL); v21 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v20, 0, (__int64)this, (__int64)RewardsPage::onClose, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v21, 1.6); v22 = cocos2d::CCMenu::create(v21, nullptr); *(this + 69) = (cocos2d::CCNode *)v22; v23 = (cocos2d::CCNode *)v22; v24 = *(__int64 (__fastcall **)(cocos2d::CCMenu *, __int64 *))(*(_QWORD *)v21 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v100, (float)((float)(*(float *)&v96 * 0.5) + -170.0) + 10.0, (float)((float)(*((float *)&v96 + 1) * 0.5) + 110.0) - 10.0); cocos2d::CCNode::convertToNodeSpace(v101, v23, (const cocos2d::CCPoint *)&v100); v25 = (GameStatsManager *)v24(v21, v101); v26 = GameStatsManager::sharedState(v25); v102[0] = nullptr; v102[1] = nullptr; v103 = nullptr; std::string::__init((__int64 *)v102, "0007", 4u); isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked(v26, (char *)v102); v28 = isSpecialChestUnlocked; if ( !isSpecialChestUnlocked ) { v29 = 0; v30 = 0; goto LABEL_12; } v75 = GameStatsManager::sharedState((GameStatsManager *)isSpecialChestUnlocked); v104[0] = 0; v104[1] = 0; v105 = nullptr; std::string::__init(v104, "0008", 4u); v76 = GameStatsManager::isSpecialChestUnlocked(v75, (char *)v104); v30 = v76; v29 = 0; if ( !v76 ) goto LABEL_12; v77 = GameStatsManager::sharedState((GameStatsManager *)v76); v106[0] = 0; v106[1] = 0; v107 = nullptr; std::string::__init(v106, "0009", 4u); v78 = GameStatsManager::isSpecialChestUnlocked(v77, (char *)v106); v29 = v78; v28 = v30; if ( !v78 ) goto LABEL_12; v79 = GameStatsManager::sharedState((GameStatsManager *)v78); v108[0] = 0; v108[1] = 0; v109 = nullptr; std::string::__init(v108, "0010", 4u); v80 = GameStatsManager::isSpecialChestUnlocked(v79, (char *)v108); v81 = v80; if ( !v80 ) { v30 = v29; v28 = v29; goto LABEL_12; } v82 = GameStatsManager::sharedState((GameStatsManager *)v80); v110[0] = 0; v110[1] = 0; v111 = nullptr; std::string::__init(v110, "0011", 4u); v83 = GameStatsManager::isSpecialChestUnlocked(v82, (char *)v110); v30 = v83; if ( v83 ) { v84 = GameStatsManager::sharedState((GameStatsManager *)v83); v112[0] = 0; v112[1] = 0; v113 = nullptr; std::string::__init(v112, "0024", 4u); v85 = GameStatsManager::isSpecialChestUnlocked(v84, (char *)v112); if ( v85 ) { v86 = GameStatsManager::sharedState((GameStatsManager *)v85); v114 = 0; v115 = 0; v116 = nullptr; std::string::__init(&v114, "0025", 4u); v31 = !GameStatsManager::isSpecialChestUnlocked(v86, (char *)&v114); if ( (v114 & 1) != 0 ) operator delete(v116); } else { v31 = 1; } if ( (v112[0] & 1) != 0 ) operator delete(v113); v29 = v30; v28 = v30; LABEL_53: if ( (v110[0] & 1) == 0 ) goto LABEL_13; operator delete(v111); if ( v29 ) { LABEL_14: if ( (v108[0] & 1) != 0 ) operator delete(v109); } } else { v29 = v81; v30 = v81; v28 = v81; if ( v81 ) { v31 = 1; goto LABEL_53; } LABEL_12: v31 = 1; LABEL_13: if ( v29 ) goto LABEL_14; } if ( v30 && (v106[0] & 1) != 0 ) operator delete(v107); if ( v28 && (v104[0] & 1) != 0 ) operator delete(v105); v32 = (GameManager *)LOBYTE(v102[0]); if ( ((__int64)v102[0] & 1) != 0 ) operator delete(v103); v33 = (GameManager *)GameManager::sharedState(v32); if ( v31 > (unsigned __int8)GameManager::safeModeEnabled(v33) ) { v95 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_freeChestBtn_001.png", v34); v62 = CCMenuItemSpriteExtra::create((__int64)v95, 0, (__int64)this, (__int64)RewardsPage::onFreeStuff, 0); CCMenuItemSpriteExtra::setSizeMult(v62, 1.6); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), v62); v63 = *(this + 69); v64 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v62 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v100, (float)((float)(*(float *)&v96 * 0.5) + 170.0) - 10.0, (float)((float)(*((float *)&v96 + 1) * 0.5) + 110.0) - 10.0); cocos2d::CCNode::convertToNodeSpace(v101, v63, (const cocos2d::CCPoint *)&v100); v65 = (cocos2d::CCScaleTo *)v64(v62, v101); if ( v31 ) { v66 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create(v65, 0.5, 1.1); v68 = (cocos2d::CCScaleTo *)cocos2d::CCEaseInOut::create(v66, v67, 2.0); v69 = (cocos2d::CCEaseInOut *)cocos2d::CCScaleTo::create(v68, 0.5, 1.0); v71 = (cocos2d::CCFiniteTimeAction *)cocos2d::CCEaseInOut::create(v69, v70, 2.0); v72 = (cocos2d::CCRepeatForever *)cocos2d::CCSequence::create(v68, v71, 0); v74 = (cocos2d::CCAction *)cocos2d::CCRepeatForever::create(v72, v73); cocos2d::CCNode::runAction(v95, v74); } } (*(void (__fastcall **)(_QWORD, _QWORD, __int64))(*(_QWORD *)*(this + 73) + 464LL))(*(this + 73), *(this + 69), 10); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, *(float *)&v96 * 0.5, (float)(*((float *)&v96 + 1) * 0.5) + -24.0); v36 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"00:00:00", "bigFont.fnt", v35); *(this + 85) = (cocos2d::CCNode *)v36; (*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 73) + 464LL))(*(this + 73), v36, 20); (*(void (__fastcall **)(_QWORD, float))(*(_QWORD *)*(this + 85) + 160LL))(*(this + 85), 0.5); v37 = (__int64)*(this + 85); v91 = *(cocos2d::CCNode **)(*(_QWORD *)v37 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v100, -70.0, -50.0); cocos2d::CCPoint::operator+(v101, v97); ((void (__fastcall *)(__int64, __int64 *))v91)(v37, v101); v39 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"00:00:00", "bigFont.fnt", v38); *(this + 86) = (cocos2d::CCNode *)v39; (*(void (__fastcall **)(_QWORD, __int64, __int64))(*(_QWORD *)*(this + 73) + 464LL))(*(this + 73), v39, 20); (*(void (__fastcall **)(_QWORD, float))(*(_QWORD *)*(this + 86) + 160LL))(*(this + 86), 0.5); v40 = (__int64)*(this + 86); v41 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v40 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v100, 70.0, -50.0); cocos2d::CCPoint::operator+(v101, v97); v41(v40, v101); RewardFrame = (cocos2d::CCSprite *)RewardsPage::getRewardFrame((RewardsPage *)((char *)&dword_0 + 2), 1u); v44 = cocos2d::CCSprite::createWithSpriteFrameName(RewardFrame, v43); v45 = CCMenuItemSpriteExtra::create(v44, 0, (__int64)this, (__int64)RewardsPage::onReward, 0); *(this + 88) = (cocos2d::CCNode *)v45; v114 = 0; v115 = 0; v116 = nullptr; std::string::__init(&v114, "chestClick.ogg", 0xEu); v46 = (__int64 *)(v45 + 440); if ( (__int64 *)(v45 + 440) != &v114 ) { if ( (v114 & 1) != 0 ) std::string::assign(v46, v116, v115); else std::string::assign(v46, (char *)&v114 + 1, (unsigned __int8)v114 >> 1); } if ( (v114 & 1) != 0 ) operator delete(v116); (*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)*(this + 88) + 72LL))(*(this + 88), 2); (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), *(this + 88)); v88 = (__int64)*(this + 88); v87 = *(this + 69); v92 = *(cocos2d::CCNode **)(*(_QWORD *)v88 + 184LL); v89 = *(this + 73); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v98, 70.0, 14.0); cocos2d::CCPoint::operator+(&v99, v97); cocos2d::CCNode::convertToWorldSpace(&v100, v89, (const cocos2d::CCPoint *)&v99); cocos2d::CCNode::convertToNodeSpace(v101, v87, (const cocos2d::CCPoint *)&v100); ((void (__fastcall *)(__int64, __int64 *))v92)(v88, v101); *((_DWORD *)*(this + 88) + 100) = 1066024305; v47 = (cocos2d::CCSprite *)RewardsPage::getRewardFrame( (RewardsPage *)((char *)&dword_0 + 1), (unsigned int)&dword_0 + 1); v93 = (cocos2d::CCNode *)cocos2d::CCSprite::createWithSpriteFrameName(v47, v48); v49 = *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v44 + 328LL))(v44) + 4) * 0.2; v50 = CCMenuItemSpriteExtra::create((__int64)v93, 0, (__int64)this, (__int64)RewardsPage::onReward, 0); *(this + 87) = (cocos2d::CCNode *)v50; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v50 + 72LL))(v50, 1); v51 = (__int64)*(this + 87); v114 = 0; v115 = 0; v116 = nullptr; std::string::__init(&v114, "chestClick.ogg", 0xEu); v52 = (__int64 *)(v51 + 440); if ( (__int64 *)(v51 + 440) != &v114 ) { if ( (v114 & 1) != 0 ) std::string::assign(v52, v116, v115); else std::string::assign(v52, (char *)&v114 + 1, (unsigned __int8)v114 >> 1); } if ( (v114 & 1) != 0 ) operator delete(v116); (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 69) + 456LL))(*(this + 69), *(this + 87)); v53 = (__int64)*(this + 87); v94 = *(this + 69); v90 = *(this + 73); v54 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v53 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v98, -70.0, 14.0 - (float)(v49 * 0.5)); cocos2d::CCPoint::operator+(&v99, v97); cocos2d::CCNode::convertToWorldSpace(&v100, v90, (const cocos2d::CCPoint *)&v99); cocos2d::CCNode::convertToNodeSpace(v101, v94, (const cocos2d::CCPoint *)&v100); v54(v53, v101); v55 = *(this + 87); *((_DWORD *)v55 + 100) = 1066024305; v56 = (GameStatsManager *)GameLevelManager::sharedState(v55); *((_QWORD *)v56 + 176) = this + 84; v57 = (cocos2d::CCDictionary **)GameStatsManager::sharedState(v56); if ( GameStatsManager::areRewardsLoaded(v57) ) { RewardsPage::updateTimers((RewardsPage *)this, 0.0); } else { (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 85) + 344LL))(*(this + 85), 0); v58 = (GameLevelManager *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)*(this + 86) + 344LL))( *(this + 86), 0); v59 = (GameLevelManager *)GameLevelManager::sharedState(v58); GameLevelManager::getGJRewards(v59, 0); } cocos2d::CCNode::schedule(this, RewardsPage::updateTimers, 0, 1.0); return v3; }
GD Web Decomp Icon

GD Web Decomp

Raw Source