// // SupportLayer::customSetup from 0x42ce4c to 0x42d540 (1780 bytes) // // 0 xrefs: // // 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 // void SupportLayer::customSetup(SupportLayer *a1) { cocos2d::CCDirector *v2; // r0 ButtonSprite *v3; // r0 CCMenuItemSpriteExtra *v4; // r0 ButtonSprite *v5; // r0 ButtonSprite *v6; // r0 CCMenuItemSpriteExtra *v7; // r11 ButtonSprite *v8; // r0 CCMenuItemSpriteExtra *v9; // r10 ButtonSprite *v10; // r0 CCMenuItemSpriteExtra *v11; // r9 cocos2d::CCNode *v12; // r8 void (__fastcall *v13)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 void (__fastcall *v14)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 bool m_performanceMode; // r4 GJAccountManager *v16; // r0 ButtonSprite *v17; // r0 CCMenuItemSpriteExtra *v18; // r10 void (__fastcall *v19)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r4 GameStatsManager *v20; // r4 stl::StringData::Internal *v21; // r2 stl::StringData::Internal *v22; // r3 int isSpecialChestUnlocked; // r4 ButtonSprite *v24; // r0 CCMenuItemSpriteExtra *v25; // r4 int v26; // r10 float v27; // s18 float v28; // s17 cocos2d::CCMenu *v29; // r9 cocos2d::CCSprite *v30; // r10 void (__fastcall *v31)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r4 cocos2d::CCSprite *v32; // r0 CCMenuItemSpriteExtra *v33; // r4 int v34; // r0 cocos2d::CCSprite *v35; // r4 int v36; // r0 cocos2d::CCSprite *v37; // r0 CCMenuItemSpriteExtra *v38; // r6 void (__fastcall *v39)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 int v40; // r0 cocos2d::CCLabelBMFont *v41; // r6 void (__fastcall *v42)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 float v43; // s16 int v44; // r0 AchievementManager *v45; // r0 cocos2d::CCLabelBMFont *v46; // r4 void (__fastcall *v47)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r6 cocos2d::CCFadeTo *v48; // r0 cocos2d::CCMenu *v49; // [sp+10h] [bp-84h] float v50; // [sp+10h] [bp-84h] float v51; // [sp+10h] [bp-84h] float v52; // [sp+10h] [bp-84h] cocos2d::CCMenu *v53; // [sp+10h] [bp-84h] cocos2d::CCMenu *v54; // [sp+10h] [bp-84h] cocos2d::CCMenu *v55; // [sp+10h] [bp-84h] cocos2d::CCMenu *v56; // [sp+10h] [bp-84h] cocos2d::CCMenu *v57; // [sp+10h] [bp-84h] cocos2d::CCMenu *v58; // [sp+10h] [bp-84h] cocos2d::CCMenu *v59; // [sp+10h] [bp-84h] CCMenuItemSpriteExtra *v60; // [sp+14h] [bp-80h] void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+1Ch] [bp-78h] void (__fastcall *v62)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+1Ch] [bp-78h] cocos2d::CCSize v63; // [sp+24h] [bp-70h] BYREF cocos2d::CCPoint v64; // [sp+2Ch] [bp-68h] BYREF cocos2d::CCPoint v65; // [sp+34h] [bp-60h] BYREF void (*v66)(SupportLayer *, cocos2d::CCObject *); // [sp+3Ch] [bp-58h] int v67; // [sp+40h] [bp-54h] void (*v68)(SupportLayer *, cocos2d::CCObject *); // [sp+44h] [bp-50h] int v69; // [sp+48h] [bp-4Ch] void (*v70)(SupportLayer *, cocos2d::CCObject *); // [sp+4Ch] [bp-48h] int v71; // [sp+50h] [bp-44h] void (*v72)(SupportLayer *, cocos2d::CCObject *); // [sp+54h] [bp-40h] int v73; // [sp+58h] [bp-3Ch] void (*v74)(SupportLayer *, cocos2d::CCObject *); // [sp+5Ch] [bp-38h] int v75; // [sp+60h] [bp-34h] cocos2d::SEL_MenuHandler v76; // [sp+64h] [bp-30h] void (*v77)(SupportLayer *, cocos2d::CCObject *); // [sp+6Ch] [bp-28h] int v78; // [sp+70h] [bp-24h] void (*v79)(SupportLayer *, cocos2d::CCObject *); // [sp+74h] [bp-20h] int v80; // [sp+78h] [bp-1Ch] cocos2d::CCPoint v81; // [sp+7Ch] [bp-18h] BYREF cocos2d::CCPoint v82; // [sp+84h] [bp-10h] BYREF v2 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v63, v2); v3 = ButtonSprite::create( (ButtonSprite *)"Links", (const char *)&dword_44 + 2, 0, 0.5, 1, "bigFont.fnt", "GJ_button_01.png", COERCE_CONST_CHAR_(30.0), *(float *)&v49); v67 = 0; v66 = SupportLayer::onLinks; v4 = CCMenuItemSpriteExtra::create( v3, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SupportLayer::onLinks, (unsigned int)a1)); v5 = ButtonSprite::create( (ButtonSprite *)"Contact", (const char *)&dword_44 + 2, 0, 0.5, 1, "bigFont.fnt", "GJ_button_01.png", COERCE_CONST_CHAR_(30.0), *(float *)&v4); v69 = 0; v68 = SupportLayer::onEmail; v60 = CCMenuItemSpriteExtra::create( v5, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SupportLayer::onEmail, (unsigned int)a1)); v6 = ButtonSprite::create( (ButtonSprite *)"Privacy", (const char *)&dword_44 + 2, 0, 0.5, 1, "bigFont.fnt", "GJ_button_01.png", COERCE_CONST_CHAR_(30.0), v50); v71 = 0; v70 = SupportLayer::onPrivacy; v7 = CCMenuItemSpriteExtra::create( v6, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SupportLayer::onPrivacy, (unsigned int)a1)); v8 = ButtonSprite::create( (ButtonSprite *)"ToS", (const char *)&dword_44 + 2, 0, 0.5, 1, "bigFont.fnt", "GJ_button_01.png", COERCE_CONST_CHAR_(30.0), v51); v73 = 0; v72 = SupportLayer::onTOS; v9 = CCMenuItemSpriteExtra::create( v8, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SupportLayer::onTOS, (unsigned int)a1)); v10 = ButtonSprite::create( (ButtonSprite *)"SFX", (const char *)&dword_44 + 2, 0, 0.5, 1, "bigFont.fnt", "GJ_button_01.png", COERCE_CONST_CHAR_(30.0), v52); v75 = 0; v74 = SupportLayer::onSFX; v11 = CCMenuItemSpriteExtra::create( v10, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SupportLayer::onSFX, (unsigned int)a1)); v12 = (cocos2d::CCNode *)cocos2d::CCMenu::create(v53, v60, v7, v9, v11, 0); setPosition = v12->setPosition; cocos2d::CCPoint::CCPoint(&v82, v63.width * 0.5, (float)(v63.height * 0.5) + 60.0); setPosition(v12, &v82); v62 = v53->setPosition; cocos2d::CCPoint::CCPoint(&v82, -100.0, 20.0); v62(v53, &v82); v54 = (cocos2d::CCMenu *)v60->setPosition; cocos2d::CCPoint::CCPoint(&v82, 0.0, 20.0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v54)(v60, &v82); v55 = (cocos2d::CCMenu *)v11->setPosition; cocos2d::CCPoint::CCPoint(&v82, 100.0, 20.0); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v55)(v11, &v82); v13 = v7->setPosition; cocos2d::CCPoint::CCPoint(&v82, -50.0, -20.0); v13(v7, &v82); v14 = v9->setPosition; cocos2d::CCPoint::CCPoint(&v82, 50.0, -20.0); v14(v9, &v82); sub_776584((int)&v81, "Low Detail Mode"); v76 = (cocos2d::SEL_MenuHandler)(unsigned int)SupportLayer::onLowDetail; m_performanceMode = GameManager::sharedState()->m_performanceMode; cocos2d::CCPoint::CCPoint(&v82, (float)(v63.width * 0.5) - 160.0, (float)(v63.height * 0.5) - 90.0); SupportLayer::createToggleButton((int)a1, (int)&v81, v76, !m_performanceMode, v12, &v82, nullptr); sub_774008(&v81); v16 = GJAccountManager::sharedState(); if ( v16->m_accountID - v16->m_unkInt1 > 0 ) { v17 = ButtonSprite::create( (ButtonSprite *)"Req", (const char *)off_DC, 0, 0.4, 0, "bigFont.fnt", "GJ_button_04.png", (const char *)0x41C80000, *(float *)&v55); v78 = 0; v77 = SupportLayer::onRequestAccess; v18 = CCMenuItemSpriteExtra::create( v17, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SupportLayer::onRequestAccess, (unsigned int)a1)); v12->addChild(v12, v18); v19 = v18->setPosition; cocos2d::CCPoint::CCPoint(&v81, (float)(v63.width * 0.5) + 150.0, (float)(v63.height * 0.5) - 90.0); cocos2d::CCNode::convertToNodeSpace(&v82, v12, &v81); v19(v18, &v82); if ( vcvts_n_f32_s32(rand(), 0x1Fu) > 0.9 ) { v20 = GameStatsManager::sharedState(); sub_776584((int)&v82, "0023"); isSpecialChestUnlocked = GameStatsManager::isSpecialChestUnlocked((int)v20, (char **)&v82, v21, v22); sub_774008(&v82); if ( !isSpecialChestUnlocked ) { v24 = ButtonSprite::create( (ButtonSprite *)"?", (const char *)off_DC, 0, 0.6, 0, "goldFont.fnt", "GJ_button_05.png", (const char *)0x41C80000, *(float *)&v56); v80 = 0; v79 = SupportLayer::onGetReward; v25 = CCMenuItemSpriteExtra::create( v24, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SupportLayer::onGetReward, (unsigned int)a1)); v12->addChild(v12, v25); v57 = (cocos2d::CCMenu *)v25->setPosition; v26 = (int)v18->getPosition(v18); cocos2d::CCPoint::CCPoint(&v81, -50.0, 0.0); cocos2d::CCPoint::operator+(&v82, v26, &v81); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v57)(v25, &v82); } } } a1->m_mainLayer->addChild_0(a1->m_mainLayer, v12, 1); v27 = (float)(v63.width * 0.5) - 55.0; v28 = (float)(v63.width * 0.5) + 45.0; v29 = cocos2d::CCMenu::create(); v30 = cocos2d::CCSprite::createWithSpriteFrameName("developedBy_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v30); v31 = v30->setPosition; cocos2d::CCPoint::CCPoint(&v82, v27, (float)(v63.height * 0.5) + 0.0); v31(v30, &v82); v32 = cocos2d::CCSprite::createWithSpriteFrameName("robtoplogo_small.png"); v81.y = 0.0; LODWORD(v81.x) = SupportLayer::onRobTop; v33 = CCMenuItemSpriteExtra::create( v32, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SupportLayer::onRobTop, (unsigned int)a1)); v29->addChild(v29, v33); v58 = (cocos2d::CCMenu *)v33->setPosition; v34 = (int)v30->getPosition(v30); cocos2d::CCPoint::CCPoint(&v65, v28, *(float *)(v34 + 4)); cocos2d::CCNode::convertToNodeSpace(&v82, v29, &v65); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v58)(v33, &v82); v35 = cocos2d::CCSprite::createWithSpriteFrameName("poweredBy_001.png"); a1->m_mainLayer->addChild(a1->m_mainLayer, v35); v59 = (cocos2d::CCMenu *)v35->setPosition; v36 = (int)v30->getPosition(v30); cocos2d::CCPoint::CCPoint(&v82, v27, *(float *)(v36 + 4) - 35.0); ((void (__fastcall *)(cocos2d::CCSprite *, cocos2d::CCPoint *))v59)(v35, &v82); v37 = cocos2d::CCSprite::createWithSpriteFrameName("cocos2DxLogo.png"); v82.y = 0.0; LODWORD(v82.x) = SupportLayer::onCocos2d; v38 = CCMenuItemSpriteExtra::create( v37, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(SupportLayer::onCocos2d, (unsigned int)a1)); v29->addChild(v29, v38); v39 = v38->setPosition; v40 = (int)v35->getPosition(v35); cocos2d::CCPoint::CCPoint(&v64, v28, *(float *)(v40 + 4)); cocos2d::CCNode::convertToNodeSpace(&v65, v29, &v64); v39(v38, &v65); v41 = cocos2d::CCLabelBMFont::create(); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v41->setScale)(v41, 1051931443); a1->m_mainLayer->addChild(a1->m_mainLayer, v41); v42 = v41->setPosition; v43 = v63.width * 0.5; v44 = (int)v35->getPosition(v35); cocos2d::CCPoint::CCPoint(&v65, v43, *(float *)(v44 + 4) - 26.0); v42(v41, &v65); v45 = AchievementManager::sharedState(); if ( !AchievementManager::isAchievementEarned(v45, "geometry.ach.secret08") ) { v46 = cocos2d::CCLabelBMFont::create(); a1->addChild_0(a1, v46, 3); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v46->setScale)(v46, 1056964608); v46->setColor(v46, &stru_9AB5B8); v46->setOpacity(v46, 0); v47 = v46->setPosition; cocos2d::CCPoint::CCPoint(&v65, v63.width - 32.0, 8.0); v47(v46, &v65); v48 = cocos2d::CCFadeTo::create(10.0, 0x64u); cocos2d::CCNode::runAction(v46, v48); } a1->m_mainLayer->addChild_0(a1->m_mainLayer, v29, 2); }
GD Web Decomp Icon

GD Web Decomp

Raw Source