// // MessagesProfilePage::init from 0x4c12c8 to 0x4c1a3c (1908 bytes) // // 1 xrefs: // > MessagesProfilePage::create @ 0x4c1b70 // // 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 // bool MessagesProfilePage::init(MessagesProfilePage *a1, bool a2) { cocos2d::CCDirector *v4; // r0 cocos2d::CCNode *v5; // r6 void (__fastcall *setContentSize)(cocos2d::CCNode *__hidden, const cocos2d::CCSize *); // r7 void (__fastcall *setPosition)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCLabelBMFont *v8; // r6 void (__fastcall *v9)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCLabelBMFont *v10; // r0 cocos2d::CCLabelBMFont *m_levelsLabel; // r6 void (__fastcall *setAnchorPoint)(cocos2d::CCLabelBMFont *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCLabelBMFont *v13; // r6 void (__fastcall *v14)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r7 cocos2d::CCSprite *v15; // r0 CCMenuItemSpriteExtra *v16; // r6 cocos2d::CCMenu *v17; // r0 float v18; // s14 float v19; // s13 cocos2d::CCMenu_vtbl *v20; // r3 cocos2d::CCMenu *v21; // r6 void (__fastcall *v22)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 LoadingCircle *v23; // r0 cocos2d::CCLayer *m_mainLayer; // r3 LoadingCircle *m_loadingCircle; // r0 cocos2d::CCSprite *m_sprite; // r6 void (__fastcall *v27)(cocos2d::CCSprite *__hidden, const cocos2d::CCPoint *); // r7 _BOOL4 m_sentMessages; // r6 cocos2d::CCSprite *v29; // r0 CCMenuItemSpriteExtra *v30; // r6 cocos2d::CCMenu *m_buttonMenu; // r10 void (__fastcall *v32)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 ButtonSprite *v33; // r0 ButtonSprite *v34; // r6 CCMenuItemSpriteExtra *v35; // r7 void (__fastcall *v36)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCSprite *v37; // r9 cocos2d::CCSprite *v38; // r11 CCMenuItemToggler *v39; // r0 void (__fastcall *v40)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r11 int v41; // r9 cocos2d::CCLabelBMFont *v42; // r9 cocos2d::CCLabelBMFont *v43; // r0 cocos2d::CCLabelBMFont *m_errorLabel; // r10 void (__fastcall *v45)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 float v46; // s19 cocos2d::CCSprite *v47; // r10 CCMenuItemSpriteExtra *v48; // r0 cocos2d::CCMenu *v49; // r11 void (__fastcall *v50)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r10 cocos2d::CCSprite *v51; // r9 CCMenuItemSpriteExtra *v52; // r0 cocos2d::CCMenu *v53; // r10 void (__fastcall *v54)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 cocos2d::CCSprite *v55; // r0 CCMenuItemSpriteExtra *v56; // r0 CCMenuItemSpriteExtra *m_refreshButton; // r8 cocos2d::CCMenu *v58; // r10 void (__fastcall *v59)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // r9 float v61; // r2 float v62; // r3 int v63; // [sp+10h] [bp-7Ch] CCMenuItemToggler *m_toggleAllToggler; // [sp+18h] [bp-74h] void (__fastcall *v65)(cocos2d::CCNode *__hidden, const cocos2d::CCPoint *); // [sp+18h] [bp-74h] CCMenuItemSpriteExtra *m_prevButton; // [sp+18h] [bp-74h] CCMenuItemSpriteExtra *m_nextButton; // [sp+18h] [bp-74h] cocos2d::CCSize v68; // [sp+24h] [bp-68h] BYREF cocos2d::CCPoint v69; // [sp+2Ch] [bp-60h] BYREF void (*v70)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+34h] [bp-58h] int v71; // [sp+38h] [bp-54h] void (*v72)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+3Ch] [bp-50h] _BOOL4 v73; // [sp+40h] [bp-4Ch] void (*v74)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+44h] [bp-48h] int v75; // [sp+48h] [bp-44h] void (*v76)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+4Ch] [bp-40h] int v77; // [sp+50h] [bp-3Ch] void (*v78)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+54h] [bp-38h] int v79; // [sp+58h] [bp-34h] void (*v80)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+5Ch] [bp-30h] int v81; // [sp+60h] [bp-2Ch] void (*v82)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+64h] [bp-28h] int v83; // [sp+68h] [bp-24h] cocos2d::CCPoint v84; // [sp+6Ch] [bp-20h] BYREF cocos2d::CCRect v85; // [sp+74h] [bp-18h] BYREF cocos2d::CCSize v86; // 0:^0.8 cocos2d::CCRect v87; // 0:kr00_16.16 cocos2d::SEL_MenuHandler v88; // 0:r3.4,4:^0.4 v63 = FLAlertLayer::init(a1, (cocos2d::_ccColor4B)150); if ( v63 ) { a1->m_sentMessages = a2; a1->m_noElasticity = 1; v4 = cocos2d::CCDirector::sharedDirector(); cocos2d::CCDirector::getWinSize(&v68, v4); cocos2d::CCRect::CCRect(&v85, 0.0, 0.0, 80.0, 80.0); v87.origin.x = v61; v87.origin.y = v62; v87.size = v86; v5 = (cocos2d::CCNode *)cocos2d::extension::CCScale9Sprite::create( (cocos2d::extension::CCScale9Sprite *)"GJ_square01.png", (const char *)&v85, v87); ((void (__fastcall *)(cocos2d::CCNode *, int))v5->__vftable[1].~CCNode_0)(v5, 255); setContentSize = v5->setContentSize; cocos2d::CCSize::CCSize((cocos2d::CCSize *)&v85, 440.0, 290.0); setContentSize(v5, (const cocos2d::CCSize *)&v85); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v5, -1); setPosition = v5->setPosition; cocos2d::CCPoint::CCPoint(&v85.origin, v68.width * 0.5, v68.height * 0.5); setPosition(v5, &v85.origin); v8 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v8, 20); v9 = v8->setPosition; cocos2d::CCPoint::CCPoint(&v85.origin, v68.width * 0.5, (float)((float)(v68.height * 0.5) + 145.0) - 20.0); v9(v8, &v85.origin); cocos2d::CCLabelBMFont::limitLabelWidth(v8, 185.0, 0.8, 0.0); v10 = cocos2d::CCLabelBMFont::create(); a1->m_levelsLabel = v10; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v10, 20); m_levelsLabel = a1->m_levelsLabel; setAnchorPoint = m_levelsLabel->setAnchorPoint; cocos2d::CCPoint::CCPoint(&v85.origin, 1.0, 0.5); setAnchorPoint(m_levelsLabel, &v85.origin); v13 = a1->m_levelsLabel; v14 = v13->setPosition; cocos2d::CCPoint::CCPoint( &v85.origin, (float)((float)(v68.width * 0.5) + 220.0) - 10.0, (float)((float)(v68.height * 0.5) + 145.0) - 20.0); v14(v13, &v85.origin); v15 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_backBtn_001.png"); v71 = 0; v70 = MessagesProfilePage::onClose; v16 = CCMenuItemSpriteExtra::create( v15, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MessagesProfilePage::onClose, (unsigned int)a1)); CCMenuItemSpriteExtra::setSizeMult(v16, 1.6); v17 = (cocos2d::CCMenu *)cocos2d::CCMenu::create((cocos2d::CCMenu *)v16, nullptr); v18 = (float)(v68.width * 0.5) - 220.0; v19 = (float)(v68.height * 0.5) + 145.0; v20 = v17->cocos2d::CCLayerRGBA::cocos2d::CCLayer::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v21 = v17; a1->m_buttonMenu = v17; v22 = v20->setPosition; cocos2d::CCPoint::CCPoint(&v85.origin, v18 + 10.0, v19 - 10.0); v22(v21, &v85.origin); a1->m_mainLayer->addChild_0(a1->m_mainLayer, a1->m_buttonMenu, 10); v23 = LoadingCircle::create(); m_mainLayer = a1->m_mainLayer; a1->m_loadingCircle = v23; v23->m_parentLayer = m_mainLayer; m_loadingCircle = a1->m_loadingCircle; m_loadingCircle->m_fade = 0; cocos2d::CCObject::retain(m_loadingCircle); LoadingCircle::show(a1->m_loadingCircle); a1->m_loadingCircle->setVisible(a1->m_loadingCircle, 0); m_sprite = a1->m_loadingCircle->m_sprite; v27 = m_sprite->setPosition; cocos2d::CCPoint::CCPoint(&v85.origin, v68.width * 0.5, v68.height * 0.5); v27(m_sprite, &v85.origin); m_sentMessages = a1->m_sentMessages; if ( !a1->m_sentMessages ) { v29 = cocos2d::CCSprite::createWithSpriteFrameName("accountBtn_messagessent_001.png"); v73 = m_sentMessages; v72 = MessagesProfilePage::onSentMessages; v30 = CCMenuItemSpriteExtra::create( v29, (cocos2d::CCObject *)m_sentMessages, (cocos2d::SEL_MenuHandler)__PAIR64__(MessagesProfilePage::onSentMessages, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v30); m_buttonMenu = a1->m_buttonMenu; v32 = v30->setPosition; cocos2d::CCPoint::CCPoint( &v85.origin, (float)((float)(v68.width * 0.5) + 220.0) - 10.0, (float)((float)(v68.height * 0.5) + 145.0) - 10.0); cocos2d::CCNode::convertToNodeSpace(&v84, m_buttonMenu, &v85.origin); v32(v30, &v84); } v33 = (ButtonSprite *)cocos2d::CCSprite::createWithSpriteFrameName("edit_delBtn_001.png"); v34 = ButtonSprite::create( v33, (cocos2d::CCSprite *)((char *)&dword_20 + 2), 0, 36.0, 1.0, 1, "GJ_button_04.png", nullptr, v63); ((void (__fastcall *)(ButtonSprite *, int))v34->setScale)(v34, 1060320051); v75 = 0; v74 = MessagesProfilePage::onDeleteSelected; v35 = CCMenuItemSpriteExtra::create( v34, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MessagesProfilePage::onDeleteSelected, (unsigned int)a1)); a1->m_buttonMenu->addChild(a1->m_buttonMenu, v35); cocos2d::CCPoint::CCPoint( &v69, (float)((float)(v68.width * 0.5) - 220.0) + 20.0, (float)((float)(v68.height * 0.5) - 145.0) + 21.0); v36 = v35->setPosition; cocos2d::CCNode::convertToNodeSpace(&v85.origin, a1->m_buttonMenu, &v69); v36(v35, &v85.origin); v37 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v38 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v37->setScale)(v37, 1060320051); ((void (__fastcall *)(cocos2d::CCSprite *, int))v38->setScale)(v38, 1060320051); v88.ptr = (void (__cdecl *)(cocos2d::CCObject *))MessagesProfilePage::onToggleAllObjects; v88.adj = 0; v77 = 0; v76 = MessagesProfilePage::onToggleAllObjects; v39 = CCMenuItemToggler::create(v38, v37, a1, v88); a1->m_toggleAllToggler = v39; a1->m_buttonMenu->addChild(a1->m_buttonMenu, v39); m_toggleAllToggler = a1->m_toggleAllToggler; v40 = m_toggleAllToggler->setPosition; v41 = (int)v35->getPosition(v35); cocos2d::CCPoint::CCPoint(&v85.origin, 46.0, 0.0); cocos2d::CCPoint::operator+(&v84, v41, &v85); v40(m_toggleAllToggler, &v84); CCMenuItemToggler::setSizeMult(a1->m_toggleAllToggler, 1.1); v42 = cocos2d::CCLabelBMFont::create(); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v42, 10); v65 = v42->setPosition; cocos2d::CCPoint::CCPoint(&v85.origin, 80.0, 0.0); cocos2d::CCPoint::operator+(&v84, &v69, &v85); v65(v42, &v84); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))v42->setScale)(v42, 1058642330); v43 = cocos2d::CCLabelBMFont::create(); a1->m_errorLabel = v43; a1->m_mainLayer->addChild_0(a1->m_mainLayer, v43, 10); m_errorLabel = a1->m_errorLabel; v45 = m_errorLabel->setPosition; cocos2d::CCPoint::CCPoint(&v85.origin, v68.width * 0.5, v68.height * 0.5); v45(m_errorLabel, &v85.origin); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, int))a1->m_errorLabel->setScale)(a1->m_errorLabel, 1058642330); a1->m_errorLabel->setVisible(a1->m_errorLabel, 0); v46 = v68.height * 0.5; v47 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, int))v47->setScale)(v47, 1061997773); v79 = 0; v78 = MessagesProfilePage::onPrevPage; v48 = CCMenuItemSpriteExtra::create( v47, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MessagesProfilePage::onPrevPage, (unsigned int)a1)); a1->m_prevButton = v48; a1->m_buttonMenu->addChild(a1->m_buttonMenu, v48); v49 = a1->m_buttonMenu; m_prevButton = a1->m_prevButton; v50 = m_prevButton->setPosition; cocos2d::CCPoint::CCPoint(&v85.origin, (float)(v68.width * 0.5) - 195.0, v46); cocos2d::CCNode::convertToNodeSpace(&v84, v49, &v85.origin); v50(m_prevButton, &v84); CCMenuItemSpriteExtra::setSizeMult(a1->m_prevButton, 2.0); v51 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_arrow_01_001.png"); cocos2d::CCSprite::setFlipX(v51, 1); ((void (__fastcall *)(cocos2d::CCSprite *, int))v51->setScale)(v51, 1061997773); v81 = 0; v80 = MessagesProfilePage::onNextPage; v52 = CCMenuItemSpriteExtra::create( v51, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MessagesProfilePage::onNextPage, (unsigned int)a1)); a1->m_nextButton = v52; a1->m_buttonMenu->addChild(a1->m_buttonMenu, v52); v53 = a1->m_buttonMenu; m_nextButton = a1->m_nextButton; v54 = m_nextButton->setPosition; cocos2d::CCPoint::CCPoint(&v85.origin, (float)(v68.width * 0.5) + 195.0, v46); cocos2d::CCNode::convertToNodeSpace(&v84, v53, &v85.origin); v54(m_nextButton, &v84); CCMenuItemSpriteExtra::setSizeMult(a1->m_nextButton, 2.0); a1->m_prevButton->setVisible(a1->m_prevButton, 0); a1->m_nextButton->setVisible(a1->m_nextButton, 0); v55 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png"); v83 = 0; v82 = MessagesProfilePage::onUpdate; v56 = CCMenuItemSpriteExtra::create( v55, nullptr, (cocos2d::SEL_MenuHandler)__PAIR64__(MessagesProfilePage::onUpdate, (unsigned int)a1)); a1->m_refreshButton = v56; CCMenuItemSpriteExtra::setSizeMult(v56, 1.5); a1->m_buttonMenu->addChild(a1->m_buttonMenu, a1->m_refreshButton); m_refreshButton = a1->m_refreshButton; v58 = a1->m_buttonMenu; v59 = m_refreshButton->setPosition; cocos2d::CCPoint::CCPoint( &v85.origin, (float)((float)(v68.width * 0.5) + 220.0) - 10.0, (float)((float)((float)(v68.height * 0.5) - 145.0) + 10.0) + 1.0); cocos2d::CCNode::convertToNodeSpace(&v84, v58, &v85.origin); v59(m_refreshButton, &v84); a1->m_refreshButton->setVisible(a1->m_refreshButton, 0); MessagesProfilePage::loadPage(a1, 0); } return v63; }
GD Web Decomp Icon

GD Web Decomp

Raw Source