// // sub_4C275C from 0x4c275c to 0x4c2f3e (2018 bytes) // // 1 xrefs: // > FRequestProfilePage::init @ 0x4c2fa2 // // 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 // int __fastcall sub_4C275C(FRequestProfilePage *a1, _BOOL4 a2) { cocos2d::CCDirector *v4; // r0 cocos2d::CCNode *v5; // r5 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r8 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCLabelBMFont *v8; // r5 void (__fastcall *v9)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCLabelBMFont *v10; // r8 void (__fastcall *v11)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 int v12; // r5 cocos2d::CCLabelBMFont *v13; // r0 cocos2d::CCLabelBMFont *m_pageLabel; // r5 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCLabelBMFont *v16; // r5 void (__fastcall *v17)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 cocos2d::CCSprite *v18; // r0 CCMenuItemSpriteExtra *v19; // r5 cocos2d::CCMenu *v20; // r0 float v21; // s14 float v22; // s13 cocos2d::CCMenu_vtbl *v23; // r3 cocos2d::CCMenu *v24; // r5 void (__fastcall *v25)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 LoadingCircle *v26; // r0 cocos2d::CCLayer *m_mainLayer; // r3 LoadingCircle *m_circle; // r0 cocos2d::CCSprite *m_sprite; // r5 void (__fastcall *v30)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r8 float v31; // r5 cocos2d::CCSprite *v32; // r0 CCMenuItemSpriteExtra *v33; // r8 cocos2d::CCNode *m_buttonMenu; // r10 void (__fastcall *v35)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 ButtonSprite *v36; // r0 ButtonSprite *v37; // r11 CCMenuItemSpriteExtra *v38; // r11 cocos2d::CCSprite *v39; // r10 CCMenuItemToggler *v40; // r7 int v41; // r11 cocos2d::CCLabelBMFont *v42; // r7 void (__fastcall *v43)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCLabelBMFont *v44; // r0 cocos2d::CCLabelBMFont *m_errorLabel; // r7 void (__fastcall *v46)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 float v47; // s19 cocos2d::CCSprite *v48; // r11 CCMenuItemSpriteExtra *v49; // r0 cocos2d::CCNode *v50; // r10 void (__fastcall *v51)(cocos2d::CCPoint *, cocos2d::CCPoint *); // r11 cocos2d::CCSprite *v52; // r7 CCMenuItemSpriteExtra *v53; // r0 CCMenuItemSpriteExtra *m_nextButton; // r8 void (__fastcall *v55)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 cocos2d::CCSprite *v56; // r0 CCMenuItemSpriteExtra *v57; // r0 CCMenuItemSpriteExtra *m_refreshButton; // r6 cocos2d::CCNode *v59; // r11 void (__fastcall *v60)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r8 float v62; // r2 float v63; // r3 cocos2d::CCPoint *v64; // [sp+14h] [bp-68h] cocos2d::CCSprite *v65; // [sp+14h] [bp-68h] cocos2d::CCPoint *v66; // [sp+14h] [bp-68h] cocos2d::CCPoint *m_prevButton; // [sp+14h] [bp-68h] cocos2d::CCNode *v68; // [sp+14h] [bp-68h] cocos2d::CCSize v69; // [sp+1Ch] [bp-60h] BYREF cocos2d::CCPoint v70; // [sp+24h] [bp-58h] BYREF cocos2d::CCPoint v71; // [sp+2Ch] [bp-50h] BYREF cocos2d::CCPoint v72; // [sp+34h] [bp-48h] BYREF cocos2d::CCPoint v73; // [sp+3Ch] [bp-40h] BYREF cocos2d::CCPoint v74; // [sp+44h] [bp-38h] BYREF cocos2d::CCPoint v75; // [sp+4Ch] [bp-30h] BYREF cocos2d::CCPoint v76; // [sp+54h] [bp-28h] BYREF cocos2d::CCPoint v77; // [sp+5Ch] [bp-20h] BYREF cocos2d::CCRect v78; // [sp+64h] [bp-18h] BYREF cocos2d::CCSize v79; // 0:^0.8 cocos2d::CCRect v80; // 0:kr00_16.16 cocos2d::SEL_MenuHandler v81; // 0:r3.4,4:^0.4 a1->m_noElasticity = 1; a1->m_sent = a2; v4 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v69, v4); cocos2d::CCRect::CCRect(&v78, 0.0, 0.0, 80.0, 80.0); v80.origin.x = v62; v80.origin.y = v63; v80.size = v79; v5 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square01.png", (const char *)&v78, v80); ((void (__fastcall *)(cocos2d::CCNode *, int))v5->__vftable[1].~CCNode_0)(v5, 255); setContentSize = v5->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v78, 440.0, 290.0); setContentSize(v5, (const cocos2d::CCSize *)&v78); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v5, -1); setPosition = v5->setPosition; cocos2d::CCPoint::CCPoint(&v78.origin, v69.width * 0.5, v69.height * 0.5); setPosition(v5, &v78.origin); v8 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v8, 20); v9 = v8->setPosition; cocos2d::CCPoint::CCPoint(&v78.origin, v69.width * 0.5, (float)((float)(v69.height * 0.5) + 145.0) - 17.0); v9(v8, &v78.origin); cocos2d::CCLabelBMFont::limitLabelWidth(v8, 185.0, 0.8, 0.0); v10 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v10, 10); v11 = v10->setPosition; v12 = (int)v8->getPosition(v8); cocos2d::CCPoint::CCPoint(&v77, 0.0, -20.0); cocos2d::CCPoint::operator+(&v78, v12, &v77); v11(v10, &v78.origin); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v10->setScale)(v10, 1058642330); v13 = cocos2d::CCLabelBMFont::create(); a1->m_pageLabel = v13; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v13, 20); m_pageLabel = a1->m_pageLabel; setAnchorPoint = m_pageLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v78.origin, 1.0, 0.5); setAnchorPoint(m_pageLabel, &v78.origin); v16 = a1->m_pageLabel; v17 = v16->setPosition; cocos2d::CCPoint::CCPoint( &v78.origin, (float)((float)(v69.width * 0.5) + 220.0) - 10.0, (float)((float)(v69.height * 0.5) + 145.0) - 20.0); v17(v16, &v78.origin); v18 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_backBtn_001.png"); v78.origin.y = 0.0; LODWORD(v78.origin.x) = FRequestProfilePage::onClose; v19 = CCMenuItemSpriteExtra::create( v18, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(FRequestProfilePage::onClose, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v19, 1.6); v20 = (cocos2d::CCMenu *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v19, nullptr); v21 = (float)(v69.width * 0.5) - 220.0; v22 = (float)(v69.height * 0.5) + 145.0; v23 = v20->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v24 = v20; a1->m_buttonMenu = v20; v25 = v23->setPosition; cocos2d::CCPoint::CCPoint(&v77, v21 + 10.0, v22 - 10.0); v25(v24, &v77); a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_buttonMenu, 10); v26 = LoadingCircle::create(); m_mainLayer = a1->m_mainLayer; a1->m_circle = v26; v26->m_parentLayer = m_mainLayer; m_circle = a1->m_circle; m_circle->m_fade = 0; cocos2d::CCObject::retain(m_circle); LoadingCircle::show(a1->m_circle); a1->m_circle->setVisible(a1->m_circle, 0); m_sprite = a1->m_circle->m_sprite; v30 = m_sprite->setPosition; cocos2d::CCPoint::CCPoint(&v77, v69.width * 0.5, v69.height * 0.5); v30(m_sprite, &v77); LODWORD(v31) = a1->m_sent; if ( !a1->m_sent ) { v32 = cocos2d::CCSprite::createWithSpriteFrameName("accountBtn_pending_001.png"); v77.y = v31; LODWORD(v77.x) = FRequestProfilePage::onSentRequests; v33 = CCMenuItemSpriteExtra::create( v32, (cocos2d::CCObject *)LODWORD(v31), (cocos2d::SEL_MenuHandler)__PAIR64__(FRequestProfilePage::onSentRequests, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v33); m_buttonMenu = a1->m_buttonMenu; v35 = v33->setPosition; cocos2d::CCPoint::CCPoint( &v75, (float)((float)(v69.width * 0.5) + 220.0) - 10.0, (float)((float)(v69.height * 0.5) + 145.0) - 10.0); cocos2d::CCNode::convertToNodeSpace(&v76, m_buttonMenu, &v75); v35(v33, &v76); } if ( !a2 ) { v36 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("edit_delBtn_001.png"); v37 = ButtonSprite::create( v36, (cocos2d::CCSprite *)((char *)&dword_20 + 2), 0, 36.0, 1.0, 1, "GJ_button_04.png", nullptr, (bool)&_stack_chk_guard); ((void (__fastcall *)(ButtonSprite *, int))v37->setScale)(v37, 1060320051); v76.y = 0.0; LODWORD(v76.x) = FRequestProfilePage::onDeleteSelected; v38 = CCMenuItemSpriteExtra::create( v37, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(FRequestProfilePage::onDeleteSelected, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v38); cocos2d::CCPoint::CCPoint( &v72, (float)((float)(v69.width * 0.5) - 220.0) + 20.0, (float)((float)(v69.height * 0.5) - 145.0) + 21.0); v64 = (cocos2d::CCPoint *)v38->setPosition; cocos2d::CCNode::convertToNodeSpace(&v75, a1->m_buttonMenu, &v72); ((void (__fastcall *)(CCMenuItemSpriteExtra *, cocos2d::CCPoint *))v64)(v38, &v75); v39 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v65 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v39->setScale)(v39, 1060320051); ((void (__fastcall *)(cocos2d::CCSprite *, int))v65->setScale)(v65, 1060320051); v81.ptr = (void (__cdecl *)(cocos2d::CCObject *))FRequestProfilePage::onToggleAllObjects; v81.adj = 0; v75.y = 0.0; LODWORD(v75.x) = FRequestProfilePage::onToggleAllObjects; v40 = CCMenuItemToggler::create(v65, v39, a1, v81); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v40); v66 = (cocos2d::CCPoint *)v40->setPosition; v41 = (int)v38->getPosition(v38); cocos2d::CCPoint::CCPoint(&v73, 46.0, 0.0); cocos2d::CCPoint::operator+(&v74, v41, &v73); ((void (__fastcall *)(CCMenuItemToggler *, cocos2d::CCPoint *))v66)(v40, &v74); CCMenuItemToggler::setSizeMult(v40, 1.1); v42 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v42, 10); v43 = v42->setPosition; cocos2d::CCPoint::CCPoint(&v73, 80.0, 0.0); cocos2d::CCPoint::operator+(&v74, &v72, &v73); v43(v42, &v74); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v42->setScale)(v42, 1058642330); } v44 = cocos2d::CCLabelBMFont::create(); a1->m_errorLabel = v44; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v44, 10); m_errorLabel = a1->m_errorLabel; v46 = m_errorLabel->setPosition; cocos2d::CCPoint::CCPoint(&v74, v69.width * 0.5, v69.height * 0.5); v46(m_errorLabel, &v74); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_errorLabel->setScale)(a1->m_errorLabel, 1058642330); a1->m_errorLabel->setVisible(a1->m_errorLabel, 0); v47 = v69.height * 0.5; v48 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v48->setScale)(v48, 1061997773); v74.y = 0.0; LODWORD(v74.x) = FRequestProfilePage::onPrevPage; v49 = CCMenuItemSpriteExtra::create( v48, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(FRequestProfilePage::onPrevPage, (unsigned int)a1)); a1->m_prevButton = v49; a1->m_buttonMenu->addChild(a1->m_buttonMenu, v49); v50 = a1->m_buttonMenu; m_prevButton = (cocos2d::CCPoint *)a1->m_prevButton; v51 = *(void (__fastcall **)(cocos2d::CCPoint *, cocos2d::CCPoint *))(LODWORD(m_prevButton->x) + 92); cocos2d::CCPoint::CCPoint(&v72, (float)(v69.width * 0.5) - 195.0, v47); cocos2d::CCNode::convertToNodeSpace(&v73, v50, &v72); v51(m_prevButton, &v73); CCMenuItemSpriteExtra::setSizeMult(a1->m_prevButton, 2.0); v52 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); cocos2d::CCSprite::setFlipX(v52, 1); ((void (__fastcall *)(cocos2d::CCSprite *, int))v52->setScale)(v52, 1061997773); v73.y = 0.0; LODWORD(v73.x) = FRequestProfilePage::onNextPage; v53 = CCMenuItemSpriteExtra::create( v52, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(FRequestProfilePage::onNextPage, (unsigned int)a1)); a1->m_nextButton = v53; a1->m_buttonMenu->addChild(a1->m_buttonMenu, v53); m_nextButton = a1->m_nextButton; v55 = m_nextButton->setPosition; v68 = a1->m_buttonMenu; cocos2d::CCPoint::CCPoint(&v71, (float)(v69.width * 0.5) + 195.0, v47); cocos2d::CCNode::convertToNodeSpace(&v72, v68, &v71); v55(m_nextButton, &v72); CCMenuItemSpriteExtra::setSizeMult(a1->m_nextButton, 2.0); a1->m_prevButton->setVisible(a1->m_prevButton, 0); a1->m_nextButton->setVisible(a1->m_nextButton, 0); GameLevelManager::sharedState()->m_friendRequestDelegate = &a1->FriendRequestDelegate; v56 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v72.y = 0.0; LODWORD(v72.x) = FRequestProfilePage::onUpdate; v57 = CCMenuItemSpriteExtra::create( v56, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(FRequestProfilePage::onUpdate, (unsigned int)a1)); a1->m_refreshButton = v57; CCMenuItemSpriteExtra::setSizeMult(v57, 1.5); a1->m_buttonMenu->addChild(a1->m_buttonMenu, a1->m_refreshButton); m_refreshButton = a1->m_refreshButton; v59 = a1->m_buttonMenu; v60 = m_refreshButton->setPosition; cocos2d::CCPoint::CCPoint( &v70, (float)((float)(v69.width * 0.5) + 220.0) - 10.0, (float)((float)((float)(v69.height * 0.5) - 145.0) + 10.0) + 1.0); cocos2d::CCNode::convertToNodeSpace(&v71, v59, &v70); v60(m_refreshButton, &v71); a1->m_refreshButton->setVisible(a1->m_refreshButton, 0); FRequestProfilePage::loadPage(a1, 0); return 1; }
GD Web Decomp Icon

GD Web Decomp

Raw Source