// // DailyLevelNode::init from 0x100216e40 to 0x100217919 (2777 bytes) // // 1 xrefs: // > DailyLevelNode::create @ 0x10021669b // // 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 12:27:00 +0000 // __int64 __fastcall DailyLevelNode::init(__int64 a1, __int64 a2, __int64 a3, char a4) { __int64 v8; // rax __int64 v9; // rax int v10; // eax const std::string::value_type *v11; // rsi __int64 v12; // rax bool v13; // r15 std::string::pointer data; // rbx __int64 v15; // r13 __int64 v16; // r13 std::string::pointer v17; // rdi __int64 v18; // rax __int64 v19; // rbx __int64 v20; // r12 __int64 v21; // rbx __int64 v22; // rbx __int64 v23; // r12 __int64 v24; // rsi double v25; // xmm0_8 __int64 v26; // r12 __int64 v27; // rax __int64 v28; // rbx __int64 v29; // rax __int64 CString; // rax __int64 v31; // r15 __int64 v32; // rbx __int64 v33; // rax __int64 v34; // rax __int64 v35; // rbx __int64 v36; // r15 _QWORD *v37; // r12 __int64 v38; // rbx __int64 v39; // r12 __int64 v40; // rax __int64 v41; // rax __int64 v42; // rax __int64 v43; // r13 float v44; // xmm0_4 __int64 v45; // rbx __int64 v46; // r14 float v47; // xmm0_4 std::string v49; // [rsp+0h] [rbp-A0h] BYREF float v50; // [rsp+20h] [rbp-80h] float v51; // [rsp+24h] [rbp-7Ch] float v52; // [rsp+28h] [rbp-78h] float v53; // [rsp+2Ch] [rbp-74h] std::string v54; // [rsp+30h] [rbp-70h] BYREF float v55[3]; // [rsp+48h] [rbp-58h] _BYTE v56[8]; // [rsp+54h] [rbp-4Ch] BYREF float CellHeight; // [rsp+5Ch] [rbp-44h] unsigned __int8 v58; // [rsp+63h] [rbp-3Dh] float v59; // [rsp+64h] [rbp-3Ch] __int16 v60; // [rsp+68h] [rbp-38h] BYREF char v61; // [rsp+6Ah] [rbp-36h] v58 = cocos2d::CCNode::init(a1); if ( v58 ) { v8 = cocos2d::CCDirector::sharedDirector(a1, a2); v9 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v8 + 160LL))(v8); cocos2d::CCTouchDispatcher::registerForcePrio(v9, a1, 2, 0); if ( a2 ) { *(_QWORD *)(a1 + 328) = a2; cocos2d::CCObject::retain(a2); } *(_QWORD *)(a1 + 336) = a3; memset(&v54, 0, sizeof(v54)); memset(&v49, 0, sizeof(v49)); v10 = *(_DWORD *)(a3 + 732); if ( v10 == 2 ) { std::string::assign(&v54, "GJ_square04.png"); v11 = "gj_eventCrown_001.png"; } else if ( v10 == 1 ) { std::string::assign(&v54, "GJ_square05.png"); v11 = "gj_weeklyCrown_001.png"; } else { std::string::assign(&v54, "GJ_square02.png"); v11 = "gj_dailyCrown_001.png"; } std::string::assign(&v49, v11); *(_QWORD *)v55 = a2; v12 = *(_QWORD *)(a1 + 328); if ( v12 ) v13 = *(_DWORD *)(v12 + 864) - *(_DWORD *)(v12 + 868) >= 100; else v13 = 0; CellHeight = CustomListView::getCellHeight(4); if ( v13 ) { data = "GJ_square03.png"; } else if ( (*(_BYTE *)&v54.__r_.__value_.__s.0 & 1) != 0 ) { data = v54.__r_.__value_.__l.__data_; } else { data = v54.__r_.__value_.__s.__data_; } sub_100278270(&v60, 0.0, 0.0, COERCE_DOUBLE(1117782016), COERCE_DOUBLE(1117782016)); v15 = cocos2d::extension::CCScale9Sprite::create_2(data, &v60); if ( !v13 && *(_DWORD *)(*(_QWORD *)(a1 + 336) + 732LL) == 1 ) { v61 = -81; v60 = -20561; (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v15 + 960LL))(v15, &v60); } v59 = CellHeight + 26.0; sub_100278260( &v60, COERCE_DOUBLE(1136525312), COERCE_DOUBLE((unsigned __int64)COERCE_UNSIGNED_INT(CellHeight + 26.0))); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v15 + 320LL))(v15, &v60); sub_100278250(&v60, 0.0, 0.0); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v15 + 184LL))(v15, &v60); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v15, 1); if ( *(_QWORD *)(a1 + 328) ) { v16 = LevelCell::create(360.0, CellHeight); *(_BYTE *)(v16 + 570) = 1; LevelCell::loadFromLevel(v16, *(_QWORD *)v55); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v16, 2); sub_100278250(&v60, -180.0, (float)(CellHeight * -0.5) + -2.0); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v16 + 184LL))(v16, &v60); if ( (*(_BYTE *)&v49.__r_.__value_.__s.0 & 1) != 0 ) v17 = v49.__r_.__value_.__l.__data_; else v17 = v49.__r_.__value_.__s.__data_; v19 = cocos2d::CCSprite::createWithSpriteFrameName(v17); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v19, 2); v59 = v59 * 0.5; sub_100278250(&v60, 0.0, (float)(v59 + 0.0) + 12.0); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v19 + 184LL))(v19, &v60); if ( a4 ) { v20 = cocos2d::CCLabelBMFont::create_3("New!", "goldFont.fnt"); sub_100278250(&v60, 1.0, 1.0); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v20 + 296LL))(v20, &v60); sub_100278250(&v60, 182.0, v59 + -5.0); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v20 + 184LL))(v20, &v60); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v20 + 160LL))(v20, 0.60000002); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v20, 3); } if ( v13 ) { v21 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_rewardBtn_001.png"); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v21 + 160LL))(v21, 1.0); v22 = CCMenuItemSpriteExtra::create(v21, 0, a1, DailyLevelNode::onClaimReward, 0); CCMenuItemSpriteExtra::setSizeMult(v22, 1.1); v23 = cocos2d::CCMenu::createWithItem(v22); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v23, 10); sub_100278250(&v60, 150.0, -2.0); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v23 + 184LL))(v23, &v60); v24 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v23 + 192LL))(v23); v25 = sub_100278300(a1 + 352, v24); v26 = *(_QWORD *)(v16 + 552); if ( v26 ) { v27 = (*(__int64 (__fastcall **)(_QWORD, double))(*(_QWORD *)v26 + 1072LL))(*(_QWORD *)(v16 + 552), v25); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v27 + 160LL))(v27, 0.40000001); v28 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v26 + 192LL))(v26); sub_100278250(v56, -55.0, 0.0); sub_100278350(&v60, v28, v56); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v26 + 184LL))(v26, &v60); } } if ( *(_QWORD *)(a1 + 328) ) { v29 = sub_10088E820("#%i", *(_BYTE *)&v49.__r_.__value_.__l.0); CString = cocos2d::CCString::getCString(v29); v31 = cocos2d::CCLabelBMFont::create_3(CString, "chatFont.fnt"); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v31 + 1072LL))(v31, &unk_100A062B0); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v31 + 1024LL))(v31, 150); sub_100278250(&v60, 1.0, 0.0); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v31 + 296LL))(v31, &v60); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v31 + 160LL))(v31, 0.60000002); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v31, 3); sub_100278250(&v60, 183.0, 7.0 - v59); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v31 + 184LL))(v31, &v60); } v32 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteBtn_001.png"); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v32 + 160LL))(v32, 0.69999999); v33 = CCMenuItemSpriteExtra::create(v32, 0, a1, DailyLevelNode::onSkipLevel, 0); v34 = cocos2d::CCMenu::createWithItem(v33); *(_QWORD *)(a1 + 360) = v34; (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v34, 10); v35 = *(_QWORD *)(a1 + 360); sub_100278250(&v60, -186.0, v59 + -4.0); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v35 + 184LL))(v35, &v60); (*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 360) + 344LL))(*(_QWORD *)(a1 + 360), 0); v36 = cocos2d::CCLabelBMFont::create_3("Bonus:", "goldFont.fnt"); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v36, 10); sub_100278250(&v60, 1.0, 0.5); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v36 + 296LL))(v36, &v60); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v36 + 160LL))(v36, 0.60000002); if ( (unsigned int)(*(_DWORD *)(*(_QWORD *)(a1 + 336) + 732LL) - 1) > 1 ) { v39 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigDiamond_001.png"); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v39, 10); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v39 + 160LL))(v39, 0.80000001); v40 = GameStatsManager::sharedState(); GameStatsManager::getBonusDiamonds( (__m128)0x3F4CCCCDu, v40, *(_DWORD *)(*(_QWORD *)(a1 + 328) + 948LL) - *(_DWORD *)(*(_QWORD *)(a1 + 328) + 952LL)); v41 = sub_10088E820("%ix", *(_BYTE *)&v49.__r_.__value_.__l.0); v42 = cocos2d::CCString::getCString(v41); v43 = cocos2d::CCLabelBMFont::create_3(v42, "bigFont.fnt"); (*(void (__fastcall **)(__int64, __int64, __int64))(*(_QWORD *)a1 + 464LL))(a1, v43, 10); sub_100278250(&v60, 1.0, 0.5); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v43 + 296LL))(v43, &v60); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v43 + 160LL))(v43, 0.60000002); v59 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 328LL))(v39); CellHeight = (*(float (__fastcall **)(__int64))(*(_QWORD *)v39 + 168LL))(v39); v55[0] = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v43 + 328LL))(v43); v50 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v43 + 168LL))(v43); v51 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v36 + 328LL))(v36); v52 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v36 + 168LL))(v36); v53 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 328LL))(v39); v44 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v39 + 168LL))(v39); sub_100278250( &v60, (float)((float)(v44 * v53) * -0.5) + (float)((float)((float)((float)(v51 * v52) + (float)((float)(v59 * CellHeight) + (float)(v55[0] * v50))) + 25.0) * 0.5), -84.0); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v39 + 184LL))(v39, &v60); v45 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 192LL))(v39); sub_100278250(v56, -20.0, 0.0); sub_100278350(&v60, v45, v56); (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v43 + 184LL))(v43, &v60); v46 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v43 + 192LL))(v43); v59 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v43 + 328LL))(v43); v47 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v43 + 168LL))(v43); sub_100278250(v56, -5.0 - (float)(v59 * v47), 0.0); sub_100278350(&v60, v46, v56); } else { v37 = GJChestSprite::create(3); (*(void (__fastcall **)(__int64, _QWORD *, __int64))(*(_QWORD *)a1 + 464LL))(a1, v37, 10); (*(void (__fastcall **)(_QWORD *, float))(*v37 + 160LL))(v37, 0.30000001); sub_100278250(&v60, 30.0, -84.0); (*(void (__fastcall **)(_QWORD *, __int16 *))(*v37 + 184LL))(v37, &v60); v38 = (*(__int64 (__fastcall **)(_QWORD *))(*v37 + 192LL))(v37); sub_100278250(v56, -25.0, 0.0); sub_100278350(&v60, v38, v56); } (*(void (__fastcall **)(__int64, __int16 *))(*(_QWORD *)v36 + 184LL))(v36, &v60); } else { (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v15 + 960LL))(v15, &unk_100A062B0); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v15 + 912LL))(v15, 75); v18 = cocos2d::CCLabelBMFont::create_3("00:00:00", "bigFont.fnt"); *(_QWORD *)(a1 + 344) = v18; (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v18 + 160LL))(v18, 0.5); (*(void (__fastcall **)(__int64, _QWORD, __int64))(*(_QWORD *)a1 + 464LL))(a1, *(_QWORD *)(a1 + 344), 3); *(_BYTE *)(a1 + 369) = 1; } if ( (*(_BYTE *)&v49.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v49.__r_.__value_.__l.__data_); if ( (*(_BYTE *)&v54.__r_.__value_.__s.0 & 1) != 0 ) operator delete(v54.__r_.__value_.__l.__data_); } return v58; }