//
// MessagesProfilePage::init from 0xa4b22c to 0xa4bb20 (2292 bytes)
//
// 2 xrefs:
// > MessagesProfilePage::create @ 0xa4bcfc
// > ??> @ 0x893c8
//
// 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 13:00:02 +0000
//
__int64 __fastcall MessagesProfilePage::init(MessagesProfilePage *this, char a2)
{
unsigned __int8 v4; // w0
unsigned int v5; // w26
cocos2d::CCDirector *v7; // x0
__int64 v8; // x22
void (__fastcall *v9)(__int64, _BYTE *); // x23
void (__fastcall *v10)(__int64, _BYTE *); // x23
const char *v11; // x2
char *v12; // x0
cocos2d::CCLabelBMFont *v13; // x22
void (__fastcall *v14)(cocos2d::CCLabelBMFont *, _BYTE *); // x25
const char *v15; // x2
__int64 v16; // x0
__int64 v17; // x22
void (__fastcall *v18)(__int64, _BYTE *); // x25
__int64 v19; // x22
void (__fastcall *v20)(__int64, _BYTE *); // x25
const char *v21; // x1
__int64 v22; // x0
cocos2d::CCMenu *v23; // x22
__int64 v24; // x25
void (__fastcall *v25)(__int64, _BYTE *); // x22
LoadingCircle *v26; // x0
__int64 v27; // x0
__int64 v28; // x22
void (__fastcall *v29)(__int64, _BYTE *); // x25
const char *v30; // x1
float v31; // s10
float v32; // s9
__int64 v33; // x0
__int64 v34; // x25
cocos2d::CCNode *v35; // x28
float v36; // s9
void (__fastcall *v37)(__int64, __int64 *); // x27
const char *v38; // x2
__int64 v39; // x0
__int64 v40; // x24
void (__fastcall *v41)(__int64, _BYTE *); // x25
const char *v42; // x1
__int64 v43; // x0
__int64 v44; // x0
__int64 v45; // x24
cocos2d::CCNode *v46; // x27
void (__fastcall *v47)(__int64, __int64 *); // x25
cocos2d::CCNotificationCenter *updated; // x0
int v49; // w0
const char *v50; // x2
__int64 v51; // x0
__int64 v52; // x23
void (__fastcall *v53)(__int64, _BYTE *); // x24
float v54; // s9
const char *v55; // x1
__int64 v56; // x24
__int64 v57; // x0
__int64 v58; // x24
cocos2d::CCNode *v59; // x27
void (__fastcall *v60)(__int64, __int64 *); // x25
const char *v61; // x1
cocos2d::CCSprite *v62; // x23
__int64 v63; // x0
__int64 v64; // x23
cocos2d::CCNode *v65; // x25
void (__fastcall *v66)(__int64, __int64 *); // x24
const char *v67; // x1
__int64 v68; // x0
__int64 v69; // x0
__int64 v70; // x23
cocos2d::CCNode *v71; // x25
void (__fastcall *v72)(__int64, __int64 *); // x24
__int64 v73; // x0
__int64 v74; // x25
cocos2d::CCNode *v75; // x28
void (__fastcall *v76)(__int64, __int64 *); // x27
__int64 v77; // [xsp+98h] [xbp+98h] BYREF
__int64 v78; // [xsp+A0h] [xbp+A0h] BYREF
_BYTE v79[16]; // [xsp+A8h] [xbp+A8h] BYREF
v4 = FLAlertLayer::init(this, 150);
v5 = v4;
if ( v4 )
{
*((_BYTE *)this + 696) = a2;
*((_BYTE *)this + 596) = (unsigned __int8)&dword_0 + 1;
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)((char *)&dword_0 + 1));
cocos2d::CCDirector::getWinSize(&v77, v7);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v79, 0.0, 0.0, 80.0, 80.0);
v8 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v79);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 912LL))(v8, 0xFFFFFFFFLL);
v9 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v8 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v79, 440.0, 290.0);
v9(v8, v79);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v8,
0xFFFFFFFFLL);
v10 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v8 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, *(float *)&v77 * 0.5, *((float *)&v77 + 1) * 0.5);
v10(v8, v79);
if ( *((_BYTE *)this + 696) )
v12 = "Old Sent Messages";
else
v12 = "Old Messages";
v13 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)v12, "bigFont.fnt", v11);
(*(void (__fastcall **)(_QWORD, cocos2d::CCLabelBMFont *, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v13,
20);
v14 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _BYTE *))(*(_QWORD *)v13 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v79,
*(float *)&v77 * 0.5,
(float)((float)(*((float *)&v77 + 1) * 0.5) + 145.0) - 20.0);
v14(v13, v79);
cocos2d::CCLabelBMFont::limitLabelWidth(v13, 185.0, 0.8, 0.0);
v16 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11E1A70, "goldFont.fnt", v15);
*((_QWORD *)this + 91) = v16;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v16,
20);
v17 = *((_QWORD *)this + 91);
v18 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v17 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, 1.0, 0.5);
v18(v17, v79);
v19 = *((_QWORD *)this + 91);
v20 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v19 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v79,
(float)((float)(*(float *)&v77 * 0.5) + 220.0) - 10.0,
(float)((float)(*((float *)&v77 + 1) * 0.5) + 145.0) - 20.0);
v20(v19, v79);
v22 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_backBtn_001.png", v21);
v23 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(
v22,
0,
(__int64)this,
(__int64)MessagesProfilePage::onClose,
0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v23, 1.6);
v24 = cocos2d::CCMenu::create(v23, nullptr);
*((_QWORD *)this + 69) = v24;
v25 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v24 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v79,
(float)((float)(*(float *)&v77 * 0.5) + -220.0) + 10.0,
(float)((float)(*((float *)&v77 + 1) * 0.5) + 145.0) - 10.0);
v25(v24, v79);
v26 = (LoadingCircle *)(*(__int64 (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 69),
10);
v27 = LoadingCircle::create(v26);
*((_QWORD *)this + 94) = v27;
*(_QWORD *)(v27 + 552) = *((_QWORD *)this + 73);
*(_BYTE *)(*((_QWORD *)this + 94) + 560LL) = 0;
cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 94));
LoadingCircle::show(*((cocos2d::CCNode ***)this + 94));
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 94) + 344LL))(*((_QWORD *)this + 94), 0);
v28 = *(_QWORD *)(*((_QWORD *)this + 94) + 544LL);
v29 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v28 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, *(float *)&v77 * 0.5, *((float *)&v77 + 1) * 0.5);
v29(v28, v79);
if ( !*((_BYTE *)this + 696) )
{
v73 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"accountBtn_messagessent_001.png", v30);
v74 = CCMenuItemSpriteExtra::create(v73, 0, (__int64)this, (__int64)MessagesProfilePage::onSentMessages, 0);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v74);
v75 = *((cocos2d::CCNode **)this + 69);
v76 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v74 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v79,
(float)((float)(*(float *)&v77 * 0.5) + 220.0) - 10.0,
(float)((float)(*((float *)&v77 + 1) * 0.5) + 145.0) - 10.0);
cocos2d::CCNode::convertToNodeSpace(&v78, v75, (const cocos2d::CCPoint *)v79);
v76(v74, &v78);
}
v31 = (float)(*(float *)&v77 * 0.5) + -220.0;
v32 = (float)((float)(*((float *)&v77 + 1) * 0.5) + -145.0) + 18.0;
v33 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"threadBtn_selectAll_001.png", v30);
v34 = CCMenuItemSpriteExtra::create(v33, 0, (__int64)this, (__int64)MessagesProfilePage::onToggleAllObjects, 0);
CCMenuItemSpriteExtra::setSizeMult(v34, 1.4);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v34);
v35 = *((cocos2d::CCNode **)this + 69);
v36 = v32 + 3.0;
v37 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v34 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, v31 + 21.0, v36);
cocos2d::CCNode::convertToNodeSpace(&v78, v35, (const cocos2d::CCPoint *)v79);
v37(v34, &v78);
v39 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11B8890, "bigFont.fnt", v38);
*((_QWORD *)this + 100) = v39;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v39 + 160LL))(v39, 0.4);
v40 = *((_QWORD *)this + 100);
v41 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v40 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, v31 + 52.0, v36);
v41(v40, v79);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 100),
10);
v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"threadBtn_delete_001.png", v42);
v44 = CCMenuItemSpriteExtra::create(v43, 0, (__int64)this, (__int64)MessagesProfilePage::onDeleteSelected, 0);
*((_QWORD *)this + 101) = v44;
CCMenuItemSpriteExtra::setSizeMult(v44, 1.2);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 69) + 456LL))(
*((_QWORD *)this + 69),
*((_QWORD *)this + 101));
v45 = *((_QWORD *)this + 101);
v46 = *((cocos2d::CCNode **)this + 69);
v47 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v45 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, v31 + 84.0, v36);
cocos2d::CCNode::convertToNodeSpace(&v78, v46, (const cocos2d::CCPoint *)v79);
v47(v45, &v78);
updated = (cocos2d::CCNotificationCenter *)MessagesProfilePage::updateSelectUI(this);
v49 = cocos2d::CCNotificationCenter::sharedNotificationCenter(updated);
cocos2d::CCNotificationCenter::addObserver(
v49,
(int)this,
(int)MessagesProfilePage::onSelectionChanged,
0,
"MessageSelectionChangedNotification");
v51 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Something went wrong...", "goldFont.fnt", v50);
*((_QWORD *)this + 92) = v51;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v51,
10);
v52 = *((_QWORD *)this + 92);
v53 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v52 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, *(float *)&v77 * 0.5, *((float *)&v77 + 1) * 0.5);
v53(v52, v79);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 92) + 160LL))(*((_QWORD *)this + 92), 0.6);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 92) + 344LL))(*((_QWORD *)this + 92), 0);
v54 = *((float *)&v77 + 1) * 0.5;
v56 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v55);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v56 + 160LL))(v56, 0.8);
v57 = CCMenuItemSpriteExtra::create(v56, 0, (__int64)this, (__int64)MessagesProfilePage::onPrevPage, 0);
*((_QWORD *)this + 98) = v57;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v57);
v58 = *((_QWORD *)this + 98);
v59 = *((cocos2d::CCNode **)this + 69);
v60 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v58 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, (float)(*(float *)&v77 * 0.5) + -195.0, v54);
cocos2d::CCNode::convertToNodeSpace(&v78, v59, (const cocos2d::CCPoint *)v79);
v60(v58, &v78);
CCMenuItemSpriteExtra::setSizeMult(*((_QWORD *)this + 98), 2.0);
v62 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_01_001.png",
v61);
cocos2d::CCSprite::setFlipX(v62, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *, float))(*(_QWORD *)v62 + 160LL))(v62, 0.8);
v63 = CCMenuItemSpriteExtra::create((__int64)v62, 0, (__int64)this, (__int64)MessagesProfilePage::onNextPage, 0);
*((_QWORD *)this + 97) = v63;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v63);
v64 = *((_QWORD *)this + 97);
v65 = *((cocos2d::CCNode **)this + 69);
v66 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v64 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v79, (float)(*(float *)&v77 * 0.5) + 195.0, v54);
cocos2d::CCNode::convertToNodeSpace(&v78, v65, (const cocos2d::CCPoint *)v79);
v66(v64, &v78);
CCMenuItemSpriteExtra::setSizeMult(*((_QWORD *)this + 97), 2.0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 98) + 344LL))(*((_QWORD *)this + 98), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 97) + 344LL))(*((_QWORD *)this + 97), 0);
v68 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_updateBtn_001.png", v67);
v69 = CCMenuItemSpriteExtra::create(v68, 0, (__int64)this, (__int64)MessagesProfilePage::onUpdate, 0);
*((_QWORD *)this + 99) = v69;
CCMenuItemSpriteExtra::setSizeMult(v69, 1.5);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 69) + 456LL))(
*((_QWORD *)this + 69),
*((_QWORD *)this + 99));
v70 = *((_QWORD *)this + 99);
v71 = *((cocos2d::CCNode **)this + 69);
v72 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v70 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v79,
(float)((float)(*(float *)&v77 * 0.5) + 220.0) - 10.0,
(float)((float)((float)(*((float *)&v77 + 1) * 0.5) + -145.0) + 10.0) + 1.0);
cocos2d::CCNode::convertToNodeSpace(&v78, v71, (const cocos2d::CCPoint *)v79);
v72(v70, &v78);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 99) + 344LL))(*((_QWORD *)this + 99), 0);
MessagesProfilePage::loadPage(this, 0);
}
return v5;
}