// // MapPackCell::loadFromMapPack from 0x73d328 to 0x73de8c (2916 bytes) // // 3 xrefs: // > MapPackCell::reloadCell @ 0x73debc // > CustomListView::loadCell @ 0x74d47c // > @ 0x642d0 // // 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 12:52:42 +0000 // __int64 __fastcall MapPackCell::loadFromMapPack(MapPackCell *this, GJMapPack *a2) { cocos2d::CCString *v4; // x0 cocos2d::CCSprite *CString; // x0 const char *v6; // x1 __int64 v7; // x22 void (__fastcall *v8)(__int64, _QWORD *); // x23 __int64 v9; // x0 __int64 *v10; // x2 __int64 v11; // x0 __int64 v12; // x1 cocos2d::CCLabelBMFont *v13; // x2 cocos2d::CCLabelBMFont *v14; // x0 __int64 v15; // x21 _BYTE *v16; // x2 void (__fastcall *v17)(__int64, _QWORD *); // x3 char v18; // w5 char v19; // w4 void (__fastcall *v20)(__int64, _QWORD *); // x23 float v21; // s0 void (__fastcall *v22)(__int64, float); // x23 float v23; // s0 float v24; // s1 const char *v25; // x6 __int64 v26; // x23 __int64 v27; // x0 __int64 v28; // x21 __int64 v29; // x0 float v30; // s8 __int64 (__fastcall *v31)(__int64); // x1 __int64 (__fastcall *v32)(__int64, _QWORD *); // x23 float *v33; // x0 GameStatsManager *v34; // x0 GameStatsManager *v35; // x0 unsigned __int8 hasCompletedMapPack; // w0 const char *v37; // x1 int v38; // w27 __int64 v39; // x21 void (__fastcall *v40)(__int64, _QWORD *); // x25 const char *v41; // x1 float *v42; // x23 _BYTE *v43; // x2 void (__fastcall *v44)(float *, _QWORD *); // x3 char v45; // w5 char v46; // w4 float v47; // s9 void (__fastcall *v48)(float *, _QWORD *); // x25 void (__fastcall *v49)(float *, _QWORD *); // x25 __int64 v50; // x0 int v51; // w0 float v52; // s1 float v53; // s2 void (__fastcall *v54)(float *, _QWORD *); // x25 unsigned int v55; // w0 cocos2d::CCString *v56; // x0 cocos2d::CCLabelBMFont *v57; // x0 const char *v58; // x2 __int64 v59; // x23 void (__fastcall *v60)(__int64, __int64); // x25 __int64 v61; // x0 __int64 v62; // x0 const char *v63; // x1 float v64; // s8 int v65; // w28 cocos2d::CCObject *v66; // x26 void (__fastcall *v67)(cocos2d::CCObject *, _QWORD *); // x23 cocos2d::CCString *v68; // x0 cocos2d::CCLabelBMFont *v69; // x0 const char *v70; // x2 cocos2d::CCObject *v71; // x23 cocos2d::CCObject *v73; // x23 void (__fastcall *v74)(cocos2d::CCObject *, _QWORD *); // x26 cocos2d::CCString *v75; // x0 cocos2d::CCLabelBMFont *v76; // x0 const char *v77; // x2 cocos2d::CCObject *v78; // x22 void (__fastcall *v79)(cocos2d::CCObject *, _QWORD *); // x26 void (__fastcall *v80)(cocos2d::CCObject *, _QWORD *); // x26 __int64 v81; // x28 void (__fastcall *v82)(cocos2d::CCObject *, _QWORD *); // x3 __int64 v83; // x22 void (__fastcall *v84)(__int64, _QWORD *); // x19 __int64 v85; // x21 int v86; // w23 const char *v87; // x1 __int64 v88; // x0 __int64 v89; // x0 __int64 v90; // x21 void (__fastcall *v91)(__int64, __int64); // x23 __int64 v92; // x0 void (__fastcall *v93)(__int64, float); // x23 float *v94; // x0 void (__fastcall *v95)(cocos2d::CCObject *, _QWORD *); // x3 void (__fastcall *v96)(cocos2d::CCObject *, _QWORD *); // [xsp+78h] [xbp+78h] void (__fastcall *v97)(cocos2d::CCObject *, _QWORD *); // [xsp+80h] [xbp+80h] __int64 v98; // [xsp+80h] [xbp+80h] char *v99; // [xsp+88h] [xbp+88h] _BYTE v100[8]; // [xsp+90h] [xbp+90h] BYREF char v101[8]; // [xsp+98h] [xbp+98h] BYREF _QWORD v102[2]; // [xsp+A0h] [xbp+A0h] BYREF __int64 v103; // [xsp+B0h] [xbp+B0h] BYREF __int64 v104; // [xsp+B8h] [xbp+B8h] cocos2d::CCLabelBMFont *v105; // [xsp+C0h] [xbp+C0h] (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 67) + 584LL))(*((_QWORD *)this + 67), 1); cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 73)); cocos2d::CCArray::removeAllObjects(*((cocos2d::CCArray **)this + 72)); *((_QWORD *)this + 69) = a2; LODWORD(a2) = *((_DWORD *)a2 + 83); v4 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"difficulty_%02d_btn_001.png", (const char *)(unsigned int)a2); CString = (cocos2d::CCSprite *)cocos2d::CCString::getCString(v4); if ( !(_DWORD)a2 ) CString = (cocos2d::CCSprite *)"difficulty_auto_btn_001.png"; v7 = cocos2d::CCSprite::createWithSpriteFrameName(CString, v6); v8 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v7 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, 31.0, *((float *)this + 131) * 0.5); v8(v7, v102); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v7 + 160LL))(v7, 1.1); (*(void (__fastcall **)(MapPackCell *, __int64, __int64))(*(_QWORD *)this + 464LL))(this, v7, 2); v103 = 0; v9 = *((_QWORD *)this + 69); v104 = 0; v10 = (__int64 *)(v9 + 344); v105 = nullptr; if ( (*(_BYTE *)(v9 + 344) & 1) != 0 ) { std::string::__init(&v103, *(void **)(v9 + 360), *(_QWORD *)(v9 + 352)); } else { v11 = *v10; v12 = v10[1]; v13 = (cocos2d::CCLabelBMFont *)v10[2]; v105 = v13; v103 = v11; v104 = v12; } v14 = (cocos2d::CCLabelBMFont *)((char *)&v103 + 1); if ( (v103 & 1) != 0 ) v14 = v105; v15 = cocos2d::CCLabelBMFont::create(v14, "bigFont.fnt", (const char *)v13); if ( (v103 & 1) != 0 ) operator delete(v105); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 67) + 456LL))(*((_QWORD *)this + 67), v15); v16 = *((_BYTE **)this + 69); v17 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v15 + 1072LL); v18 = v16[396]; v19 = v16[397]; LOBYTE(v102[0]) = v16[395]; BYTE1(v102[0]) = v18; BYTE2(v102[0]) = v19; v17(v15, v102); v20 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v15 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v102, (float)((float)(*((float *)this + 130) * 0.5) + -14.0) - 2.0, (float)(*((float *)this + 131) * 0.5) + 30.0); v20(v15, v102); v21 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v15 + 328LL))(v15); if ( v21 > 205.0 ) { v93 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 160LL); v94 = (float *)(*(__int64 (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 328LL))(v15, v21); v93(v15, 205.0 / *v94); } v22 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v15 + 160LL); v23 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v15 + 168LL))(v15); v24 = 0.9; if ( v23 <= 0.9 ) v24 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v15 + 168LL))(v15); v22(v15, v24); v26 = ButtonSprite::create( (ButtonSprite *)"View", (const char *)&dword_30 + 2, 0, 0, 0.6, "bigFont.fnt", "GJ_button_01.png", v25, 50.0); v27 = CCMenuItemSpriteExtra::create(v26, 0, (__int64)this, (__int64)MapPackCell::onClick, 0); *((_QWORD *)this + 70) = v27; CCMenuItemSpriteExtra::setSizeMult(v27, 1.5); v28 = cocos2d::CCMenu::create(*((cocos2d::CCMenu **)this + 70), nullptr); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 67) + 456LL))(*((_QWORD *)this + 67), v28); v29 = v26; v30 = *((float *)this + 130); v31 = *(__int64 (__fastcall **)(__int64))(*(_QWORD *)v26 + 328LL); v32 = *(__int64 (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v28 + 184LL); v33 = (float *)v31(v29); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v102, (float)(v30 - (float)(*v33 * 0.5)) - 9.0, *((float *)this + 131) * 0.5); v34 = (GameStatsManager *)v32(v28, v102); v35 = (GameStatsManager *)GameStatsManager::sharedState(v34); hasCompletedMapPack = GameStatsManager::hasCompletedMapPack(v35, *(_DWORD *)(*((_QWORD *)this + 69) + 328LL)); v38 = hasCompletedMapPack; if ( !hasCompletedMapPack ) { v86 = GJMapPack::completedMaps(*((GJMapPack **)this + 69)); if ( v86 >= (int)GJMapPack::totalMaps(*((GJMapPack **)this + 69)) ) { (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 70) + 344LL))(*((_QWORD *)this + 70), 0); (*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 70) + 1056LL))(*((_QWORD *)this + 70), 0); v88 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_rewardBtn_001.png", v87); v89 = CCMenuItemSpriteExtra::create(v88, 0, (__int64)this, (__int64)MapPackCell::onClaimReward, 0); *((_QWORD *)this + 71) = v89; CCMenuItemSpriteExtra::setSizeMult(v89, 1.5); (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v28 + 456LL))(v28, *((_QWORD *)this + 71)); v90 = *((_QWORD *)this + 71); v91 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v90 + 184LL); v92 = (*(__int64 (__fastcall **)(_QWORD))(**((_QWORD **)this + 70) + 192LL))(*((_QWORD *)this + 70)); v91(v90, v92); } } v100[0] = 0; v100[1] = 0; v100[2] = 0; v39 = cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v37); (*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v39 + 960LL))(v39, v100); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v39 + 912LL))(v39, 125); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v39 + 144LL))(v39, 0.8); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v39 + 128LL))(v39, 0.6); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 67) + 464LL))(*((_QWORD *)this + 67), v39, 3); v40 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v39 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v102, (float)(*((float *)this + 130) * 0.5) + -14.0, (float)(*((float *)this + 131) * 0.5) + -2.0); v40(v39, v102); v42 = (float *)cocos2d::CCSprite::create((cocos2d::CCSprite *)"GJ_progressBar_001.png", v41); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v42 + 128LL))(v42, 0.985); (*(void (__fastcall **)(float *, float))(*(_QWORD *)v42 + 144LL))(v42, 0.83); v43 = *((_BYTE **)this + 69); v44 = *(void (__fastcall **)(float *, _QWORD *))(*(_QWORD *)v42 + 960LL); v45 = v43[393]; v46 = v43[394]; LOBYTE(v102[0]) = v43[392]; BYTE1(v102[0]) = v45; BYTE2(v102[0]) = v46; v44(v42, v102); v47 = v42[108] - (float)(v42[108] * 0.985); (*(void (__fastcall **)(__int64, float *, __int64))(*(_QWORD *)v39 + 464LL))(v39, v42, 1); v48 = *(void (__fastcall **)(float *, _QWORD *))(*(_QWORD *)v42 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, 0.0, 0.5); v48(v42, v102); v49 = *(void (__fastcall **)(float *, _QWORD *))(*(_QWORD *)v42 + 184LL); v50 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 328LL))(v39); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, v47 * 0.5, *(float *)(v50 + 4) * 0.5); v49(v42, v102); LODWORD(v49) = GJMapPack::completedMaps(*((GJMapPack **)this + 69)); v51 = GJMapPack::totalMaps(*((GJMapPack **)this + 69)); v52 = v42[108]; v53 = (float)((float)(int)v49 / (float)v51) * v52; if ( v52 <= v53 ) v53 = v42[108]; v54 = *(void (__fastcall **)(float *, _QWORD *))(*(_QWORD *)v42 + 1136LL); cocos2d::CCRect::CCRect((cocos2d::CCRect *)v102, 0.0, 0.0, v53, v42[109]); v54(v42, v102); v99 = (char *)(unsigned int)GJMapPack::completedMaps(*((GJMapPack **)this + 69)); v55 = GJMapPack::totalMaps(*((GJMapPack **)this + 69)); v56 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%i/%i", v99, v55); v57 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v56); v59 = cocos2d::CCLabelBMFont::create(v57, "bigFont.fnt", v58); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 67) + 464LL))(*((_QWORD *)this + 67), v59, 4); v60 = *(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v59 + 184LL); v61 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 192LL))(v39); v60(v59, v61); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v59 + 160LL))(v59, 0.5); v62 = *((_QWORD *)this + 69); v63 = (const char *)*(unsigned int *)(v62 + 336); v64 = (float)(*((float *)this + 131) * 0.5) + -30.0; v65 = ((int)v63 > 0) + (*(_DWORD *)(v62 + 340) > 0); if ( (int)v63 <= 0 ) { if ( *(int *)(v62 + 340) <= 0 ) { if ( !v38 ) return _stack_chk_guard; LABEL_28: v83 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_completesIcon_001.png", v63); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 67) + 464LL))( *((_QWORD *)this + 67), v83, 5); (*(void (__fastcall **)(__int64, float))(*(_QWORD *)v83 + 160LL))(v83, 1.0); v84 = *(void (__fastcall **)(__int64, _QWORD *))(*(_QWORD *)v83 + 184LL); v85 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 192LL))(v39); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v101, 86.0, 1.0); cocos2d::CCPoint::operator+(v102, v85); v84(v83, v102); return _stack_chk_guard; } } else { v66 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_starsIcon_001.png", v63); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *, __int64))(**((_QWORD **)this + 67) + 464LL))( *((_QWORD *)this + 67), v66, 2); v67 = *(void (__fastcall **)(cocos2d::CCObject *, _QWORD *))(*(_QWORD *)v66 + 184LL); if ( v65 == 2 ) cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v102, (float)((float)(*((float *)this + 130) * 0.5) + -4.0) - 40.0, v64); else cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, (float)(*((float *)this + 130) * 0.5) + -4.0, v64); v67(v66, v102); v68 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", (const char *)*(unsigned int *)(*((_QWORD *)this + 69) + 336LL)); v69 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v68); v71 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v69, "bigFont.fnt", v70); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *, __int64))(**((_QWORD **)this + 67) + 464LL))( *((_QWORD *)this + 67), v71, 1); v97 = *(void (__fastcall **)(cocos2d::CCObject *, _QWORD *))(*(_QWORD *)v71 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, 1.0, 0.5); v97(v71, v102); v96 = *(void (__fastcall **)(cocos2d::CCObject *, _QWORD *))(*(_QWORD *)v71 + 184LL); v98 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v66 + 192LL))(v66); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v101, -17.0, 0.0); cocos2d::CCPoint::operator+(v102, v98); v96(v71, v102); (*(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v71 + 160LL))(v71, 0.7); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 73), v66); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 72), v71); if ( v38 ) { v95 = *(void (__fastcall **)(cocos2d::CCObject *, _QWORD *))(*(_QWORD *)v71 + 1072LL); LOWORD(v102[0]) = -1; BYTE2(v102[0]) = 50; v95(v71, v102); if ( *(int *)(*((_QWORD *)this + 69) + 340LL) <= 0 ) goto LABEL_28; } else if ( *(int *)(*((_QWORD *)this + 69) + 340LL) <= 0 ) { return _stack_chk_guard; } } v73 = (cocos2d::CCObject *)cocos2d::CCSprite::createWithSpriteFrameName( (cocos2d::CCSprite *)"GJ_coinsIcon_001.png", v63); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *, __int64))(**((_QWORD **)this + 67) + 464LL))( *((_QWORD *)this + 67), v73, 2); v74 = *(void (__fastcall **)(cocos2d::CCObject *, _QWORD *))(*(_QWORD *)v73 + 184LL); if ( v65 == 2 ) cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v102, (float)((float)(*((float *)this + 130) * 0.5) + -4.0) + 40.0, v64); else cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, (float)(*((float *)this + 130) * 0.5) + -4.0, v64); v74(v73, v102); v75 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat( (cocos2d::CCString *)"%i", (const char *)*(unsigned int *)(*((_QWORD *)this + 69) + 340LL)); v76 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v75); v78 = (cocos2d::CCObject *)cocos2d::CCLabelBMFont::create(v76, "bigFont.fnt", v77); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *, __int64))(**((_QWORD **)this + 67) + 464LL))( *((_QWORD *)this + 67), v78, 1); v79 = *(void (__fastcall **)(cocos2d::CCObject *, _QWORD *))(*(_QWORD *)v78 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v102, 1.0, 0.5); v79(v78, v102); v80 = *(void (__fastcall **)(cocos2d::CCObject *, _QWORD *))(*(_QWORD *)v78 + 184LL); v81 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v73 + 192LL))(v73); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v101, -19.0, 0.0); cocos2d::CCPoint::operator+(v102, v81); v80(v78, v102); (*(void (__fastcall **)(cocos2d::CCObject *, float))(*(_QWORD *)v78 + 160LL))(v78, 0.7); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 73), v73); cocos2d::CCArray::addObject(*((cocos2d::CCArray **)this + 72), v78); if ( v38 ) { v82 = *(void (__fastcall **)(cocos2d::CCObject *, _QWORD *))(*(_QWORD *)v78 + 1072LL); LOWORD(v102[0]) = -1; BYTE2(v102[0]) = 50; v82(v78, v102); goto LABEL_28; } return _stack_chk_guard; }
GD Web Decomp Icon

GD Web Decomp

Raw Source