//
// MessagesProfilePage::init from 0x5f043c to 0x5f0bb6 (1914 bytes)
//
// 1 xrefs:
// > MessagesProfilePage::create @ 0x5f0d5e
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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 11:54:27 +0000
//
GameManager *__fastcall MessagesProfilePage::init(MessagesProfilePage *this, bool a2)
{
GameManager *v4; // r0
GameManager *v5; // r10
int v6; // r6
void (__fastcall *v7)(int, _BYTE *); // r7
void (__fastcall *v8)(int, _BYTE *); // r7
const char *v9; // r2
char *v10; // r0
cocos2d::CCLabelBMFont *v11; // r6
void (__fastcall *v12)(cocos2d::CCLabelBMFont *, _BYTE *); // r7
const char *v13; // r2
int v14; // r0
int v15; // r6
void (__fastcall *v16)(int, _BYTE *); // r7
int v17; // r6
void (__fastcall *v18)(int, _BYTE *); // r7
const char *v19; // r1
int v20; // r0
cocos2d::CCMenu *v21; // r6
int v22; // r0
float v23; // s14
float v24; // s13
int v25; // r6
void (__fastcall *v26)(int, _BYTE *); // r9
LoadingCircle *v27; // r0
cocos2d::CCLayerColor *v28; // r0
int v29; // r3
int v30; // r6
void (__fastcall *v31)(int, _BYTE *); // r7
const char *v32; // r1
int v33; // r6
int v34; // r0
int v35; // r6
const cocos2d::CCPoint *v36; // r11
void (__fastcall *v37)(int, _BYTE *); // r9
float v38; // s19
float v39; // s21
int v40; // r0
int v41; // r9
void (__fastcall *v42)(int, _BYTE *); // r11
float v43; // s19
const char *v44; // r2
int v45; // r0
int v46; // r9
void (__fastcall *v47)(int, _BYTE *); // r11
const char *v48; // r1
int v49; // r0
int v50; // r0
const cocos2d::CCPoint *v51; // r11
void (__fastcall *v52)(cocos2d::CCPoint *, _BYTE *); // r9
cocos2d::CCNotificationCenter *updated; // r0
int v54; // r0
const char *v55; // r2
int v56; // r0
int v57; // r9
void (__fastcall *v58)(int, _BYTE *); // r11
const char *v59; // r1
float v60; // s19
int v61; // r11
int v62; // r0
void (__fastcall *v63)(int, _BYTE *); // r11
const char *v64; // r1
cocos2d::CCSprite *v65; // r9
int v66; // r0
const cocos2d::CCPoint *v67; // r11
void (__fastcall *v68)(cocos2d::CCPoint *, _BYTE *); // r9
const char *v69; // r1
int v70; // r0
int v71; // r0
int v72; // r8
const cocos2d::CCPoint *v73; // r11
void (__fastcall *v74)(int, _BYTE *); // r9
cocos2d::CCPoint *v76; // [sp+Ch] [bp-78h]
cocos2d::CCPoint *v77; // [sp+Ch] [bp-78h]
cocos2d::CCPoint *v78; // [sp+Ch] [bp-78h]
cocos2d::CCPoint *v79; // [sp+Ch] [bp-78h]
int v80; // [sp+14h] [bp-70h]
float v81; // [sp+1Ch] [bp-68h] BYREF
float v82; // [sp+20h] [bp-64h]
_DWORD (*v83)(MessagesProfilePage *__hidden, cocos2d::CCObject *); // [sp+24h] [bp-60h]
int v84; // [sp+28h] [bp-5Ch]
_DWORD (*v85)(MessagesProfilePage *__hidden, cocos2d::CCObject *); // [sp+2Ch] [bp-58h]
int v86; // [sp+30h] [bp-54h]
CCMenuItemToggler *(__fastcall *v87)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+34h] [bp-50h]
int v88; // [sp+38h] [bp-4Ch]
int (__fastcall *v89)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+3Ch] [bp-48h]
int v90; // [sp+40h] [bp-44h]
int (__fastcall *v91)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+44h] [bp-40h]
int v92; // [sp+48h] [bp-3Ch]
_DWORD (*v93)(MessagesProfilePage *__hidden, cocos2d::CCObject *); // [sp+4Ch] [bp-38h]
int v94; // [sp+50h] [bp-34h]
_DWORD (*v95)(MessagesProfilePage *__hidden, cocos2d::CCObject *); // [sp+54h] [bp-30h]
int v96; // [sp+58h] [bp-2Ch]
GameLevelManager *(__fastcall *v97)(MessagesProfilePage *, cocos2d::CCObject *); // [sp+5Ch] [bp-28h]
int v98; // [sp+60h] [bp-24h]
_BYTE v99[8]; // [sp+64h] [bp-20h] BYREF
_BYTE v100[16]; // [sp+6Ch] [bp-18h] BYREF
v4 = FLAlertLayer::init(this, 150);
v5 = v4;
if ( v4 )
{
*((_BYTE *)this + 536) = a2;
*((_BYTE *)this + 468) = 1;
cocos2d::CCDirector::sharedDirector(v4);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)&v81);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v100, 0.0, 0.0, 80.0, 80.0);
v6 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v100);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v6 + 456))(v6, 255);
v7 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v6 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v100, 440.0, 290.0);
v7(v6, v100);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v6, -1);
v8 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v6 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, v81 * 0.5, v82 * 0.5);
v8(v6, v100);
if ( *((_BYTE *)this + 536) )
v10 = "Old Sent Messages";
else
v10 = "Old Messages";
v11 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)v10, "bigFont.fnt", v9);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
v11,
20);
v12 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_DWORD *)v11 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, v81 * 0.5, (float)((float)(v82 * 0.5) + 145.0) - 20.0);
v12(v11, v100);
cocos2d::CCLabelBMFont::limitLabelWidth(v11, 185.0, 0.8, 0.0);
v14 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)" ", "goldFont.fnt", v13);
*((_DWORD *)this + 138) = v14;
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v14, 20);
v15 = *((_DWORD *)this + 138);
v16 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v15 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, 1.0, 0.5);
v16(v15, v100);
v17 = *((_DWORD *)this + 138);
v18 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v17 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v100,
(float)((float)(v81 * 0.5) + 220.0) - 10.0,
(float)((float)(v82 * 0.5) + 145.0) - 20.0);
v18(v17, v100);
v20 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_backBtn_001.png", v19);
v84 = 0;
v83 = MessagesProfilePage::onClose;
v21 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(v20, 0, (int)this, (int)MessagesProfilePage::onClose, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v21, 1.6);
v22 = cocos2d::CCMenu::create(v21, nullptr);
v23 = (float)(v81 * 0.5) - 220.0;
v24 = (float)(v82 * 0.5) + 145.0;
*((_DWORD *)this + 111) = v22;
v25 = v22;
v26 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v22 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, v23 + 10.0, v24 - 10.0);
v26(v25, v100);
v27 = (LoadingCircle *)(*(int (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 111),
10);
v28 = LoadingCircle::create(v27);
v29 = *((_DWORD *)this + 115);
*((_DWORD *)this + 141) = v28;
*((_DWORD *)v28 + 111) = v29;
*(_BYTE *)(*((_DWORD *)this + 141) + 448) = 0;
cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 141));
LoadingCircle::show(*((cocos2d::CCNode ***)this + 141));
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 141) + 172))(*((_DWORD *)this + 141), 0);
v30 = *(_DWORD *)(*((_DWORD *)this + 141) + 440);
v31 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v30 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, v81 * 0.5, v82 * 0.5);
v31(v30, v100);
v33 = *((unsigned __int8 *)this + 536);
if ( !*((_BYTE *)this + 536) )
{
v34 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"accountBtn_messagessent_001.png", v32);
v86 = v33;
v85 = MessagesProfilePage::onSentMessages;
v35 = CCMenuItemSpriteExtra::create(v34, v33, (int)this, (int)MessagesProfilePage::onSentMessages, v33);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v35);
v36 = *((const cocos2d::CCPoint **)this + 111);
v37 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v35 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v100,
(float)((float)(v81 * 0.5) + 220.0) - 10.0,
(float)((float)(v82 * 0.5) + 145.0) - 10.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v99, v36);
v37(v35, v99);
}
v38 = (float)((float)(v82 * 0.5) - 145.0) + 18.0;
v39 = (float)(v81 * 0.5) - 220.0;
v40 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"threadBtn_selectAll_001.png", v32);
v88 = 0;
v87 = MessagesProfilePage::onToggleAllObjects;
v41 = CCMenuItemSpriteExtra::create(v40, 0, (int)this, (int)MessagesProfilePage::onToggleAllObjects, 0);
CCMenuItemSpriteExtra::setSizeMult(v41, 1.4);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v41);
v42 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v41 + 92);
v76 = *((cocos2d::CCPoint **)this + 111);
v43 = v38 + 3.0;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, v39 + 21.0, v43);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v99, v76);
v42(v41, v99);
v45 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&unk_B6B226, "bigFont.fnt", v44);
*((_DWORD *)this + 147) = v45;
(*(void (__fastcall **)(int, int))(*(_DWORD *)v45 + 80))(v45, 1053609165);
v46 = *((_DWORD *)this + 147);
v47 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v46 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, v39 + 52.0, v43);
v47(v46, v100);
(*(void (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 147),
10);
v49 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"threadBtn_delete_001.png", v48);
v90 = 0;
v89 = MessagesProfilePage::onDeleteSelected;
v50 = CCMenuItemSpriteExtra::create(v49, 0, (int)this, (int)MessagesProfilePage::onDeleteSelected, 0);
*((_DWORD *)this + 148) = v50;
CCMenuItemSpriteExtra::setSizeMult(v50, 1.2);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 148));
v51 = *((const cocos2d::CCPoint **)this + 111);
v77 = *((cocos2d::CCPoint **)this + 148);
v52 = *(void (__fastcall **)(cocos2d::CCPoint *, _BYTE *))(*(_DWORD *)v77 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, v39 + 84.0, v43);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v99, v51);
v52(v77, v99);
updated = (cocos2d::CCNotificationCenter *)MessagesProfilePage::updateSelectUI(this);
v54 = cocos2d::CCNotificationCenter::sharedNotificationCenter(updated);
v92 = 0;
v91 = MessagesProfilePage::onSelectionChanged;
cocos2d::CCNotificationCenter::addObserver(
v54,
(int)this,
(int)MessagesProfilePage::onSelectionChanged,
0,
"MessageSelectionChangedNotification",
0);
v56 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Something went wrong...", "goldFont.fnt", v55);
*((_DWORD *)this + 139) = v56;
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 115) + 232))(*((_DWORD *)this + 115), v56, 10);
v57 = *((_DWORD *)this + 139);
v58 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v57 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, v81 * 0.5, v82 * 0.5);
v58(v57, v100);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 139) + 80))(*((_DWORD *)this + 139), 1058642330);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 139) + 172))(*((_DWORD *)this + 139), 0);
v60 = v82 * 0.5;
v61 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v59);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v61 + 80))(v61, 1061997773);
v94 = 0;
v93 = MessagesProfilePage::onPrevPage;
v62 = CCMenuItemSpriteExtra::create(v61, 0, (int)this, (int)MessagesProfilePage::onPrevPage, 0);
*((_DWORD *)this + 145) = v62;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v62);
v80 = *((_DWORD *)this + 145);
v63 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v80 + 92);
v78 = *((cocos2d::CCPoint **)this + 111);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, (float)(v81 * 0.5) - 195.0, v60);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v99, v78);
v63(v80, v99);
CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 145), 2.0);
v65 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_01_001.png",
v64);
cocos2d::CCSprite::setFlipX(v65, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *, int))(*(_DWORD *)v65 + 80))(v65, 1061997773);
v96 = 0;
v95 = MessagesProfilePage::onNextPage;
v66 = CCMenuItemSpriteExtra::create((int)v65, 0, (int)this, (int)MessagesProfilePage::onNextPage, 0);
*((_DWORD *)this + 144) = v66;
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 111) + 228))(*((_DWORD *)this + 111), v66);
v67 = *((const cocos2d::CCPoint **)this + 111);
v79 = *((cocos2d::CCPoint **)this + 144);
v68 = *(void (__fastcall **)(cocos2d::CCPoint *, _BYTE *))(*(_DWORD *)v79 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, (float)(v81 * 0.5) + 195.0, v60);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v99, v67);
v68(v79, v99);
CCMenuItemSpriteExtra::setSizeMult(*((_DWORD *)this + 144), 2.0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 145) + 172))(*((_DWORD *)this + 145), 0);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 144) + 172))(*((_DWORD *)this + 144), 0);
v70 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_updateBtn_001.png", v69);
v98 = 0;
v97 = MessagesProfilePage::onUpdate;
v71 = CCMenuItemSpriteExtra::create(v70, 0, (int)this, (int)MessagesProfilePage::onUpdate, 0);
*((_DWORD *)this + 146) = v71;
CCMenuItemSpriteExtra::setSizeMult(v71, 1.5);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 146));
v72 = *((_DWORD *)this + 146);
v73 = *((const cocos2d::CCPoint **)this + 111);
v74 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v72 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v100,
(float)((float)(v81 * 0.5) + 220.0) - 10.0,
(float)((float)((float)(v82 * 0.5) - 145.0) + 10.0) + 1.0);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v99, v73);
v74(v72, v99);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 146) + 172))(*((_DWORD *)this + 146), 0);
MessagesProfilePage::loadPage(this, nullptr);
}
return v5;
}