// // DailyRecallUnlockPopup::init from 0x74280c to 0x742eda (1742 bytes) // // 1 xrefs: // > DailyRecallUnlockPopup::create @ 0x743038 // // 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:58:39 +0000 // GameManager *__fastcall DailyRecallUnlockPopup::init(cocos2d::CCMenu **this, FLAlertLayerProtocol *a2, GJGameLevel *a3) { cocos2d::CCMenu *v6; // r3 GameStatsManager *v7; // r5 int v8; // r1 cocos2d::CCDirector *v9; // r0 cocos2d::CCDirector *v10; // r9 char *v11; // r7 const char *v12; // r10 const char *v13; // r8 float v14; // s16 float v15; // s17 float v16; // s16 float v17; // s17 int v18; // r0 int v19; // r11 void (__fastcall *v20)(int, _DWORD *); // r2 void (__fastcall *v21)(int, _DWORD *); // r10 void (__fastcall *v22)(int, _DWORD *); // r10 const char *v23; // r1 int v24; // r10 void (__fastcall *v25)(int, _DWORD *); // r7 const char *v26; // r2 int v27; // r7 void (__fastcall *v28)(int, _DWORD *); // r11 float v29; // s18 void (__fastcall *v30)(int, _DWORD *); // r11 GameStatsManager *v31; // r0 GameStatsManager *v32; // r0 const char *Stat; // r0 cocos2d::CCString *v34; // r0 cocos2d::CCLabelBMFont *CString; // r0 const char *v36; // r2 int v37; // r10 void (__fastcall *v38)(int, _DWORD *); // r7 void (__fastcall *v39)(int, _DWORD *); // r7 const char *v40; // r1 int v41; // r7 int v42; // r11 const char *v43; // r3 const char *v44; // r2 int v45; // r6 cocos2d::CCString *v46; // r0 const char *v47; // r0 const char *v48; // r7 size_t v49; // r0 int v50; // r9 void (__fastcall *v51)(int, _DWORD *); // r8 cocos2d::CCString *v52; // r0 cocos2d::CCLabelBMFont *v53; // r0 const char *v54; // r2 int v55; // r5 void (__fastcall *v56)(int, _DWORD *); // r6 void (__fastcall *v57)(int, _DWORD *); // r6 float v58; // s17 cocos2d::CCMenu *v59; // r0 cocos2d::CCMenu *v60; // r0 ButtonSprite *v61; // r0 int v62; // r6 ButtonSprite *v63; // r0 int v64; // r5 int v65; // r5 void (__fastcall *v66)(int, _BYTE *); // r6 int v67; // r8 const cocos2d::CCPoint *v68; // r6 void (__fastcall *v69)(int, _BYTE *); // r5 bool v71; // [sp+4h] [bp-88h] char *v72; // [sp+Ch] [bp-80h] GameManager *v73; // [sp+10h] [bp-7Ch] void (__fastcall *v74)(int, _DWORD *); // [sp+14h] [bp-78h] float v75[2]; // [sp+24h] [bp-68h] BYREF _BYTE v76[8]; // [sp+2Ch] [bp-60h] BYREF _BYTE v77[8]; // [sp+34h] [bp-58h] BYREF _DWORD v78[2]; // [sp+3Ch] [bp-50h] BYREF int v79; // [sp+44h] [bp-48h] BYREF size_t v80; // [sp+48h] [bp-44h] const void *v81; // [sp+4Ch] [bp-40h] int v82; // [sp+50h] [bp-3Ch] BYREF size_t v83; // [sp+54h] [bp-38h] const void *v84; // [sp+58h] [bp-34h] int v85[3]; // [sp+5Ch] [bp-30h] BYREF int v86[3]; // [sp+68h] [bp-24h] BYREF _DWORD v87[4]; // [sp+74h] [bp-18h] BYREF v73 = FLAlertLayer::init((FLAlertLayer *)this, 150); if ( v73 ) { v6 = *this; *(this + 112) = a2; (*((void (__fastcall **)(cocos2d::CCMenu **, int))v6 + 136))(this, 1); v7 = (GameStatsManager *)(*((_DWORD *)a3 + 186) - *((_DWORD *)a3 + 187)); v9 = (cocos2d::CCDirector *)GameStatsManager::dailyRecallPrice(v7, v8); v10 = v9; if ( (int)v7 > 200000 ) { v11 = "gj_eventCrown_001.png"; v12 = "GJ_square04.png"; v13 = "Event"; } else if ( (int)v7 > 100000 ) { v11 = "gj_weeklyCrown_001.png"; v12 = "GJ_square05.png"; v13 = "Weekly"; } else { v11 = "gj_dailyCrown_001.png"; v12 = "GJ_square02.png"; v13 = "Daily"; } cocos2d::CCDirector::sharedDirector(v9); cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v75); v14 = v75[0]; *(this + 127) = (cocos2d::CCMenu *)1136525312; v15 = v75[1]; *(this + 128) = (cocos2d::CCMenu *)1124859904; v16 = v14 * 0.5; v17 = v15 * 0.5; cocos2d::CCRect::CCRect((cocos2d::CCRect *)v87, 0.0, 0.0, 80.0, 80.0); v18 = cocos2d::extension::CCScale9Sprite::create(v12, v87); v19 = v18; if ( (unsigned int)v7 - 100001 <= 0x1869F ) { v20 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v18 + 480); LOWORD(v87[0]) = -20561; BYTE2(v87[0]) = -81; v20(v18, v87); } v21 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v19 + 160); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v87, 380.0, 140.0); v21(v19, v87); v22 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v19 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, v16, v17); v22(v19, v87); (*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v19, 1); v24 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)v11, v23); v25 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v24 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, v16, (float)(v17 + 70.0) + 12.0); v25(v24, v87); (*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v24, 2); v27 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Unlock", "goldFont.fnt", v26); v28 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, 0.5, 1.0); v28(v27, v87); (*(void (__fastcall **)(int, int))(*(_DWORD *)v27 + 80))(v27, 1063675494); v29 = (float)(v17 + 70.0) - 15.0; v30 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v27 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, v16, v29); v30(v27, v87); v31 = (GameStatsManager *)(*(int (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))( *(this + 115), v27, 3); v32 = (GameStatsManager *)GameStatsManager::sharedState(v31); Stat = (const char *)GameStatsManager::getStat(v32, "21"); v34 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i", Stat); CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v34); v37 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v36); v38 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v37 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, 1.0, 0.5); v38(v37, v87); (*(void (__fastcall **)(int, int))(*(_DWORD *)v37 + 80))(v37, 1059481190); v39 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v37 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, (float)(v16 + 190.0) - 40.0, (float)(v17 + 70.0) - 16.0); v39(v37, v87); (*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v37, 3); v41 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_bigKey_001.png", v40); (*(void (__fastcall **)(int, int))(*(_DWORD *)v41 + 80))(v41, 1060320051); v74 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v41 + 92); v42 = (*(int (__fastcall **)(int))(*(_DWORD *)v37 + 96))(v37); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v78, 17.0, -1.5); cocos2d::CCPoint::operator+(v87, v42, v78); v74(v41, v87); (*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v41, 3); if ( v10 == (cocos2d::CCDirector *)((char *)&dword_0 + 1) ) v43 = "Demon Key"; else v43 = "Demon Keys"; if ( (int)v7 > 100000 ) v44 = "You get stars and the chest, nothing else."; else v44 = "You get stars only. No diamonds, no bonus."; v45 = 0; v46 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"Unlock this %s level for %i %s?\n%s", v13, v10, v43, v44); v47 = (const char *)cocos2d::CCString::getCString(v46); v79 = 0; v80 = 0; v81 = nullptr; v48 = v47; v49 = strlen(v47); std::string::__init(&v79, v48, v49); while ( 1 ) { v82 = 0; v83 = 0; v84 = nullptr; if ( (v79 & 1) != 0 ) { std::string::__init(&v82, v81, v80); } else { v82 = v79; v83 = v80; v84 = v81; } cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, 0.5, 0.5); v50 = TextArea::create( (int)&v82, "chatFont.fnt", 1065353216, 1135607808, (const cocos2d::CCPoint *)v87, 1101004800, 0, 0); std::string::~string((int)&v82); v51 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v50 + 92); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v87, v16 + (float)((float)v45 * 1.5), (float)(v17 + 4.0) - (float)((float)v45 * 1.5)); v51(v50, v87); if ( v45 ) { TextArea::colorAllLabels(v50, 0); (*(void (__fastcall **)(int, int))(*(_DWORD *)v50 + 456))(v50, 100); } (*(void (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v50, 3 - v45); if ( v45 ) break; v45 = 1; } if ( (int)v7 <= 200000 ) { if ( (int)v7 > 100000 ) v7 = (GameStatsManager *)((char *)v7 - 100000); v52 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"#%i", (const char *)v7); } else { v52 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"#%i", (const char *)v7 - 200000); } v53 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v52); v55 = cocos2d::CCLabelBMFont::create(v53, "chatFont.fnt", v54); (*(void (__fastcall **)(int, char *))(*(_DWORD *)v55 + 536))(v55, &byte_BF0698); (*(void (__fastcall **)(int, int))(*(_DWORD *)v55 + 512))(v55, 150); v56 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v55 + 148); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, 1.0, 0.0); v56(v55, v87); (*(void (__fastcall **)(int, int))(*(_DWORD *)v55 + 80))(v55, 1058642330); v57 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v55 + 92); v58 = v17 - 70.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v87, (float)(v16 + 190.0) - 7.0, v58 + 7.0); v57(v55, v87); v59 = (cocos2d::CCMenu *)(*(int (__fastcall **)(_DWORD, int, int))(*(_DWORD *)*(this + 115) + 232))( *(this + 115), v55, 3); v60 = (cocos2d::CCMenu *)cocos2d::CCMenu::create(v59); *(this + 111) = v60; (*(void (__fastcall **)(_DWORD, cocos2d::CCMenu *, int))(*(_DWORD *)*(this + 115) + 232))(*(this + 115), v60, 10); v61 = ButtonSprite::create( (ButtonSprite *)"Cancel", (const char *)&dword_58 + 2, 0, 1.0, 0.0, "goldFont.fnt", "GJ_button_04.png", v72); *(this + 120) = v61; v78[0] = FLAlertLayer::onButton; v78[1] = 0; v62 = CCMenuItemSpriteExtra::create((int)v61, 0, (int)this, (int)FLAlertLayer::onButton, 0); (*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v62 + 36))(v62, 0); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v62); v63 = ButtonSprite::create((ButtonSprite *)"Unlock", (const char *)&dword_58 + 2, 0, 1.0, 0.0, v71); *(this + 121) = v63; v87[0] = FLAlertLayer::onButton; v87[1] = 0; v64 = CCMenuItemSpriteExtra::create((int)v63, 0, (int)this, (int)FLAlertLayer::onButton, 0); (*(void (__fastcall **)(int, int))(*(_DWORD *)v64 + 36))(v64, 1); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v64); cocos2d::CCMenu::alignItemsHorizontallyWithPadding(*(this + 111), 15.0); v65 = (int)*(this + 111); v66 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v65 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v77, v16, v58 + 25.0); v66(v65, v77); memset(v85, 0, sizeof(v85)); std::string::__init(v85, "Recall", 6u); memset(v86, 0, sizeof(v86)); std::string::__init( v86, "Recalled levels give stars and count as completed dailies.\n" "No diamonds, no orbs, no daily bonus.\n" "Weekly and Event levels still give their chest.", 0xB0u); v67 = InfoAlertButton::create((char *)v85, (int)v86, 1057971241); std::string::~string((int)v86); std::string::~string((int)v85); (*(void (__fastcall **)(_DWORD, int))(*(_DWORD *)*(this + 111) + 228))(*(this + 111), v67); v68 = *(this + 111); v69 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v67 + 92); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v76, (float)(v16 - 190.0) + 18.0, v29); cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v77, v68); v69(v67, v77); std::string::~string((int)&v79); } return v73; }
GD Web Decomp Icon

GD Web Decomp

Raw Source