// // LevelListLayer::updateStatsArt from 0x140305120 to 0x14030609d (3965 bytes) // // 6 xrefs: // > LevelListLayer::init @ 0x140305010 // > LevelListLayer::onEnter @ 0x1403050f0 // > LevelListLayer::loadLevelsFinished @ 0x140306a9a // > LevelListLayer::likedItem @ 0x140307b97 // > LevelListLayer::iconSelectClosed @ 0x140307e18 // > @ 0x1406d4484 // // This function is hookable on this platform! // // Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA // Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings // // Hidden C++ exception states: #wind=3 void LevelListLayer::updateStatsArt(LevelListLayer *a1) { cocos2d::CCArray *m_objects; // rax cocos2d::ccArray *data; // rbx __int64 num; // rax cocos2d::CCObject **arr; // rbx cocos2d::CCObject **i; // rdi unsigned int m_difficulty; // edx __int64 v8; // rcx cocos2d::CCString *v9; // rax const char *CString; // rax size_t v11; // r8 void **v12; // rdi cocos2d::CCSprite_vtbl *v13; // rbx cocos2d::CCSpriteFrameCache *v14; // rax struct cocos2d::CCSpriteFrame *v15; // rax void *v16; // rcx __int64 v17; // rcx cocos2d::CCDirector *v18; // rax GJLevelList *m_levelList; // rdx __int64 v20; // r15 char v21; // r12 bool hasClaimedListReward; // r13 GameStatsManager *v23; // rcx struct cocos2d::CCSprite *v24; // r14 __int64 v25; // rdx double v26; // xmm0_8 cocos2d::CCSprite_vtbl *v27; // rbx const cocos2d::CCPoint *v28; // rax struct cocos2d::CCSprite *v29; // rdi __int16 *v30; // rdx __int64 v31; // rdx float v32; // xmm6_4 float v33; // xmm0_4 cocos2d::CCSprite_vtbl *v34; // rbx double v35; // xmm0_8 const cocos2d::CCPoint *v36; // rax cocos2d::CCSprite_vtbl *v37; // rbx const cocos2d::CCPoint *v38; // rax float v39; // xmm1_4 float width; // xmm3_4 cocos2d::CCSprite_vtbl *v41; // rbx double v42; // xmm0_8 const cocos2d::CCRect *v43; // rax cocos2d::CCString *v44; // rax const char *v45; // rax struct cocos2d::CCLabelBMFont *v46; // rdi __int64 v47; // rax struct cocos2d::CCSprite *v48; // r15 float v49; // xmm0_4 cocos2d::CCSprite_vtbl *v50; // rbx const cocos2d::CCPoint *v51; // rax const char *v52; // rax struct cocos2d::CCLabelBMFont *v53; // rdi float v54; // xmm0_4 __int64 v55; // rax const char *v56; // rcx struct cocos2d::CCSprite *v57; // r12 float v58; // xmm0_4 __int64 v59; // rax const char *v60; // rax struct cocos2d::CCLabelBMFont *v61; // rdi float v62; // xmm0_4 __int64 v63; // rax double v64; // xmm0_8 struct cocos2d::CCSprite *v65; // rdi __int64 v66; // rax double v67; // xmm0_8 struct cocos2d::CCSprite *v68; // r15 __int64 v69; // rax double v70; // xmm0_8 int v71; // r14d cocos2d::CCString *v72; // rax const char *v73; // rax struct cocos2d::CCLabelBMFont *v74; // rdi __int64 v75; // rax __int64 v76; // rdx __int64 v77; // rcx cocos2d::CCNode *v78; // rdi cocos2d::CCNode_vtbl *v79; // rbx double v80; // xmm0_8 const cocos2d::CCSize *v81; // rax __int64 v82; // rdx __int64 v83; // rcx __int64 v84; // r15 __int64 v85; // rbx float *v86; // rax __int64 v87; // rax CCSpriteWithHue *v88; // r14 CCMenuItemSpriteExtra *v89; // r13 float v90; // xmm0_4 __int64 v91; // rax CCMenuItemSpriteExtra_vtbl *v92; // rdi struct cocos2d::CCPoint v93; // rax struct cocos2d::CCSprite *v94; // r12 float v95; // xmm0_4 __int64 v96; // rax const char *v97; // rax struct cocos2d::CCLabelBMFont *v98; // rdi float v99; // xmm0_4 cocos2d::CCLabelBMFont_vtbl *v100; // rbx __int64 v101; // rax float v102; // xmm0_4 __int64 v103; // rax struct cocos2d::CCObject *v104; // rdx struct cocos2d::CCSprite *v105; // r14 __int64 v106; // rax const char *v107; // rax struct cocos2d::CCLabelBMFont *v108; // rdi float v109; // xmm0_4 __int64 v110; // rax char v111; // [rsp+38h] [rbp-99h] __int16 v112; // [rsp+3Ah] [rbp-97h] BYREF char v113; // [rsp+3Ch] [rbp-95h] __int16 v114; // [rsp+3Eh] [rbp-93h] BYREF __int64 v115; // [rsp+40h] [rbp-91h] struct cocos2d::CCSprite *v116; // [rsp+48h] [rbp-89h] BYREF cocos2d::CCPoint v117; // [rsp+50h] [rbp-81h] BYREF int v118; // [rsp+58h] [rbp-79h] __int16 v119; // [rsp+5Ch] [rbp-75h] BYREF char v120; // [rsp+5Eh] [rbp-73h] float v121; // [rsp+60h] [rbp-71h] void *Block[2]; // [rsp+68h] [rbp-69h] BYREF __int64 v123; // [rsp+78h] [rbp-59h] unsigned __int64 v124; // [rsp+80h] [rbp-51h] __int128 v125; // [rsp+88h] [rbp-49h] BYREF __int64 v126; // [rsp+98h] [rbp-39h] __int64 v127; // [rsp+A0h] [rbp-31h] a1->m_exited = 0; m_objects = a1->m_objects; if ( m_objects ) { data = m_objects->data; num = data->num; if ( (_DWORD)num ) { arr = data->arr; for ( i = &arr[num - 1]; arr <= i; ++arr ) { if ( !*arr ) break; (*arr)->__vftable[7].~CCObject(*arr); } } } cocos2d::CCArray::removeAllObjects(a1->m_objects); m_difficulty = a1->m_levelList->m_difficulty; if ( m_difficulty ) { if ( m_difficulty > 0xA ) { m_difficulty = 0; } else if ( m_difficulty == 6 || m_difficulty == 7 ) { ++m_difficulty; } else if ( m_difficulty == 8 ) { m_difficulty = 6; } v9 = cocos2d::CCString::createWithFormat("diffIcon_%02d_btn_001.png", m_difficulty); CString = cocos2d::CCString::getCString(v9); *(_OWORD *)Block = 0; v123 = 0; v124 = 0; v11 = -1; do ++v11; while ( CString[v11] ); sub_14003A930(Block, CString, v11); } else { *(_OWORD *)Block = 0; Block[0] = sub_14003AA10(0x20u); v123 = 25; v124 = 31; strcpy((char *)Block[0], "diffIcon_auto_btn_001.png"); v8 = 103; } v12 = Block; if ( v124 > 0xF ) v12 = (void **)Block[0]; v13 = a1->m_diffSprite->__vftable; v14 = (cocos2d::CCSpriteFrameCache *)cocos2d::CCSpriteFrameCache::sharedSpriteFrameCache(v8); v15 = cocos2d::CCSpriteFrameCache::spriteFrameByName(v14, (const char *)v12); v13->setDisplayFrame(a1->m_diffSprite, v15); if ( v124 > 0xF ) { v16 = Block[0]; if ( v124 + 1 >= 0x1000 ) { v16 = *((void **)Block[0] - 1); if ( (unsigned __int64)((char *)Block[0] - (char *)v16 - 8) > 0x1F ) invalid_parameter_noinfo_noreturn(); } j_j_free(v16); } a1->m_featureSprite->setVisible(a1->m_featureSprite, a1->m_levelList->m_featured); v18 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v17); cocos2d::CCDirector::getWinSize(v18); v118 = GJLevelList::completedLevels(a1->m_levelList); m_levelList = a1->m_levelList; v20 = m_levelList->m_levels._Mypair._Myval2._Mylast - m_levelList->m_levels._Mypair._Myval2._Myfirst; v21 = 0; v111 = 0; hasClaimedListReward = 0; if ( m_levelList->m_diamonds > 0 && m_levelList->m_levelsToClaim > 0 ) { v21 = 1; v111 = 1; v23 = (GameStatsManager *)qword_1406C2EE8; if ( !qword_1406C2EE8 ) { v116 = (struct cocos2d::CCSprite *)operator new(0x3E0u); qword_1406C2EE8 = sub_1401D0AE0((__int64)v116); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EE8 + 72LL))(qword_1406C2EE8); v23 = (GameStatsManager *)qword_1406C2EE8; } hasClaimedListReward = GameStatsManager::hasClaimedListReward(v23, a1->m_levelList); if ( !hasClaimedListReward ) LODWORD(v20) = a1->m_levelList->m_levelsToClaim; } v119 = 0; v120 = 0; v24 = cocos2d::CCSprite::create("GJ_progressBar_001.png"); v24->setColor(&v24->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v119); LOBYTE(v25) = 125; v24->setOpacity(&v24->cocos2d::CCRGBAProtocol, v25); v26 = ((double (__fastcall *)(struct cocos2d::CCSprite *))v24->setScaleY)(v24); ((void (__fastcall *)(struct cocos2d::CCSprite *))v24->setScaleX)(v24); a1->addChild_0(a1, v24, 3); cocos2d::CCArray::addObject(a1->m_objects, v24); v27 = v24->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(*(float *)&v26, v121 * 0.5); v27->setPosition_0(v24, v28); v29 = cocos2d::CCSprite::create("GJ_progressBar_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v29->setScaleX)(v29); ((void (__fastcall *)(struct cocos2d::CCSprite *))v29->setScaleY)(v29); if ( !v21 || hasClaimedListReward ) { v112 = -16816; v114 = -16816; LOBYTE(v115) = -1; v30 = &v114; } else { v112 = 21759; v113 = 50; v30 = &v112; } v29->setColor(&v29->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)v30); LOBYTE(v31) = -31; v29->setOpacity(&v29->cocos2d::CCRGBAProtocol, v31); v32 = v29->m_obRect.size.width - (float)(v29->m_obRect.size.width * 0.98000002); v33 = ((float (__fastcall *)(struct cocos2d::CCSprite *, struct cocos2d::CCSprite *, __int64))v24->addChild_0)( v24, v29, 1); v34 = v29->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v35 = cocos2d::CCPoint::CCPoint(v33, 0.0); v34->setAnchorPoint(v29, v36); v37 = v29->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v24->getContentSize(v24); cocos2d::CCPoint::CCPoint(*(float *)&v35, v32 * 0.5); v37->setPosition_0(v29, v38); v39 = 0.0; if ( (int)v20 > 0 ) v39 = (float)v118 / (float)(int)v20; width = v29->m_obRect.size.width; if ( (float)(width * v39) <= width ) width = v39 * width; v41 = v29->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v42 = cocos2d::CCRect::CCRect((cocos2d::CCRect *)Block, 0.0, 0.0, width, v29->m_obRect.size.height); v41->setTextureRect_0(v29, v43); v44 = cocos2d::CCString::createWithFormat("%i/%i", v118, v20); v45 = cocos2d::CCString::getCString(v44); v46 = cocos2d::CCLabelBMFont::create(v45, (const char *)&qword_14052A4D8); a1->addChild_0(a1, v46, 4); cocos2d::CCArray::addObject(a1->m_objects, v46); cocos2d::CCPoint::CCPoint(*(float *)&v42, 0.0); v47 = (__int64)v24->getPosition_0(v24); cocos2d::CCPoint::operator+(v47, &v117); v46->setPosition_0(v46, &v117); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v46->setScale_0)(v46); if ( a1->m_levelList->m_listType != Editor ) { v48 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_downloadsIcon_001.png"); v49 = ((float (__fastcall *)(struct cocos2d::CCSprite *))v48->setScale_0)(v48); v50 = v48->cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v49, 26.0); v50->setPosition_0(v48, v51); a1->addChild_0(a1, v48, 1); cocos2d::CCArray::addObject(a1->m_objects, v48); v52 = (const char *)GameToolbox::intToShortString(&v125, a1->m_levelList->m_downloads); if ( *((_QWORD *)v52 + 3) > 0xFu ) v52 = *(const char **)v52; v53 = cocos2d::CCLabelBMFont::create(v52, (const char *)&qword_14052A4D8); sub_14003A830((__int64)&v125); v54 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *))v53->setScale_0)(v53); cocos2d::CCPoint::CCPoint(v54, 0.0); v55 = (__int64)v48->getPosition_0(v48); cocos2d::CCPoint::operator+(v55, &v117); v53->setPosition_0(v53, &v117); a1->addChild_0(a1, v53, 1); cocos2d::CCArray::addObject(a1->m_objects, v53); v56 = "GJ_dislikesIcon_001.png"; if ( a1->m_levelList->m_likes >= 0 ) v56 = "GJ_likesIcon_001.png"; v57 = cocos2d::CCSprite::createWithSpriteFrameName(v56); v58 = ((float (__fastcall *)(struct cocos2d::CCSprite *))v57->setScale_0)(v57); cocos2d::CCPoint::CCPoint(v58, 0.0); v59 = (__int64)v48->getPosition_0(v48); cocos2d::CCPoint::operator+(v59, &v117); v57->setPosition_0(v57, &v117); a1->addChild_0(a1, v57, 1); cocos2d::CCArray::addObject(a1->m_objects, v57); v60 = (const char *)GameToolbox::intToShortString(&v125, a1->m_levelList->m_likes); if ( *((_QWORD *)v60 + 3) > 0xFu ) v60 = *(const char **)v60; v61 = cocos2d::CCLabelBMFont::create(v60, (const char *)&qword_14052A4D8); sub_14003A830((__int64)&v125); v62 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *))v61->setScale_0)(v61); cocos2d::CCPoint::CCPoint(v62, 0.0); v63 = (__int64)v57->getPosition_0(v57); v64 = cocos2d::CCPoint::operator+(v63, &v117); v61->setPosition_0(v61, &v117); a1->addChild_0(a1, v61, 1); cocos2d::CCArray::addObject(a1->m_objects, v61); if ( v111 ) { if ( hasClaimedListReward ) { v105 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_diamondsIcon_001.png"); a1->addChild_1(a1, v105); cocos2d::CCArray::addObject(a1->m_objects, v105); cocos2d::CCPoint::CCPoint(*(float *)&v64, 0.0); v106 = (__int64)v57->getPosition_0(v57); cocos2d::CCPoint::operator+(v106, &v116); v105->setPosition_0(v105, (const cocos2d::CCPoint *)&v116); ((void (__fastcall *)(struct cocos2d::CCSprite *))v105->setScale_0)(v105); v107 = (const char *)GameToolbox::intToShortString(&v125, a1->m_levelList->m_diamonds); if ( *((_QWORD *)v107 + 3) > 0xFu ) v107 = *(const char **)v107; v108 = cocos2d::CCLabelBMFont::create(v107, (const char *)&qword_14052A4D8); sub_14003A830((__int64)&v125); v109 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *))v108->setScale_0)(v108); cocos2d::CCPoint::CCPoint(v109, 0.0); v110 = (__int64)v105->getPosition_0(v105); cocos2d::CCPoint::operator+(v110, &v116); v108->setPosition_0(v108, (const cocos2d::CCPoint *)&v116); a1->addChild_0(a1, v108, 1); v104 = v108; } else { v65 = cocos2d::CCSprite::createWithSpriteFrameName("diamond_small01_001.png"); a1->addChild_0(a1, v65, 10); cocos2d::CCArray::addObject(a1->m_objects, v65); cocos2d::CCPoint::CCPoint(*(float *)&v64, 125.0); v66 = (__int64)v24->getPosition_0(v24); v67 = cocos2d::CCPoint::operator+(v66, &v117); v65->setPosition_0(v65, &v117); v68 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_completesIcon_001.png"); v116 = v68; a1->addChild_1(a1, v68); cocos2d::CCArray::addObject(a1->m_objects, v68); cocos2d::CCPoint::CCPoint(*(float *)&v67, 0.0); v69 = (__int64)v57->getPosition_0(v57); cocos2d::CCPoint::operator+(v69, &v117); v70 = ((double (__fastcall *)(struct cocos2d::CCSprite *, cocos2d::CCPoint *))v68->setPosition_0)(v68, &v117); ((void (__fastcall *)(struct cocos2d::CCSprite *))v68->setScale_0)(v68); v71 = v118; v72 = cocos2d::CCString::createWithFormat( "%i/%i", v118, a1->m_levelList->m_levels._Mypair._Myval2._Mylast - a1->m_levelList->m_levels._Mypair._Myval2._Myfirst); v73 = cocos2d::CCString::getCString(v72); v74 = cocos2d::CCLabelBMFont::create(v73, (const char *)&qword_14052A4D8); a1->addChild_1(a1, v74); cocos2d::CCArray::addObject(a1->m_objects, v74); cocos2d::CCPoint::CCPoint(*(float *)&v70, 0.0); v75 = (__int64)v68->getPosition_0(v68); cocos2d::CCPoint::operator+(v75, &v117); v74->setPosition_0(v74, &v117); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v74->setScale_0)(v74); v78 = (cocos2d::CCNode *)cocos2d::CCNode::create(v77, v76); v79 = v78->__vftable; v80 = cocos2d::CCSize::CCSize((cocos2d::CCSize *)Block, 50.0, 50.0); v79->setContentSize(v78, v81); v84 = cocos2d::CCNode::create(v83, v82); (*(void (__fastcall **)(__int64, cocos2d::CCSize *))(*(_QWORD *)v84 + 296LL))(v84, &stru_1406C21C8); v78->addChild_1(v78, (cocos2d::CCNode *)v84); v85 = *(_QWORD *)v84; v78->getContentSize(v78); v86 = (float *)v78->getContentSize(v78); cocos2d::CCPoint::CCPoint(*(float *)&v80, *v86 * 0.5); (*(void (__fastcall **)(__int64, __int64))(v85 + 184))(v84, v87); if ( v71 < a1->m_levelList->m_levelsToClaim ) { v125 = 0; v126 = 0; v127 = 15; *(_QWORD *)&v125 = sub_14003AA10(0x20u); v126 = 20; v127 = 31; strcpy((char *)v125, "GJ_rewardBtn_001.png"); v88 = CCSpriteGrayscale::createWithSpriteFrameName((__int64)&v125); sub_14003A830((__int64)&v125); v88->m_luminance._Elems[0] = 0.33000001; v88->m_luminance._Elems[1] = 0.33000001; v88->m_luminance._Elems[2] = 0.33000001; v114 = -20561; LOBYTE(v115) = -81; v88->setColor(&v88->cocos2d::CCRGBAProtocol, (const cocos2d::ccColor3B *)&v114); } else { v88 = (CCSpriteWithHue *)cocos2d::CCSprite::createWithSpriteFrameName("GJ_rewardBtn_001.png"); } ((void (__fastcall *)(CCSpriteWithHue *))v88->setScale_0)(v88); (*(void (__fastcall **)(__int64, CCSpriteWithHue *))(*(_QWORD *)v84 + 448LL))(v84, v88); v89 = CCMenuItemSpriteExtra::create(v78, nullptr, a1, (cocos2d::SEL_MenuHandler *)LevelListLayer::onClaimReward); v90 = ((float (__fastcall *)(cocos2d::CCMenu *, CCMenuItemSpriteExtra *))a1->m_buttonMenu->addChild_1)( a1->m_buttonMenu, v89); cocos2d::CCPoint::CCPoint(v90, 0.0); v91 = (__int64)v116->getPosition_0(v116); cocos2d::CCPoint::operator+(v91, &v117); cocos2d::CCPoint::operator=(&a1->m_rewardPosition, &v117); v92 = v89->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v93 = cocos2d::CCNode::convertToNodeSpace(a1->m_buttonMenu, (const struct cocos2d::CCPoint *)Block); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v92->setPosition_0)(v89, v93); v94 = cocos2d::CCSprite::createWithSpriteFrameName("diamond_small01_001.png"); v95 = (*(float (__fastcall **)(__int64, struct cocos2d::CCSprite *))(*(_QWORD *)v84 + 448LL))(v84, v94); cocos2d::CCPoint::CCPoint(v95, 8.0); v96 = (__int64)v88->getPosition_0(v88); cocos2d::CCPoint::operator+(v96, &v116); v94->setPosition_0(v94, (const cocos2d::CCPoint *)&v116); v97 = (const char *)GameToolbox::intToString(&v125, a1->m_levelList->m_diamonds); if ( *((_QWORD *)v97 + 3) > 0xFu ) v97 = *(const char **)v97; v98 = cocos2d::CCLabelBMFont::create(v97, (const char *)&qword_14052A4D8); sub_14003A830((__int64)&v125); v99 = (*(float (__fastcall **)(__int64, struct cocos2d::CCLabelBMFont *))(*(_QWORD *)v84 + 448LL))(v84, v98); v100 = v98->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint(v99, 1.0); v102 = ((float (__fastcall *)(struct cocos2d::CCLabelBMFont *, __int64))v100->setAnchorPoint)(v98, v101); cocos2d::CCPoint::CCPoint(v102, -8.0); v103 = (__int64)v94->getPosition_0(v94); cocos2d::CCPoint::operator+(v103, &v116); v98->setPosition_0(v98, (const cocos2d::CCPoint *)&v116); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v98->setScale_0)(v98); v104 = v89; } cocos2d::CCArray::addObject(a1->m_objects, v104); } } }
GD Web Decomp Icon

GD Web Decomp

Raw Source