// // DailyLevelPage::init from 0xa6f200 to 0xa6fd40 (2880 bytes) // // 2 xrefs: // > DailyLevelPage::create @ 0xa6fef4 // > @ 0x6e638 // // 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:23 +0000 // __int64 __fastcall DailyLevelPage::init(__int64 a1, int a2) { unsigned __int8 v4; // w0 unsigned int v5; // w27 __int64 v6; // x0 cocos2d::CCDirector *v7; // x0 cocos2d::CCDirector *v8; // x0 cocos2d::CCLayer *WinSize; // x0 __int64 v10; // x0 __int64 v11; // x2 char *v12; // x21 __int64 v13; // x21 void (__fastcall *v14)(__int64, GameLevelManager **); // x25 void (__fastcall *v15)(__int64, GameLevelManager **); // x25 const char *v16; // x1 cocos2d::CCSprite *v17; // x0 __int64 v18; // x21 void (__fastcall *v19)(__int64, GameLevelManager **); // x22 int i; // w22 cocos2d::CCSprite *v21; // x0 __int64 v22; // x21 const char *v23; // x1 float v24; // s1 float v25; // s0 void (__fastcall *v26)(__int64, GameLevelManager **); // x25 const char *v27; // x1 __int64 v28; // x0 cocos2d::CCMenu *v29; // x21 __int64 v30; // x21 float v31; // s2 void (__fastcall *v32)(__int64, GameLevelManager **); // x22 const char *v33; // x1 __int64 v34; // x0 __int64 v35; // x21 void (__fastcall *v36)(__int64, GameLevelManager **); // x23 cocos2d::CCNode *v37; // x24 const char *v38; // x2 cocos2d::CCLabelBMFont *v39; // x0 __int64 v40; // x0 char v41; // w1 long double v42; // q0 __int64 v43; // x21 void (__fastcall *v44)(__int64, GameLevelManager **); // x22 __int64 v45; // x0 float v46; // s8 void (__fastcall *v47)(__int64, GameLevelManager **); // x22 float *v48; // x0 __int64 v49; // x21 float v50; // s9 float v51; // s0 LoadingCircle *v52; // x0 __int64 v53; // x0 __int64 v54; // x21 void (__fastcall *v55)(__int64, GameLevelManager **); // x22 LoadingCircle *v56; // x0 __int64 v57; // x0 __int64 v58; // x21 void (__fastcall *v59)(__int64, GameLevelManager **); // x22 double v60; // d8 unsigned int *v61; // x0 GameLevelManager *DailyTimer; // x0 _DWORD *v63; // x0 unsigned int *v64; // x0 GameStatsManager *ActiveDailyID; // x0 unsigned int v66; // w20 GameStatsManager *v67; // x0 _BOOL8 hasCompletedDailyLevel; // x0 GameLevelManager *v69; // x0 GJGameLevel *SavedDailyLevel; // x1 _DWORD *v71; // x0 GameLevelManager *v72; // x0 GameLevelManager *v73; // x0 GameLevelManager *v74; // x0 GameLevelManager *v75; // x0 __int64 v76; // x0 char v77; // w1 void (__fastcall *v79)(__int64, float); // x25 float v80; // s0 void (__fastcall *v81)(__int64, float); // x25 float v82; // s0 void (__fastcall *v83)(__int64, float); // x25 float v84; // s0 void (__fastcall *v85)(__int64, float); // x25 float v86; // s0 __int64 v87; // x25 void (__fastcall *v88)(__int64, GameLevelManager **); // x2 void (__fastcall *v89)(__int64, GameLevelManager **); // [xsp+A8h] [xbp+A8h] __int64 v90; // [xsp+B8h] [xbp+B8h] BYREF _BYTE v91[8]; // [xsp+C0h] [xbp+C0h] BYREF GameLevelManager *v92[2]; // [xsp+C8h] [xbp+C8h] BYREF char *v93[2]; // [xsp+D8h] [xbp+D8h] BYREF cocos2d::CCSprite *v94; // [xsp+E8h] [xbp+E8h] __int64 v95[2]; // [xsp+F0h] [xbp+F0h] BYREF void *v96; // [xsp+100h] [xbp+100h] __int64 v97[2]; // [xsp+108h] [xbp+108h] BYREF void *v98; // [xsp+118h] [xbp+118h] __int64 v99[2]; // [xsp+120h] [xbp+120h] BYREF cocos2d::CCLabelBMFont *v100; // [xsp+130h] [xbp+130h] FLAlertLayer::incrementForcePrio((cocos2d::CCObject *)a1); LODWORD(v92[0]) = -1778384896; v4 = cocos2d::CCLayerColor::initWithColor(a1, v92); v5 = v4; if ( v4 ) { *(_DWORD *)(a1 + 732) = a2; v93[0] = nullptr; v93[1] = nullptr; v94 = nullptr; v95[0] = 0; v95[1] = 0; v96 = nullptr; v97[0] = 0; v97[1] = 0; v98 = nullptr; if ( a2 == 1 ) { std::string::assign((__int64 *)v93, "weeklyLevelLabel_001.png"); std::string::assign(v95, "gauntletCorner_001.png"); std::string::assign(v97, "GJ_square05.png"); v6 = 4294967294LL; *(_DWORD *)(a1 + 736) = -2; } else if ( a2 == 2 ) { std::string::assign((__int64 *)v93, "eventLevelLabel_001.png"); std::string::assign(v95, "dailyLevelCorner_001.png"); std::string::assign(v97, "GJ_square05.png"); v6 = 4294967293LL; *(_DWORD *)(a1 + 736) = -3; } else { std::string::assign((__int64 *)v93, "dailyLevelLabel_001.png"); std::string::assign(v95, "dailyLevelCorner_001.png"); std::string::assign(v97, "GJ_square01.png"); v6 = 0xFFFFFFFFLL; *(_DWORD *)(a1 + 736) = -1; } *(_QWORD *)(GameManager::sharedState((GameManager *)v6) + 1072) = a1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1000LL))(a1, 1); v7 = (cocos2d::CCDirector *)(*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1072LL))(a1, 1); v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7); WinSize = (cocos2d::CCLayer *)cocos2d::CCDirector::getWinSize(&v90, v8); v10 = cocos2d::CCLayer::create(WinSize); v11 = *(_QWORD *)a1; *(_QWORD *)(a1 + 584) = v10; (*(void (__fastcall **)(__int64, __int64))(v11 + 456))(a1, v10); v12 = (char *)v97 + 1; if ( (v97[0] & 1) != 0 ) v12 = (char *)v98; cocos2d::CCRect::CCRect((cocos2d::CCRect *)v92, 0.0, 0.0, 80.0, 80.0); v13 = cocos2d::extension::CCScale9Sprite::create(v12, v92); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v13 + 912LL))(v13, 0xFFFFFFFFLL); v14 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v13 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v92, 420.0, 280.0); v14(v13, v92); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))( *(_QWORD *)(a1 + 584), v13, 0xFFFFFFFFLL); v15 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v13 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, *(float *)&v90 * 0.5, *((float *)&v90 + 1) * 0.5); v15(v13, v92); if ( *(_DWORD *)(a1 + 732) == 2 ) { v88 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v13 + 960LL); LOWORD(v92[0]) = 12222; BYTE2(v92[0]) = -14; v88(v13, v92); } v16 = (const char *)LOBYTE(v93[0]); *(_DWORD *)(a1 + 640) = -1; v17 = (cocos2d::CCSprite *)((char *)v93 + 1); if ( ((unsigned __int8)v16 & 1) != 0 ) v17 = v94; v18 = cocos2d::CCSprite::createWithSpriteFrameName(v17, v16); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v18, 20); v19 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v18 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v92, *(float *)&v90 * 0.5, (float)((float)(*((float *)&v90 + 1) * 0.5) + 140.0) - 29.0); v19(v18, v92); for ( i = 0; i != 4; ++i ) { v21 = (cocos2d::CCSprite *)((char *)v95 + 1); if ( (v95[0] & 1) != 0 ) v21 = (cocos2d::CCSprite *)v96; v22 = cocos2d::CCSprite::createWithSpriteFrameName(v21, (const char *)LOBYTE(v95[0])); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))( *(_QWORD *)(a1 + 584), v22, 8); if ( *(_DWORD *)(a1 + 732) == 1 ) { v87 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"whiteSquare20_001.png", v23); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v87 + 128LL))(v87, 0.3); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v87 + 144LL))(v87, 0.8); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v87 + 960LL))(v87, &unk_1174150); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v87 + 360LL))(v87, -45.0); v89 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v87 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 2.0, 2.0); v89(v87, v92); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)v22 + 464LL))(v22, v87, 1); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 160LL))(v22, 0.63); } if ( i == 2 ) { v81 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 128LL); v82 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v22 + 136LL))(v22); v81(v22, -v82); v83 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 144LL); v84 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v22 + 152LL))(v22); v83(v22, -v84); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v22 + 344LL))(v22, 0); v24 = 115.0; v25 = 185.0; } else if ( i == 3 ) { v79 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 128LL); v80 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v22 + 136LL))(v22); v79(v22, -v80); v24 = -115.0; v25 = 185.0; } else { if ( i == 1 ) { v85 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v22 + 144LL); v86 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v22 + 152LL))(v22); v85(v22, -v86); v24 = 115.0; } else { v24 = -115.0; } v25 = -185.0; } v26 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v22 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v92, v25 + (float)(*(float *)&v90 * 0.5), v24 + (float)(*((float *)&v90 + 1) * 0.5)); v26(v22, v92); } v28 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_closeBtn_001.png", v27); v29 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v28, 0, a1, (__int64)DailyLevelPage::onClose, 0); CCMenuItemSpriteExtra::setSizeMult((__int64)v29, 1.6); v30 = cocos2d::CCMenu::create(v29, nullptr); v31 = *(float *)&v90; *(_QWORD *)(a1 + 552) = v30; v32 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v30 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v92, (float)((float)(v31 * 0.5) + -210.0) + 10.0, (float)((float)(*((float *)&v90 + 1) * 0.5) + 140.0) - 10.0); v32(v30, v92); (*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 464LL))( *(_QWORD *)(a1 + 584), *(_QWORD *)(a1 + 552), 10); v34 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_safeBtn_001.png", v33); v35 = CCMenuItemSpriteExtra::create(v34, 0, a1, (__int64)DailyLevelPage::onTheSafe, 0); CCMenuItemSpriteExtra::setSizeMult(v35, 1.6); (*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 552) + 456LL))(*(_QWORD *)(a1 + 552), v35); v36 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v35 + 184LL); v37 = *(cocos2d::CCNode **)(a1 + 552); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v91, (float)((float)(*(float *)&v90 * 0.5) + 210.0) - 30.0, (float)((float)(*((float *)&v90 + 1) * 0.5) + 140.0) - 30.0); cocos2d::CCNode::convertToNodeSpace((__int64 *)v92, v37, (const cocos2d::CCPoint *)v91); v36(v35, v92); DailyLevelPage::getDailyTimeString((DailyLevelPage *)a1, nullptr, v99); v39 = (cocos2d::CCLabelBMFont *)((char *)v99 + 1); if ( (v99[0] & 1) != 0 ) v39 = v100; v40 = cocos2d::CCLabelBMFont::create(v39, "goldFont.fnt", v38); v41 = v99[0]; *(_QWORD *)(a1 + 688) = v40; if ( (v41 & 1) != 0 ) { operator delete(v100); v40 = *(_QWORD *)(a1 + 688); } (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 464LL))(*(_QWORD *)(a1 + 584), v40, 20); if ( a2 == 2 ) LODWORD(v42) = 1053609165; else LODWORD(v42) = 0.5; (*(void (__fastcall **)(_QWORD, long double))(**(_QWORD **)(a1 + 688) + 160LL))(*(_QWORD *)(a1 + 688), v42); v43 = *(_QWORD *)(a1 + 688); v44 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v43 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, 0.0, 0.5); v44(v43, v92); v45 = *(_QWORD *)(a1 + 688); v46 = *(float *)&v90 * 0.5; v47 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v45 + 184LL); v48 = (float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v45 + 328LL))(v45); v49 = *(_QWORD *)(a1 + 688); v50 = *v48; v51 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v49 + 168LL))(v49); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v92, v46 - (float)((float)(v50 * v51) * 0.5), (float)((float)(*((float *)&v90 + 1) * 0.5) + -140.0) + 15.0); v47(v49, v92); v52 = (LoadingCircle *)cocos2d::CCNode::schedule(a1, DailyLevelPage::updateTimers, 0, 1.0); v53 = LoadingCircle::create(v52); *(_QWORD *)(a1 + 696) = v53; *(_QWORD *)(v53 + 552) = *(_QWORD *)(a1 + 584); *(_BYTE *)(*(_QWORD *)(a1 + 696) + 560LL) = 0; LoadingCircle::show(*(cocos2d::CCNode ***)(a1 + 696)); v54 = *(_QWORD *)(*(_QWORD *)(a1 + 696) + 544LL); v55 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v54 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v92, *(float *)&v90 * 0.5, (float)((float)(*((float *)&v90 + 1) * 0.5) + -140.0) + 17.0); v55(v54, v92); (*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(*(_QWORD *)(a1 + 696) + 544LL) + 160LL))( *(_QWORD *)(*(_QWORD *)(a1 + 696) + 544LL), 0.28); v56 = (LoadingCircle *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 696) + 344LL))( *(_QWORD *)(a1 + 696), 0); v57 = LoadingCircle::create(v56); *(_QWORD *)(a1 + 704) = v57; *(_QWORD *)(v57 + 552) = *(_QWORD *)(a1 + 584); *(_BYTE *)(*(_QWORD *)(a1 + 704) + 560LL) = 0; LoadingCircle::show(*(cocos2d::CCNode ***)(a1 + 704)); v58 = *(_QWORD *)(*(_QWORD *)(a1 + 704) + 544LL); v59 = *(void (__fastcall **)(__int64, GameLevelManager **))(*(_QWORD *)v58 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v92, *(float *)&v90 * 0.5, *((float *)&v90 + 1) * 0.5); v59(v58, v92); (*(void (__fastcall **)(_QWORD, float))(**(_QWORD **)(*(_QWORD *)(a1 + 704) + 544LL) + 160LL))( *(_QWORD *)(*(_QWORD *)(a1 + 704) + 544LL), 0.5); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 704) + 344LL))(*(_QWORD *)(a1 + 704), 0); clock_gettime(0, (struct timespec *)v92); v60 = (double)(__int64)v92[0] + (double)(__int64)v92[1] / 1000000000.0; v61 = (unsigned int *)GameLevelManager::sharedState(v92[0]); DailyTimer = (GameLevelManager *)GameLevelManager::getDailyTimer(v61, *(_DWORD *)(a1 + 732)); if ( (double)(int)DailyTimer < v60 ) { v63 = (_DWORD *)GameLevelManager::sharedState(DailyTimer); DailyTimer = (GameLevelManager *)GameLevelManager::resetDailyLevelState(v63, *(_DWORD *)(a1 + 732)); } v64 = (unsigned int *)GameLevelManager::sharedState(DailyTimer); ActiveDailyID = (GameStatsManager *)GameLevelManager::getActiveDailyID(v64, *(_DWORD *)(a1 + 732)); v66 = (unsigned int)ActiveDailyID; if ( (int)ActiveDailyID > 0 ) { v67 = (GameStatsManager *)GameStatsManager::sharedState(ActiveDailyID); hasCompletedDailyLevel = GameStatsManager::hasCompletedDailyLevel(v67, (const char *)v66); if ( hasCompletedDailyLevel ) { SavedDailyLevel = nullptr; } else { v69 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)hasCompletedDailyLevel); SavedDailyLevel = (GJGameLevel *)GameLevelManager::getSavedDailyLevel(v69, (const char *)v66); } ActiveDailyID = (GameStatsManager *)DailyLevelPage::createDailyNode( (DailyLevelPage *)a1, SavedDailyLevel, 1u, 0.0, 0); } v71 = (_DWORD *)GameLevelManager::sharedState(ActiveDailyID); if ( GameLevelManager::hasDailyStateBeenLoaded(v71, *(_DWORD *)(a1 + 732)) ) { v74 = (GameLevelManager *)(*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1352LL))( a1, *(unsigned int *)(a1 + 732)); } else { v72 = (GameLevelManager *)*(unsigned int *)(a1 + 732); if ( (_DWORD)v72 != 2 ) { (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 688) + 344LL))(*(_QWORD *)(a1 + 688), 0); v72 = (GameLevelManager *)(*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 696) + 344LL))( *(_QWORD *)(a1 + 696), 1); } v73 = (GameLevelManager *)GameLevelManager::sharedState(v72); GameLevelManager::getGJDailyLevelState(v73, *(_DWORD *)(a1 + 732)); v74 = *(GameLevelManager **)(a1 + 720); if ( !v74 ) v74 = (GameLevelManager *)(*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 704) + 344LL))( *(_QWORD *)(a1 + 704), 1); } v75 = (GameLevelManager *)GameLevelManager::sharedState(v74); *((_QWORD *)v75 + 179) = a1 + 672; v76 = GameLevelManager::sharedState(v75); v77 = v97[0]; *(_QWORD *)(v76 + 1232) = a1 + 680; if ( (v77 & 1) != 0 ) operator delete(v98); if ( (v95[0] & 1) != 0 ) operator delete(v96); if ( ((__int64)v93[0] & 1) != 0 ) operator delete(v94); } return v5; }
GD Web Decomp Icon

GD Web Decomp

Raw Source