//
// RewardsPage::init from 0x140561c90 to 0x140562bdc (3916 bytes)
//
// 5 xrefs:
// > MenuLayer::onDaily @ 0x140473c6c
// > MenuLayer::onDaily @ 0x140473c73
// > MenuLayer::onDaily @ 0x140473c5d
// > ??> @ 0x1407db368
// > ??> @ 0x14092c4a4
//
// 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:34:15 +0000
//
// Hidden C++ exception states: #wind=16
bool __fastcall RewardsPage::init(__int64 a1)
{
bool result; // al
__int64 v3; // rdx
__int64 v4; // rdx
__int64 v5; // rcx
__int64 v6; // rax
__int64 v7; // rax
__int64 v8; // rax
__int64 *v9; // rdi
__int64 v10; // rdx
void (__fastcall *v11)(__int64 *, __int64); // r8
__int64 v12; // rbx
__int64 v13; // rax
__int64 v14; // rbx
__int64 v15; // rax
struct cocos2d::CCSprite *v16; // rdi
__int64 v17; // rbx
__int64 v18; // rax
int i; // esi
cocos2d::CCSprite *v20; // rdi
float v21; // xmm6_4
float v22; // xmm7_4
__int64 v23; // rbx
__int64 v24; // rax
__int64 *v25; // rbx
cocos2d::CCObject *v26; // rsi
struct cocos2d::CCMenu *v27; // rbx
__int64 v28; // rdi
__int64 v29; // rax
__int64 v30; // rax
__int64 v31; // rcx
__int64 v32; // rcx
__int64 v33; // rcx
__int64 v34; // rcx
__int64 v35; // rcx
__int64 v36; // rcx
__int64 v37; // rcx
char v38; // di
__int64 v39; // rbx
cocos2d::CCNode *v40; // r14
cocos2d::CCObject *v41; // rsi
__int64 v42; // rdi
__int64 v43; // rbx
__int64 v44; // rax
__int64 v45; // rax
struct cocos2d::CCActionInterval *v46; // rax
struct cocos2d::CCFiniteTimeAction *v47; // rbx
struct cocos2d::CCActionInterval *v48; // rax
struct cocos2d::CCEaseInOut *v49; // rax
struct cocos2d::CCActionInterval *v50; // rax
struct cocos2d::CCAction *v51; // rax
struct cocos2d::CCLabelBMFont *v52; // rax
__int64 v53; // rax
struct cocos2d::CCLabelBMFont *v54; // rax
__int64 v55; // rax
cocos2d::CCString *v56; // rax
const char *CString; // rax
__int64 *v58; // r14
__int64 *v59; // rax
void **v60; // rbx
__int64 v61; // rax
__int64 v62; // rsi
__int64 v63; // rbx
__int64 v64; // rdi
__int64 v65; // rax
__int64 v66; // rax
cocos2d::CCString *v67; // rax
const char *v68; // rax
__int64 *v69; // rdi
float v70; // xmm6_4
__int64 *v71; // rax
cocos2d::CCObject *v72; // rbx
void **v73; // rcx
__int64 v74; // rax
__int64 v75; // rsi
__int64 v76; // rbx
__int64 v77; // rdi
__int64 v78; // rax
__int64 v79; // rax
__int64 v80; // rax
__int64 v81; // rcx
__int64 v82; // rcx
void *v83; // [rsp+38h] [rbp-D0h] BYREF
char Src[15]; // [rsp+40h] [rbp-C8h] BYREF
char v85; // [rsp+4Fh] [rbp-B9h]
__int64 v86; // [rsp+50h] [rbp-B8h]
__int64 v87; // [rsp+58h] [rbp-B0h]
char v88[16]; // [rsp+60h] [rbp-A8h] BYREF
__int64 v89; // [rsp+70h] [rbp-98h]
__int64 v90; // [rsp+78h] [rbp-90h]
_BYTE v91[8]; // [rsp+80h] [rbp-88h] BYREF
__int128 *v92; // [rsp+88h] [rbp-80h] BYREF
__int128 v93; // [rsp+90h] [rbp-78h] BYREF
__int64 v94; // [rsp+A0h] [rbp-68h]
__int64 v95; // [rsp+A8h] [rbp-60h]
__int128 v96; // [rsp+B0h] [rbp-58h] BYREF
__int64 v97; // [rsp+C0h] [rbp-48h]
__int64 v98; // [rsp+C8h] [rbp-40h]
__int128 v99; // [rsp+D0h] [rbp-38h] BYREF
__int64 v100; // [rsp+E0h] [rbp-28h]
__int64 v101; // [rsp+E8h] [rbp-20h]
__int128 v102; // [rsp+F0h] [rbp-18h] BYREF
__int64 v103; // [rsp+100h] [rbp-8h]
__int64 v104; // [rsp+108h] [rbp+0h]
__int128 v105; // [rsp+110h] [rbp+8h] BYREF
__int64 v106; // [rsp+120h] [rbp+18h]
__int64 v107; // [rsp+128h] [rbp+20h]
__int128 v108; // [rsp+130h] [rbp+28h] BYREF
__int64 v109; // [rsp+140h] [rbp+38h]
__int64 v110; // [rsp+148h] [rbp+40h]
__int128 v111; // [rsp+150h] [rbp+48h] BYREF
__int64 v112; // [rsp+160h] [rbp+58h]
__int64 v113; // [rsp+168h] [rbp+60h]
char *v114; // [rsp+230h] [rbp+128h] BYREF
float v115; // [rsp+238h] [rbp+130h] BYREF
float v116; // [rsp+23Ch] [rbp+134h]
char v117; // [rsp+240h] [rbp+138h] BYREF
FLAlertLayer::incrementForcePrio((struct cocos2d::CCObject *)a1);
LODWORD(v114) = -1778384896;
result = cocos2d::CCLayerColor::initWithColor((cocos2d::CCLayerColor *)a1, (const struct cocos2d::_ccColor4B *)&v114);
if ( !result )
return result;
LOBYTE(v3) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 920LL))(a1, v3);
LOBYTE(v4) = 1;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 992LL))(a1, v4);
v6 = cocos2d::CCDirector::sharedDirector(v5);
cocos2d::CCDirector::getWinSize(v6, &v115);
v7 = cocos2d::CCLayer::create();
*(_QWORD *)(a1 + 584) = v7;
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v7);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)&v93, 0.0, 0.0, 80.0, 80.0);
v9 = (__int64 *)cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v8);
v10 = v9[40];
v11 = *(void (__fastcall **)(__int64 *, __int64))(v10 + 40);
LOBYTE(v10) = -1;
v11(v9 + 40, v10);
v12 = *v9;
cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v114, 340.0, 220.0);
(*(void (__fastcall **)(__int64 *, __int64))(v12 + 312))(v9, v13);
(*(void (__fastcall **)(_QWORD, __int64 *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v9,
0xFFFFFFFFLL);
v14 = *v9;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v114, v115 * 0.5, v116 * 0.5);
(*(void (__fastcall **)(__int64 *, __int64))(v14 + 184))(v9, v15);
v16 = cocos2d::CCSprite::createWithSpriteFrameName("rewardsLabel_001.png");
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v16,
20);
v17 = *(_QWORD *)v16;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v114, v115 * 0.5, (float)((float)(v116 * 0.5) + 110.0) - 32.0);
(*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v17 + 184))(v16, v18);
for ( i = 0; i < 4; ++i )
{
v20 = cocos2d::CCSprite::createWithSpriteFrameName("rewardCorner_001.png");
(*(void (__fastcall **)(_QWORD, cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v20,
8);
v21 = 145.0;
v22 = 85.0;
if ( i )
{
switch ( i )
{
case 1:
v21 = -145.0;
cocos2d::CCSprite::setFlipY(v20, 1);
break;
case 2:
cocos2d::CCSprite::setFlipX(v20, 1);
cocos2d::CCSprite::setFlipY(v20, 1);
break;
case 3:
v22 = -85.0;
cocos2d::CCSprite::setFlipX(v20, 1);
break;
}
}
else
{
v21 = -145.0;
v22 = -85.0;
}
v23 = *(_QWORD *)v20;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v114, (float)(v115 * 0.5) + v21, (float)(v116 * 0.5) + v22);
(*(void (__fastcall **)(cocos2d::CCSprite *, __int64))(v23 + 184))(v20, v24);
}
*(_DWORD *)(a1 + 640) = -1;
v25 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_closeBtn_001.png");
v114 = (char *)operator new(0x208u);
v26 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v114);
if ( v26 )
{
if ( CCMenuItemSpriteExtra::init((__int64 *)v26, v25, 0, a1, (__int64)PagedListPopup::onClose) )
{
cocos2d::CCObject::autorelease(v26);
goto LABEL_17;
}
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v26 + 8LL))(v26, 1);
}
v26 = nullptr;
LABEL_17:
*((_DWORD *)v26 + 93) = 1070386381;
v27 = cocos2d::CCMenu::create(v26, 0);
*(_QWORD *)(a1 + 552) = v27;
v28 = *(_QWORD *)v26;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v114,
(float)((float)(v115 * 0.5) - 170.0) + 10.0,
(float)((float)(v116 * 0.5) + 110.0) - 10.0);
cocos2d::CCNode::convertToNodeSpace(v27, v91, v29);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v28 + 184))(v26, v30);
v92 = &v93;
v93 = 0;
v94 = 4;
v95 = 15;
strcpy((char *)&v93, "0007");
v31 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v83 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v83);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v31 = qword_14090BFE0;
}
if ( !GameStatsManager::isSpecialChestUnlocked(v31, &v93) )
goto LABEL_39;
v114 = (char *)&v96;
v96 = 0;
v97 = 4;
v98 = 15;
strcpy((char *)&v96, "0008");
v32 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v83 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v83);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v32 = qword_14090BFE0;
}
if ( !GameStatsManager::isSpecialChestUnlocked(v32, &v96) )
goto LABEL_39;
v114 = (char *)&v99;
v99 = 0;
v100 = 4;
v101 = 15;
strcpy((char *)&v99, "0009");
v33 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v83 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v83);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v33 = qword_14090BFE0;
}
if ( !GameStatsManager::isSpecialChestUnlocked(v33, &v99) )
goto LABEL_39;
v114 = (char *)&v102;
v102 = 0;
v103 = 4;
v104 = 15;
strcpy((char *)&v102, "0010");
v34 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v83 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v83);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v34 = qword_14090BFE0;
}
if ( !GameStatsManager::isSpecialChestUnlocked(v34, &v102) )
goto LABEL_39;
v114 = (char *)&v105;
v105 = 0;
v106 = 4;
v107 = 15;
strcpy((char *)&v105, "0011");
v35 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v83 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v83);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v35 = qword_14090BFE0;
}
if ( !GameStatsManager::isSpecialChestUnlocked(v35, &v105) )
goto LABEL_39;
v114 = (char *)&v108;
v108 = 0;
v109 = 4;
v110 = 15;
strcpy((char *)&v108, "0024");
v36 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v83 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v83);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v36 = qword_14090BFE0;
}
if ( !GameStatsManager::isSpecialChestUnlocked(v36, &v108) )
goto LABEL_39;
v114 = (char *)&v111;
v111 = 0;
v112 = 4;
v113 = 15;
strcpy((char *)&v111, "0025");
v37 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
v83 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480((__int64)v83);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v37 = qword_14090BFE0;
}
if ( GameStatsManager::isSpecialChestUnlocked(v37, &v111) )
v38 = 0;
else
LABEL_39:
v38 = 1;
v39 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v114 = (char *)operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager((__int64)v114);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v39 = qword_14090BFD0;
}
if ( !GameManager::getGameVariable(v39, "0218") && !GameManager::getGameVariable(v39, "0219") && v38 )
{
v40 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_freeChestBtn_001.png");
v41 = CCMenuItemSpriteExtra::create((int)v40, 0, a1, (__int64)RewardsPage::onFreeStuff);
*((_DWORD *)v41 + 93) = 1070386381;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v41);
v42 = *(_QWORD *)v41;
v43 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v114,
(float)((float)(v115 * 0.5) + 170.0) - 10.0,
(float)((float)(v116 * 0.5) + 110.0) - 10.0);
cocos2d::CCNode::convertToNodeSpace(v43, &v83, v44);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v42 + 184))(v41, v45);
v46 = cocos2d::CCScaleTo::create(0.5, 1.1);
v47 = cocos2d::CCEaseInOut::create(v46, 2.0);
v48 = cocos2d::CCScaleTo::create(0.5, 1.0);
v49 = cocos2d::CCEaseInOut::create(v48, 2.0);
v50 = cocos2d::CCSequence::create(v47, v49, 0);
v51 = cocos2d::CCRepeatForever::create(v50);
cocos2d::CCNode::runAction(v40, v51);
}
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 552),
10);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v117, v115 * 0.5, (float)(v116 * 0.5) - 24.0);
v52 = cocos2d::CCLabelBMFont::create("00:00:00", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 680) = v52;
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v52,
20);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 680) + 160LL))(*(_QWORD *)(a1 + 680));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, -70.0, -50.0);
cocos2d::CCPoint::operator+(&v117, &v114, v53);
(*(void (__fastcall **)(_QWORD, char **))(**(_QWORD **)(a1 + 680) + 184LL))(*(_QWORD *)(a1 + 680), &v114);
v54 = cocos2d::CCLabelBMFont::create("00:00:00", (const char *)&qword_140704F78);
*(_QWORD *)(a1 + 688) = v54;
(*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
v54,
20);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 688) + 160LL))(*(_QWORD *)(a1 + 688));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, 70.0, -50.0);
cocos2d::CCPoint::operator+(&v117, &v114, v55);
(*(void (__fastcall **)(_QWORD, char **))(**(_QWORD **)(a1 + 688) + 184LL))(*(_QWORD *)(a1 + 688), &v114);
v56 = cocos2d::CCString::createWithFormat("chest_%02d_%02d_001.png", 2, 1);
CString = cocos2d::CCString::getCString(v56);
v58 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName(CString);
v114 = (char *)operator new(0x208u);
v59 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v114);
v60 = (void **)v59;
if ( v59 )
{
if ( CCMenuItemSpriteExtra::init(v59, v58, 0, a1, (__int64)RewardsPage::onReward) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v60);
goto LABEL_51;
}
(*((void (__fastcall **)(void **, __int64))*v60 + 1))(v60, 1);
}
v60 = nullptr;
LABEL_51:
*(_QWORD *)(a1 + 704) = v60;
v86 = 14;
v87 = 15;
strcpy(Src, "chestClick.ogg");
v85 = 0;
v114 = Src;
if ( v60 + 56 != (void **)Src )
sub_1400405A0(v60 + 56, Src, 0xEu);
sub_14003D310((__int64)Src);
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 704) + 64LL))(*(_QWORD *)(a1 + 704), 2);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
*(_QWORD *)(a1 + 704));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, 70.0, 14.0);
cocos2d::CCPoint::operator+(&v117, &v114, v61);
v62 = **(_QWORD **)(a1 + 704);
v63 = *(_QWORD *)(a1 + 552);
v64 = *(_QWORD *)(a1 + 704);
cocos2d::CCNode::convertToWorldSpace(*(_QWORD *)(a1 + 584), &v92, &v114);
cocos2d::CCNode::convertToNodeSpace(v63, v91, v65);
(*(void (__fastcall **)(__int64, __int64))(v62 + 184))(v64, v66);
*(_DWORD *)(*(_QWORD *)(a1 + 704) + 400LL) = 1066024305;
v67 = cocos2d::CCString::createWithFormat("chest_%02d_%02d_001.png", 1, 1);
v68 = cocos2d::CCString::getCString(v67);
v69 = (__int64 *)cocos2d::CCSprite::createWithSpriteFrameName(v68);
v70 = *(float *)((*(__int64 (__fastcall **)(__int64 *))(*v58 + 320))(v58) + 4) * 0.19999999;
v114 = (char *)operator new(0x208u);
v71 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v114);
v72 = (cocos2d::CCObject *)v71;
if ( !v71 )
goto LABEL_57;
if ( !CCMenuItemSpriteExtra::init(v71, v69, 0, a1, (__int64)RewardsPage::onReward) )
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v72 + 8LL))(v72, 1);
LABEL_57:
v72 = nullptr;
goto LABEL_58;
}
cocos2d::CCObject::autorelease(v72);
LABEL_58:
*(_QWORD *)(a1 + 696) = v72;
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v72 + 64LL))(v72, 1);
v89 = 14;
v90 = 15;
strcpy(v88, "chestClick.ogg");
v88[15] = 0;
v114 = v88;
v73 = (void **)(*(_QWORD *)(a1 + 696) + 448LL);
if ( v73 != (void **)v88 )
sub_1400405A0(v73, v88, 0xEu);
sub_14003D310((__int64)v88);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 552) + 464LL))(
*(_QWORD *)(a1 + 552),
*(_QWORD *)(a1 + 696));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v83, -70.0, 14.0 - (float)(v70 * 0.5));
cocos2d::CCPoint::operator+(&v117, &v114, v74);
v75 = **(_QWORD **)(a1 + 696);
v76 = *(_QWORD *)(a1 + 552);
v77 = *(_QWORD *)(a1 + 696);
cocos2d::CCNode::convertToWorldSpace(*(_QWORD *)(a1 + 584), &v92, &v114);
cocos2d::CCNode::convertToNodeSpace(v76, v91, v78);
(*(void (__fastcall **)(__int64, __int64))(v75 + 184))(v77, v79);
*(_DWORD *)(*(_QWORD *)(a1 + 696) + 400LL) = 1066024305;
v80 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
*(_QWORD *)&v93 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v93);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v80 = *(_QWORD *)&qword_14090BFB0;
}
*(_QWORD *)(v80 + 1536) = a1 + 672;
v81 = qword_14090BFE0;
if ( !qword_14090BFE0 )
{
*(_QWORD *)&v93 = operator new(0x3E8u);
qword_14090BFE0 = sub_1402D6480(v93);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0);
v81 = qword_14090BFE0;
}
if ( cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(v81 + 528), 1) )
{
RewardsPage::updateTimers(a1);
}
else
{
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 680) + 336LL))(*(_QWORD *)(a1 + 680), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 688) + 336LL))(*(_QWORD *)(a1 + 688), 0);
v82 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v114 = (char *)operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v114);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v82 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::getGJRewards(v82, 0);
}
cocos2d::CCNode::schedule(a1, RewardsPage::updateTimers);
return 1;
}