// // DailyLevelNode::init from 0x100250a9c to 0x10025157c (2784 bytes) // // 1 xrefs: // > DailyLevelNode::create @ 0x1002504e0 // // 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 11:01:31 +0000 // __int64 __fastcall DailyLevelNode::init(_QWORD *a1, __int64 a2, __int64 a3, int a4) { __int64 v8; // x19 __int64 v9; // x0 __int64 v10; // x0 int v11; // w8 const std::string::value_type *v12; // x1 __int64 v13; // x8 _BOOL4 v14; // w25 float v15; // s8 int v16; // w24 std::string::size_type v17; // x23 std::string *v18; // x8 const char *v19; // x0 __int64 v20; // x0 __int64 v21; // x23 float v22; // s9 _BYTE *v23; // x23 std::string *v24; // x0 __int64 v25; // x24 float v26; // s8 __int64 v27; // x22 __int64 v28; // x22 __int64 v29; // x22 __int64 v30; // x22 double *v31; // x0 double v32; // d0 __int64 v33; // x22 __int64 v34; // x0 float32x2_t *v35; // x23 double v36; // d0 int v37; // w8 int v38; // w10 int v39; // w8 __int64 v40; // x0 __int64 CString; // x0 __int64 v42; // x21 __int64 v43; // x21 __int64 v44; // x0 __int64 v45; // x21 __int64 v46; // x21 __int64 v47; // x22 float32x2_t *v48; // x20 double v49; // d0 __int64 v50; // x0 __int64 v51; // x22 __int64 v52; // x0 __int64 v53; // x0 int BonusDiamonds; // w0 __int64 v55; // x0 __int64 v56; // x0 __int64 v57; // x23 float v58; // s11 float v59; // s8 float v60; // s12 float v61; // s9 float v62; // s13 float v63; // s10 float v64; // s14 float v65; // s0 float32x2_t *v66; // x20 double v67; // d0 float v68; // s8 float v69; // s0 float32x2_t v71; // [xsp+8h] [xbp-C8h] BYREF float32x2_t v72[2]; // [xsp+10h] [xbp-C0h] BYREF std::string v73; // [xsp+20h] [xbp-B0h] BYREF std::string v74; // [xsp+38h] [xbp-98h] BYREF v8 = cocos2d::CCNode::init(a1); if ( (_DWORD)v8 ) { v9 = cocos2d::CCDirector::sharedDirector(); v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 160LL))(v9); cocos2d::CCTouchDispatcher::registerForcePrio(v10, (__int64)a1, 2, 0); if ( a2 ) { a1[41] = a2; cocos2d::CCObject::retain(a2); } a1[42] = a3; memset(&v74, 0, sizeof(v74)); memset(&v73, 0, sizeof(v73)); v11 = *(_DWORD *)(a3 + 732); if ( v11 == 2 ) { std::string::assign(&v74, "GJ_square04.png"); v12 = "gj_eventCrown_001.png"; } else if ( v11 == 1 ) { std::string::assign(&v74, "GJ_square05.png"); v12 = "gj_weeklyCrown_001.png"; } else { std::string::assign(&v74, "GJ_square02.png"); v12 = "gj_dailyCrown_001.png"; } std::string::assign(&v73, v12); v13 = a1[41]; if ( v13 ) v14 = *(_DWORD *)(v13 + 864) - *(_DWORD *)(v13 + 868) > 99; else v14 = 0; v15 = sub_100125E38(4); v16 = SHIBYTE(v74.__r_.__value_.__r.__words[2]); v17 = v74.__r_.__value_.__r.__words[0]; sub_1000262CC((float *)v72, 0.0, 0.0, 80.0, 80.0); v18 = &v74; if ( v16 < 0 ) v18 = (std::string *)v17; if ( v14 ) v19 = "GJ_square03.png"; else v19 = (const char *)v18; v20 = cocos2d::extension::CCScale9Sprite::create(v19, v72); v21 = v20; if ( *(_DWORD *)(a1[42] + 732LL) == 1 && !v14 ) { v72[0].i8[2] = -81; v72[0].i16[0] = -20561; (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v20 + 960LL))(v20, v72); } v22 = v15 + 26.0; sub_1000262C4((float *)v72, 380.0, v15 + 26.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v21 + 320LL))(v21, v72); sub_1000262BC((float *)v72, 0.0, 0.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v21 + 184LL))(v21, v72); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v21, 1); if ( a1[41] ) { v23 = LevelCell::create(360.0, v15); v23[570] = 1; LevelCell::loadFromLevel((__int64)v23, a2); (*(void (__fastcall **)(_QWORD *, _BYTE *, __int64))(*a1 + 464LL))(a1, v23, 2); sub_1000262BC((float *)v72, -180.0, (float)(v15 * -0.5) + -2.0); (*(void (__fastcall **)(_BYTE *, float32x2_t *))(*(_QWORD *)v23 + 184LL))(v23, v72); if ( (v73.__r_.__value_.__r.__words[2] & 0x8000000000000000LL) == 0LL ) v24 = &v73; else v24 = (std::string *)v73.__r_.__value_.__r.__words[0]; v25 = cocos2d::CCSprite::createWithSpriteFrameName(v24); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v25, 2); v26 = v22 * 0.5; sub_1000262BC((float *)v72, 0.0, (float)((float)(v22 * 0.5) + 0.0) + 12.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v25 + 184LL))(v25, v72); if ( a4 ) { v27 = cocos2d::CCLabelBMFont::create_1("New!", "goldFont.fnt"); sub_1000262BC((float *)v72, 1.0, 1.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v27 + 296LL))(v27, v72); sub_1000262BC((float *)v72, 182.0, v26 + -5.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v27 + 184LL))(v27, v72); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v27 + 160LL))(v27, 0.6); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v27, 3); } if ( v14 ) { v28 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_rewardBtn_001.png"); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v28 + 160LL))(v28, 1.0); v29 = CCMenuItemSpriteExtra::create(v28, 0, a1, DailyLevelNode::onClaimReward, 0); CCMenuItemSpriteExtra::setSizeMult(1.1); v30 = cocos2d::CCMenu::createWithItem(v29); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v30, 10); sub_1000262BC((float *)v72, 150.0, -2.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v30 + 184LL))(v30, v72); v31 = (double *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v30 + 192LL))(v30); v32 = sub_10002630C(a1 + 44, v31); v33 = *((_QWORD *)v23 + 69); if ( v33 ) { v34 = (*(__int64 (__fastcall **)(_QWORD, double))(*(_QWORD *)v33 + 1072LL))(*((_QWORD *)v23 + 69), v32); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v34 + 160LL))(v34, 0.4); v35 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v33 + 192LL))(v33); sub_1000262BC((float *)&v71, -55.0, 0.0); *(float32x2_t *)&v36 = sub_100026318(v35, &v71, v72); (*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v33 + 184LL))(v33, v72, v36); } } if ( a1[41] ) { v37 = *(_DWORD *)(a2 + 920) - *(_DWORD *)(a2 + 924); v38 = v37 - 100000; if ( v37 <= 100000 ) v38 = *(_DWORD *)(a2 + 920) - *(_DWORD *)(a2 + 924); if ( v37 <= 200000 ) v39 = v38; else v39 = v37 - 200000; v40 = sub_1003065B0("#%i", v39); CString = cocos2d::CCString::getCString(v40); v42 = cocos2d::CCLabelBMFont::create_1(CString, "chatFont.fnt"); (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v42 + 1072LL))(v42, &unk_100762991); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v42 + 1024LL))(v42, 150); sub_1000262BC((float *)v72, 1.0, 0.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v42 + 296LL))(v42, v72); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v42 + 160LL))(v42, 0.6); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v42, 3); sub_1000262BC((float *)v72, 183.0, 7.0 - v26); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v42 + 184LL))(v42, v72); } v43 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_deleteBtn_001.png"); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v43 + 160LL))(v43, 0.7); v44 = CCMenuItemSpriteExtra::create(v43, 0, a1, sub_100251748, 0); a1[45] = cocos2d::CCMenu::createWithItem(v44); (*(void (__fastcall **)(_QWORD *))(*a1 + 464LL))(a1); v45 = a1[45]; sub_1000262BC((float *)v72, -186.0, v26 + -4.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v45 + 184LL))(v45, v72); (*(void (__fastcall **)(_QWORD, _QWORD))(*(_QWORD *)a1[45] + 344LL))(a1[45], 0); v46 = cocos2d::CCLabelBMFont::create_1("Bonus:", "goldFont.fnt"); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v46, 10); sub_1000262BC((float *)v72, 1.0, 0.5); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v46 + 296LL))(v46, v72); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v46 + 160LL))(v46, 0.6); if ( (unsigned int)(*(_DWORD *)(a1[42] + 732LL) - 1) > 1 ) { v51 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_bigDiamond_001.png"); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v51, 10); v52 = (*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v51 + 160LL))(v51, 0.8); v53 = GameStatsManager::sharedState(v52); BonusDiamonds = GameStatsManager::getBonusDiamonds( v53, (unsigned int)(*(_DWORD *)(a1[41] + 948LL) - *(_DWORD *)(a1[41] + 952LL))); v55 = sub_1003065B0("%ix", BonusDiamonds); v56 = cocos2d::CCString::getCString(v55); v57 = cocos2d::CCLabelBMFont::create_1(v56, "bigFont.fnt"); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v57, 10); sub_1000262BC((float *)v72, 1.0, 0.5); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v57 + 296LL))(v57, v72); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v57 + 160LL))(v57, 0.6); v58 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v51 + 328LL))(v51); v59 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v51 + 168LL))(v51); v60 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v57 + 328LL))(v57); v61 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v57 + 168LL))(v57); v62 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v46 + 328LL))(v46); v63 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v46 + 168LL))(v46); v64 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v51 + 328LL))(v51); v65 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v51 + 168LL))(v51); sub_1000262BC( (float *)v72, (float)((float)((float)((float)((float)(v60 * v61) + (float)(v58 * v59)) + (float)(v62 * v63)) + 25.0) * 0.5) + (float)((float)(v65 * v64) * -0.5), -84.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v51 + 184LL))(v51, v72); v66 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v51 + 192LL))(v51); sub_1000262BC((float *)&v71, -20.0, 0.0); *(float32x2_t *)&v67 = sub_100026318(v66, &v71, v72); (*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v57 + 184LL))(v57, v72, v67); v48 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v57 + 192LL))(v57); v68 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v57 + 328LL))(v57); v69 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v57 + 168LL))(v57); sub_1000262BC((float *)&v71, -5.0 - (float)(v68 * v69), 0.0); } else { v47 = GJChestSprite::create(3); (*(void (__fastcall **)(_QWORD *, __int64, __int64))(*a1 + 464LL))(a1, v47, 10); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v47 + 160LL))(v47, 0.3); sub_1000262BC((float *)v72, 30.0, -84.0); (*(void (__fastcall **)(__int64, float32x2_t *))(*(_QWORD *)v47 + 184LL))(v47, v72); v48 = (float32x2_t *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v47 + 192LL))(v47); sub_1000262BC((float *)&v71, -25.0, 0.0); } *(float32x2_t *)&v49 = sub_100026318(v48, &v71, v72); (*(void (__fastcall **)(__int64, float32x2_t *, double))(*(_QWORD *)v46 + 184LL))(v46, v72, v49); } else { (*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v21 + 960LL))(v21, &unk_100762991); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v21 + 912LL))(v21, 75); v50 = cocos2d::CCLabelBMFont::create_1("00:00:00", "bigFont.fnt"); a1[43] = v50; (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v50 + 160LL))(v50, 0.5); (*(void (__fastcall **)(_QWORD *, _QWORD, __int64))(*a1 + 464LL))(a1, a1[43], 3); *((_BYTE *)a1 + 369) = 1; } if ( SHIBYTE(v73.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v73.__r_.__value_.__l.__data_); if ( SHIBYTE(v74.__r_.__value_.__r.__words[2]) < 0 ) operator delete(v74.__r_.__value_.__l.__data_); } return v8; }