// // DailyRecallUnlockPopup::init from 0x140173c90 to 0x1401747de (2894 bytes) // // 2 xrefs: // > LevelBrowserLayer::cellPerformedAction @ 0x1403eaee5 // > @ 0x1409183e0 // // 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:27:32 +0000 // // Hidden C++ exception states: #wind=6 bool __fastcall DailyRecallUnlockPopup::init(__int64 a1, __int64 a2, __int64 a3) { bool result; // al __int64 v7; // rdx __int64 v8; // rcx int v9; // r13d int v10; // r14d const char *v11; // r12 const char *v12; // rbx __int128 *v13; // rdi __int64 v14; // rax float v15; // xmm7_4 float v16; // xmm9_4 __int64 v17; // rax __int64 v18; // rax __int64 *v19; // rsi __int64 v20; // rbx __int64 v21; // rax __int64 v22; // rbx __int64 v23; // rax struct cocos2d::CCSprite *v24; // rdi __int64 v25; // rbx __int64 v26; // rax struct cocos2d::CCLabelBMFont *v27; // rdi __int64 v28; // rbx __int64 v29; // rax __int64 v30; // rbx __int64 v31; // rax __int64 v32; // rcx unsigned int Stat; // eax cocos2d::CCString *v34; // rax const char *CString; // rax struct cocos2d::CCLabelBMFont *v36; // rsi __int64 v37; // rbx __int64 v38; // rax __int64 v39; // rbx __int64 v40; // rax struct cocos2d::CCSprite *v41; // rdi __int64 v42; // rax __int64 v43; // rbx __int64 v44; // rax const char *v45; // rax const char *v46; // r9 cocos2d::CCString *v47; // rax const char *v48; // rax size_t v49; // r8 int i; // esi __int64 v51; // rbx const struct cocos2d::CCPoint *v52; // rax char *v53; // r14 __int64 v54; // rbx __int64 v55; // rax cocos2d::CCArray *v56; // rdi unsigned int j; // ebx __int64 v58; // rdx struct cocos2d::CCObject *v59; // rax cocos2d::CCString *v60; // rax const char *v61; // rax struct cocos2d::CCLabelBMFont *v62; // rdi __int64 v63; // rdx void (__fastcall *v64)(char *, __int64); // r8 __int64 v65; // rbx __int64 v66; // rax __int64 v67; // rbx float v68; // xmm9_4 __int64 v69; // rax __int64 v70; // rax __int64 *v71; // rdi __int64 *v72; // rax cocos2d::CCObject *v73; // rbx __int64 *v74; // rdi __int64 *v75; // rax cocos2d::CCObject *v76; // rbx __int64 v77; // rdi __int64 v78; // rbx __int64 v79; // rax __int64 *v80; // rsi __int64 v81; // rdi __int64 v82; // rbx __int64 v83; // rax __int64 v84; // rax __int16 v85; // [rsp+48h] [rbp-C0h] BYREF char v86; // [rsp+4Ah] [rbp-BEh] void *v87; // [rsp+58h] [rbp-B0h] BYREF __int64 v88[2]; // [rsp+60h] [rbp-A8h] BYREF float v89; // [rsp+70h] [rbp-98h] float v90[2]; // [rsp+78h] [rbp-90h] BYREF __int128 *v91; // [rsp+80h] [rbp-88h] BYREF __int128 v92; // [rsp+88h] [rbp-80h] BYREF __int64 v93; // [rsp+98h] [rbp-70h] __int64 v94; // [rsp+A0h] [rbp-68h] __int128 v95; // [rsp+A8h] [rbp-60h] BYREF __int64 v96; // [rsp+B8h] [rbp-50h] __int64 v97; // [rsp+C0h] [rbp-48h] __int128 v98; // [rsp+C8h] [rbp-40h] BYREF __int64 v99; // [rsp+D8h] [rbp-30h] __int64 v100; // [rsp+E0h] [rbp-28h] result = FLAlertLayer::init_1(a1, 150); if ( result ) { *(_QWORD *)(a1 + 560) = a2; LOBYTE(v7) = 1; (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)a1 + 1008LL))(a1, v7); v9 = *(_DWORD *)(a3 + 992) - *(_DWORD *)(a3 + 996); if ( v9 <= 200000 ) { if ( v9 <= 100000 ) { v10 = 1; v11 = "Daily"; v12 = "GJ_square02.png"; v13 = &xmmword_140745380; } else { v10 = 3; v11 = "Weekly"; v12 = "GJ_square05.png"; v13 = &xmmword_140745458; } } else { v10 = 5; v11 = "Event"; v12 = (const char *)&qword_140745420; v13 = &xmmword_140745430; } v14 = cocos2d::CCDirector::sharedDirector(v8); cocos2d::CCDirector::getWinSize(v14, v90); v15 = v90[0] * 0.5; v16 = v90[1] * 0.5; *(_DWORD *)(a1 + 648) = 1136525312; *(_DWORD *)(a1 + 652) = 1124859904; cocos2d::CCRect::CCRect((cocos2d::CCRect *)v88, 0.0, 0.0, 80.0, 80.0); v18 = cocos2d::extension::CCScale9Sprite::create(v12, v17); v19 = (__int64 *)v18; if ( (unsigned int)(v9 - 100001) <= 0x1869F ) { v85 = -20561; v86 = -81; (**(void (__fastcall ***)(__int64, __int16 *))(v18 + 320))(v18 + 320, &v85); } v20 = *v19; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v87, 380.0, 140.0); (*(void (__fastcall **)(__int64 *, __int64))(v20 + 312))(v19, v21); v22 = *v19; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, v15, v16); (*(void (__fastcall **)(__int64 *, __int64))(v22 + 184))(v19, v23); (*(void (__fastcall **)(_QWORD, __int64 *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v19, 1); v24 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)v13); v25 = *(_QWORD *)v24; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, v15, (float)(v16 + 70.0) + 12.0); (*(void (__fastcall **)(struct cocos2d::CCSprite *, __int64))(v25 + 184))(v24, v26); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v24, 2); v27 = cocos2d::CCLabelBMFont::create("Unlock", "goldFont.fnt"); v28 = *(_QWORD *)v27; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, 0.5, 1.0); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v28 + 288))(v27, v29); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v27 + 160LL))(v27); v30 = *(_QWORD *)v27; v89 = (float)(v16 + 70.0) - 15.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, v15, v89); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v30 + 184))(v27, v31); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v27, 3); v32 = qword_14090BFE0; if ( !qword_14090BFE0 ) { v87 = operator new(0x3E8u); qword_14090BFE0 = sub_1402D6480(v87); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFE0 + 72LL))(qword_14090BFE0); v32 = qword_14090BFE0; } Stat = GameStatsManager::getStat(v32, &word_140737620); v34 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, Stat); CString = cocos2d::CCString::getCString(v34); v36 = cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt"); v37 = *(_QWORD *)v36; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, 1.0, 0.5); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v37 + 288))(v36, v38); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v36 + 160LL))(v36); v39 = *(_QWORD *)v36; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, (float)(v15 + 190.0) - 40.0, (float)(v16 + 70.0) - 16.0); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v39 + 184))(v36, v40); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v36, 3); v41 = cocos2d::CCSprite::createWithSpriteFrameName((const char *)&xmmword_140737F28); (*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v41 + 160LL))(v41); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v91, 17.0, -1.5); v43 = v42; v44 = (*(__int64 (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v36 + 200LL))(v36); cocos2d::CCPoint::operator+(v44, &v87, v43); (*(void (__fastcall **)(struct cocos2d::CCSprite *, void **))(*(_QWORD *)v41 + 184LL))(v41, &v87); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCSprite *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v41, 3); v45 = "You get stars only. No diamonds, no bonus."; if ( v9 > 100000 ) v45 = "You get stars and the chest, nothing else."; v46 = "Demon Keys"; if ( v10 == 1 ) v46 = "Demon Key"; v47 = cocos2d::CCString::createWithFormat("Unlock this %s level for %i %s?\n%s", v11, v10, v46, v45); v48 = cocos2d::CCString::getCString(v47); v98 = 0; v99 = 0; v100 = 0; v49 = -1; do ++v49; while ( v48[v49] ); sub_14003D230(&v98, v48, v49); for ( i = 0; i < 2; ++i ) { v91 = &v92; v51 = sub_14003F4F0((__int64)&v92, (__int64)&v98); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v87, 0.5, 0.5); v53 = TextArea::create(v51, "chatFont.fnt", 1.0, 352.0, v52, 1101004800, 0, 0); v54 = *(_QWORD *)v53; cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v88, (float)((float)i * 1.5) + v15, (float)(v16 + 4.0) - (float)((float)i * 1.5)); (*(void (__fastcall **)(char *, __int64))(v54 + 184))(v53, v55); if ( i == 1 ) { v85 = 0; v86 = 0; v56 = *(cocos2d::CCArray **)(*((_QWORD *)v53 + 77) + 648LL); for ( j = 0; j < cocos2d::CCArray::count(v56); ++j ) { v59 = cocos2d::CCArray::objectAtIndex(v56, j); (**((void (__fastcall ***)(__int64, __int16 *))v59 + 46))((__int64)v59 + 368, &v85); } LOBYTE(v58) = 100; (*(void (__fastcall **)(char *, __int64))(*((_QWORD *)v53 + 40) + 40LL))(v53 + 320, v58); } (*(void (__fastcall **)(_QWORD, char *, _QWORD))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v53, (unsigned int)(3 - i)); } if ( v9 <= 200000 ) { if ( v9 > 100000 ) v9 -= 100000; } else { v9 -= 200000; } v60 = cocos2d::CCString::createWithFormat("#%i", v9); v61 = cocos2d::CCString::getCString(v60); v62 = cocos2d::CCLabelBMFont::create(v61, "chatFont.fnt"); (**((void (__fastcall ***)(__int64, __int16 *))v62 + 46))((__int64)v62 + 368, &word_140702F8C); v63 = *((_QWORD *)v62 + 46); v64 = *(void (__fastcall **)(char *, __int64))(v63 + 40); LOBYTE(v63) = -106; v64((char *)v62 + 368, v63); v65 = *(_QWORD *)v62; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, 1.0, 0.0); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v65 + 288))(v62, v66); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v62 + 160LL))(v62); v67 = *(_QWORD *)v62; v68 = v16 - 70.0; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, (float)(v15 + 190.0) - 7.0, v68 + 7.0); (*(void (__fastcall **)(struct cocos2d::CCLabelBMFont *, __int64))(v67 + 184))(v62, v69); (*(void (__fastcall **)(_QWORD, struct cocos2d::CCLabelBMFont *, __int64))(**(_QWORD **)(a1 + 584) + 456LL))( *(_QWORD *)(a1 + 584), v62, 3); v70 = cocos2d::CCMenu::create(); *(_QWORD *)(a1 + 552) = v70; (*(void (__fastcall **)(_QWORD, __int64, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(*(_QWORD *)(a1 + 584), v70, 10); v71 = (__int64 *)ButtonSprite::create_1( (int)"Cancel", 90, 0, 1.0, 0, (__int64)"goldFont.fnt", (__int64)"GJ_button_04.png", 0); *(_QWORD *)(a1 + 608) = v71; v88[0] = (__int64)operator new(0x208u); v72 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v88[0]); v73 = (cocos2d::CCObject *)v72; if ( v72 ) { if ( CCMenuItemSpriteExtra::init(v72, v71, 0, a1, (__int64)FLAlertLayer::onButton) ) { cocos2d::CCObject::autorelease(v73); goto LABEL_32; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v73 + 8LL))(v73, 1); } v73 = nullptr; LABEL_32: (*(void (__fastcall **)(cocos2d::CCObject *, _QWORD))(*(_QWORD *)v73 + 64LL))(v73, 0); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v73); v74 = (__int64 *)ButtonSprite::create_1( (int)"Unlock", 90, 0, 1.0, 0, (__int64)"goldFont.fnt", (__int64)"GJ_button_01.png", 0); *(_QWORD *)(a1 + 616) = v74; v88[0] = (__int64)operator new(0x208u); v75 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra(v88[0]); v76 = (cocos2d::CCObject *)v75; if ( v75 ) { if ( CCMenuItemSpriteExtra::init(v75, v74, 0, a1, (__int64)FLAlertLayer::onButton) ) { cocos2d::CCObject::autorelease(v76); LABEL_37: (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v76 + 64LL))(v76, 1); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))( *(_QWORD *)(a1 + 552), v76); cocos2d::CCMenu::alignItemsHorizontallyWithPadding(*(cocos2d::CCMenu **)(a1 + 552), 15.0); v77 = **(_QWORD **)(a1 + 552); v78 = *(_QWORD *)(a1 + 552); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, v15, v68 + 25.0); (*(void (__fastcall **)(__int64, __int64))(v77 + 184))(v78, v79); v88[0] = (__int64)&v95; v95 = 0; v96 = 0; v97 = 0; *(_QWORD *)&v95 = sub_14003D460(0xC0u); v96 = 176; v97 = 191; strcpy( (char *)v95, "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."); v92 = 0; v93 = 6; v94 = 15; strcpy((char *)&v92, "Recall"); v80 = (__int64 *)InfoAlertButton::create(&v92, &v95); (*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v80); v81 = *v80; v82 = *(_QWORD *)(a1 + 552); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v88, (float)(v15 - 190.0) + 18.0, v89); cocos2d::CCNode::convertToNodeSpace(v82, &v91, v83); (*(void (__fastcall **)(__int64 *, __int64))(v81 + 184))(v80, v84); sub_14003D310((__int64)&v98); return 1; } (*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v76 + 8LL))(v76, 1); } v76 = nullptr; goto LABEL_37; } return result; }