// // GJRateLevelListLayer::init from 0x955328 to 0x9560dc (3508 bytes) // // 2 xrefs: // > GJRateLevelListLayer::create @ 0x95636c // > @ 0xb0e90 // // 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:57:25 +0000 // __int64 __fastcall GJRateLevelListLayer::init(GJRateLevelListLayer *this, GJLevelList *a2, cocos2d::CCArray *a3) { cocos2d::CCDirector *v6; // x0 cocos2d::CCDirector *v7; // x0 cocos2d::CCMenu *v8; // x0 __int64 v9; // x0 __int64 v10; // x0 size_t v11; // x5 const char *v12; // x21 unsigned int v13; // w0 cocos2d::CCString *v14; // x0 size_t v15; // x0 const char *v16; // x2 cocos2d::CCLabelBMFont *v17; // x0 cocos2d::CCLabelBMFont *v18; // x22 void (__fastcall *v19)(cocos2d::CCLabelBMFont *, __int64 *); // x23 float v20; // s11 float v21; // s8 int v22; // w22 const char *v23; // x2 __int64 v24; // x23 void (__fastcall *v25)(__int64, __int64 *); // x24 __int64 v26; // x0 __int64 v27; // x23 const cocos2d::CCPoint *v28; // x0 float v29; // s11 float v30; // s8 float v31; // s0 __int64 v32; // x23 void (__fastcall *v33)(__int64, __int64 *); // x24 __int64 v34; // x23 void (__fastcall *v35)(__int64, __int64 *); // x2 void (__fastcall *v36)(__int64, __int64 *); // x24 long double v37; // q0 __int64 v38; // x0 int *v39; // x1 unsigned int v40; // w0 GJRateLevelListLayer **v41; // x24 __int64 v42; // x1 __int64 v43; // x0 char *v44; // x25 int v45; // w0 char *v46; // x0 float v47; // s8 int32x4_t v48; // q0 int v49; // w25 int v50; // w24 int v51; // w27 int *v52; // x24 int v53; // w28 int i; // w23 float v55; // s0 int v56; // w23 const char *v57; // x6 int v58; // w26 int v59; // w25 __int64 v61; // x23 const char *v62; // x6 __int64 v63; // x20 cocos2d::CCArray *v64; // x0 cocos2d::CCArray *v65; // x20 const char *v66; // x1 __int64 v67; // x2 __int64 v68; // x3 bool v69; // w4 __int64 v70; // x5 const char *v71; // x6 __int64 v72; // x0 cocos2d::CCObject *v73; // x22 const char *v74; // x1 __int64 v75; // x2 __int64 v76; // x3 bool v77; // w4 __int64 v78; // x5 const char *v79; // x6 __int64 v80; // x0 cocos2d::CCObject *v81; // x22 cocos2d::CCNode *v82; // x22 float v83; // s0 int v84; // [xsp+20h] [xbp-10h] int v85; // [xsp+20h] [xbp-10h] unsigned __int8 v86; // [xsp+DCh] [xbp+ACh] cocos2d::CCPoint *CString; // [xsp+E8h] [xbp+B8h] __int64 v88; // [xsp+F8h] [xbp+C8h] __int64 v89; // [xsp+100h] [xbp+D0h] __int64 v90; // [xsp+108h] [xbp+D8h] BYREF float v91; // [xsp+110h] [xbp+E0h] BYREF float v92; // [xsp+114h] [xbp+E4h] __int64 v93; // [xsp+118h] [xbp+E8h] BYREF __int64 v94[2]; // [xsp+120h] [xbp+F0h] BYREF __int64 v95[2]; // [xsp+130h] [xbp+100h] BYREF void *v96; // [xsp+140h] [xbp+110h] __int64 v97[2]; // [xsp+148h] [xbp+118h] BYREF void *v98; // [xsp+158h] [xbp+128h] __int64 v99[2]; // [xsp+160h] [xbp+130h] BYREF void *v100; // [xsp+170h] [xbp+140h] __int64 v101; // [xsp+178h] [xbp+148h] BYREF size_t v102; // [xsp+180h] [xbp+150h] void *v103; // [xsp+188h] [xbp+158h] __int64 v104; // [xsp+190h] [xbp+160h] BYREF size_t v105; // [xsp+198h] [xbp+168h] void *v106; // [xsp+1A0h] [xbp+170h] if ( !a2 ) return 0; v86 = SetupTriggerPopup::init(this, nullptr, nullptr, 380.0, 260.0, 1, 0.0); if ( !v86 ) return 0; SetupTriggerPopup::preSetup(this); v104 = 0; v105 = 0; v106 = nullptr; std::string::__init(&v104, "Feature List", 0xCu); SetupTriggerPopup::addTitle(this, &v104); if ( (v104 & 1) != 0 ) operator delete(v106); *((_QWORD *)this + 130) = a2; v6 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(a2); *((_QWORD *)this + 131) = a3; if ( a3 ) v6 = (cocos2d::CCDirector *)cocos2d::CCObject::retain(a3); v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v6); cocos2d::CCDirector::getWinSize(&v90, v7); v8 = (cocos2d::CCMenu *)cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v91, *(float *)&v90 * 0.5, *((float *)&v90 + 1) * 0.5); v9 = cocos2d::CCMenu::create(v8); *((_QWORD *)this + 69) = v9; (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(*((_QWORD *)this + 73), v9, 10); v104 = 0; v10 = *((_QWORD *)this + 130); v105 = 0; v106 = nullptr; if ( (*(_BYTE *)(v10 + 432) & 1) != 0 ) { std::string::__init(&v104, *(void **)(v10 + 448), *(_QWORD *)(v10 + 440)); v10 = *((_QWORD *)this + 130); } else { v11 = *(_QWORD *)(v10 + 440); v104 = *(_QWORD *)(v10 + 432); v105 = v11; v106 = *(void **)(v10 + 448); } v12 = (char *)&v104 + 1; if ( (v104 & 1) != 0 ) v12 = (const char *)v106; v13 = GJLevelList::totalLevels((GJLevelList *)v10); v14 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s (%d levels)", v12, v13); CString = (cocos2d::CCPoint *)cocos2d::CCString::getCString(v14); v95[0] = 0; v95[1] = 0; v96 = nullptr; v15 = strlen((const char *)CString); std::string::__init(v95, CString, v15); if ( (v104 & 1) != 0 ) operator delete(v106); v17 = (cocos2d::CCLabelBMFont *)((char *)v95 + 1); if ( (v95[0] & 1) != 0 ) v17 = (cocos2d::CCLabelBMFont *)v96; v18 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v17, "goldFont.fnt", v16); (*(void (__fastcall **)(cocos2d::CCLabelBMFont *, float))(*(_QWORD *)v18 + 160LL))(v18, 0.55); cocos2d::CCLabelBMFont::limitLabelWidth(v18, *((float *)this + 183) - 80.0, 0.55, 0.3); (*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**((_QWORD **)this + 73) + 464LL))( *((_QWORD *)this + 73), v18, 2); v19 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, __int64 *))(*(_QWORD *)v18 + 184LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v94, v91, (float)(v92 + (float)(*((float *)this + 184) * 0.5)) - 40.0); v19(v18, v94); v20 = v91 - 110.0; v21 = v92 + 42.0; v97[0] = 0; v97[1] = 0; v98 = nullptr; std::string::__init(v97, "Rank:", 5u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v94, v20, v21); SetupTriggerPopup::createValueControlAdvanced(this, 4294967286LL, v97, v94, 1, 2, 4, 1, 0.7, 0.0, 0.0, 0, 0, 0, 2, 0); if ( (v97[0] & 1) != 0 ) operator delete(v98); SetupTriggerPopup::updateValue(this, -10, 1.0); v22 = GJLevelList::totalLevels(*((GJLevelList **)this + 130)); v99[0] = 0; v99[1] = 0; v100 = nullptr; std::string::__init(v99, "Levels:", 7u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v94, v20, v21 - 46.0); LOBYTE(v84) = 0; SetupTriggerPopup::createValueControlAdvanced( this, 4294967285LL, v99, v94, 1, 2, 4, 1, 0.7, 0.0, 0.0, 0, 0, 0, 2, v84); if ( (v99[0] & 1) != 0 ) operator delete(v100); if ( v22 > 0 ) v22 = 1; SetupTriggerPopup::updateValue(this, -11, (float)v22); v101 = 0; v102 = 0; v103 = nullptr; std::string::__init(&v101, "Diamonds:", 9u); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v94, v20, v21 - 92.0); LOBYTE(v85) = 0; SetupTriggerPopup::createValueControlAdvanced( this, 4294967284LL, &v101, v94, 1, 2, 4, 1, 0.7, 0.0, 0.0, 0, 0, 0, 2, v85); if ( (v101 & 1) != 0 ) operator delete(v103); SetupTriggerPopup::updateValue(this, -12, 0.0); v24 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11B8890, "chatFont.fnt", v23); *((_QWORD *)this + 140) = v24; v25 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v24 + 296LL); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v94, 0.0, 0.0); v25(v24, v94); (*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 140) + 160LL))(*((_QWORD *)this + 140), 0.6); (*(void (__fastcall **)(_QWORD, void *))(**((_QWORD **)this + 140) + 1072LL))(*((_QWORD *)this + 140), &unk_1168540); (*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 140) + 1024LL))(*((_QWORD *)this + 140), 4294967190LL); (*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))( *((_QWORD *)this + 73), *((_QWORD *)this + 140), 2); v26 = cocos2d::CCDictionary::objectForKey(*((cocos2d::CCDictionary **)this + 103), -12); v27 = v26; if ( v26 ) { v28 = (const cocos2d::CCPoint *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v26 + 192LL))(v26); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v93, v28); v29 = *(float *)&v93; v30 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v27 + 328LL))(v27); v31 = (*(float (__fastcall **)(__int64))(*(_QWORD *)v27 + 136LL))(v27); v32 = *((_QWORD *)this + 140); v33 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v32 + 184LL); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v94, (float)(v29 + (float)((float)(v30 * v31) * 0.5)) + 4.0, *((float *)&v93 + 1)); v33(v32, v94); } cocos2d::CCRect::CCRect((cocos2d::CCRect *)v94, 0.0, 0.0, 80.0, 80.0); v34 = cocos2d::extension::CCScale9Sprite::create("GJ_square02.png", v94); v35 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v34 + 960LL); LOWORD(v94[0]) = 0; BYTE2(v94[0]) = 0; v35(v34, v94); (*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v34 + 912LL))(v34, 75); v36 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v34 + 320LL); cocos2d::CCSize::CCSize((cocos2d::CCSize *)v94, 180.0, 110.0); v36(v34, v94); (*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(*((_QWORD *)this + 73), v34, 1); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v94, v91 + 70.0, v92 - 5.0); *(__n128 *)&v37 = cocos2d::CCPoint::operator=((char *)this + 1068, v94); (*(void (__fastcall **)(__int64, char *, long double))(*(_QWORD *)v34 + 184LL))(v34, (char *)this + 1068, v37); *(_OWORD *)((char *)this + 1076) = 0u; *(_OWORD *)((char *)this + 1092) = 0u; *((_DWORD *)this + 277) = 0; *((_DWORD *)this + 278) = 0; v38 = *((_QWORD *)this + 131); if ( v38 ) { v39 = *(int **)(v38 + 56); v40 = *v39; if ( *v39 ) { v41 = *((GJRateLevelListLayer ***)v39 + 2); v42 = -8; v43 = 8LL * v40 - 8; v44 = (char *)v41 + v43; if ( v41 <= (GJRateLevelListLayer **)((char *)v41 + v43) ) { do { if ( !*v41 ) break; v45 = GJRateLevelListLayer::impliedStarsForLevel(*v41, (GJGameLevel *)v42); v42 = (unsigned int)(v45 - 1); if ( (unsigned int)v42 <= 9 ) { v46 = (char *)this + 4 * v45; v42 = (unsigned int)(*((_DWORD *)v46 + 268) + 1); *((_DWORD *)v46 + 268) = v42; } ++v41; } while ( v44 >= (char *)v41 ); } } } v47 = 10.0; v48 = vmaxq_s32(*(int32x4_t *)((char *)this + 1076), (int32x4_t)0); if ( *((_DWORD *)this + 278) < *((_DWORD *)this + 277) ) v49 = *((_DWORD *)this + 277); else v49 = *((_DWORD *)this + 278); v50 = vmaxvq_s32(vmaxq_s32(v48, *(int32x4_t *)((char *)this + 1092))); if ( v49 < v50 ) v51 = v50; else v51 = v49; if ( (float)((float)v51 * 10.0) > 100.0 ) v47 = 100.0 / (float)v51; v52 = (int *)((char *)this + 1076); v53 = -70; for ( i = 0; ; i = v59 ) { v58 = *v52; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v94, (float)v53, -42.0); cocos2d::CCPoint::operator+(&v93, (char *)this + 1068); v59 = i + 1; LOWORD(v89) = 0; BYTE2(v89) = 0; GameToolbox::intToString((unsigned __int64 *)&v101, (GameToolbox *)(unsigned int)(i + 1)); if ( v58 <= 0 ) { LOWORD(v88) = 12371; BYTE2(v88) = 23; LOWORD(v89) = 8247; BYTE2(v89) = 16; std::string::assign(&v101, &byte_11B8890); if ( v47 < 10.0 ) { v55 = v47; v58 = 1; } else { v58 = 1; v55 = v47 * 0.5; *((float *)&v93 + 1) = *((float *)&v93 + 1) - (float)((float)(v47 * 0.5) * 0.5); } } else { switch ( i ) { case 1: LOWORD(v88) = -27904; v55 = v47; BYTE2(v88) = -1; break; case 2: LOWORD(v88) = -1536; v55 = v47; BYTE2(v88) = 60; break; case 3: LOBYTE(v88) = 94; v55 = v47; *(_WORD *)((char *)&v88 + 1) = 216; break; case 4: LOWORD(v88) = -4610; v55 = v47; BYTE2(v88) = 20; break; case 5: LOBYTE(v88) = -1; v55 = v47; *(_WORD *)((char *)&v88 + 1) = 183; break; case 6: LOBYTE(v88) = -1; v55 = v47; *(_WORD *)((char *)&v88 + 1) = 120; break; case 7: LOWORD(v88) = 30207; v55 = v47; BYTE2(v88) = -21; break; case 8: LOWORD(v88) = 11775; v55 = v47; BYTE2(v88) = -20; break; case 9: LOBYTE(v88) = -1; v55 = v47; *(_WORD *)((char *)&v88 + 1) = 45; break; default: LOWORD(v88) = -11517; v55 = v47; BYTE2(v88) = -1; break; } } v56 = (int)v55; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v94, (const cocos2d::CCPoint *)&v93); v104 = 0; v105 = 0; v106 = nullptr; if ( (v101 & 1) != 0 ) { std::string::__init(&v104, v103, v102); } else { v106 = v103; v104 = v101; v105 = v102; } GJRateLevelListLayer::createStatPillar( (__int64)this, &byte_9[1], v56, v58, v88, v89, (__int64)v94, (unsigned __int8 *)&v104); if ( (v104 & 1) != 0 ) operator delete(v106); if ( (v101 & 1) != 0 ) break; ++v52; v53 += 15; if ( v59 == 10 ) goto LABEL_62; LABEL_48: ; } ++v52; v53 += 15; operator delete(v103); if ( v59 != 10 ) goto LABEL_48; LABEL_62: v61 = ButtonSprite::create( (ButtonSprite *)"Unrate", nullptr, 0, 0, 0.35, "bigFont.fnt", "GJ_button_05.png", v57, 25.0); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v94, (float)((float)(*((float *)this + 183) * 0.5) + (float)(*(float *)&v90 * 0.5)) - 40.0, (float)((float)(*((float *)this + 184) * 0.5) + (float)(*((float *)&v90 + 1) * 0.5)) - 22.0); SetupTriggerPopup::addCustomButton(this, 4294967283LL, v61, v94, 0, 0); v63 = ButtonSprite::create( (ButtonSprite *)"Rank\nOnly", nullptr, 0, 0, 0.3, "bigFont.fnt", "GJ_button_05.png", v62, 25.0); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)v94, (float)((float)(*((float *)this + 183) * 0.5) + (float)(*(float *)&v90 * 0.5)) - 30.0, 20.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v90 + 1) * 0.5))); SetupTriggerPopup::addCustomButton(this, 4294967281LL, v63, v94, 0, 0); v65 = (cocos2d::CCArray *)cocos2d::CCArray::create(v64); v72 = ButtonSprite::create((ButtonSprite *)"Cancel", v66, v67, v68, v69, v70, v71); v73 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create(v72, 0, (__int64)this, 1368, 1); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v73); cocos2d::CCArray::addObject(v65, v73); v80 = ButtonSprite::create((ButtonSprite *)"Submit", v74, v75, v76, v77, v78, v79); v81 = (cocos2d::CCObject *)CCMenuItemSpriteExtra::create( v80, 0, (__int64)this, (__int64)GJRateLevelListLayer::onSubmit, 0); (*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v81); cocos2d::CCArray::addObject(v65, v81); v82 = *((cocos2d::CCNode **)this + 69); cocos2d::CCPoint::CCPoint( (cocos2d::CCPoint *)&v93, *(float *)&v90 * 0.5, 25.0 - (float)((float)(*((float *)this + 184) * 0.5) - (float)(*((float *)&v90 + 1) * 0.5))); cocos2d::CCNode::convertToNodeSpace(v94, v82, (const cocos2d::CCPoint *)&v93); GameToolbox::alignItemsHorisontally((__int64)v65, (__int64)v94, 0, 15.0); v83 = (*(float (__fastcall **)(GJRateLevelListLayer *, __int64))(*(_QWORD *)this + 1464LL))(this, 4294967285LL); GJRateLevelListLayer::updateStarSumLabel(this, (int)v83); SetupTriggerPopup::postSetup(this); if ( (v95[0] & 1) != 0 ) operator delete(v96); return v86; }
GD Web Decomp Icon

GD Web Decomp

Raw Source