//
// FRequestProfilePage::init from 0xa4e008 to 0xa4ec6c (3172 bytes)
//
// 2 xrefs:
// > FRequestProfilePage::create @ 0xa4ee94
// > ??> @ 0x6c9e8
//
// 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:04 +0000
//
__int64 __fastcall FRequestProfilePage::init(FRequestProfilePage *this, char a2)
{
unsigned __int8 v4; // w0
unsigned int v5; // w24
cocos2d::CCDirector *v7; // x0
__int64 v8; // x21
void (__fastcall *v9)(__int64, __int64 *); // x23
void (__fastcall *v10)(__int64, __int64 *); // x23
const char *v11; // x2
char *v12; // x0
__int64 v13; // x0
__int64 v14; // x23
void (__fastcall *v15)(__int64, __int64 *); // x28
float v16; // s9
__int64 v17; // x23
void (__fastcall *v18)(__int64, __int64 *); // x28
void (__fastcall *v19)(__int64, __int64 *); // x2
void (__fastcall *v20)(__int64, __int64 *); // x28
int v21; // w2
__int64 v22; // x3
const char *v23; // x4
__int64 InputNode; // x28
const char *v25; // x2
__int64 v26; // x0
__int64 v27; // x28
const char *v28; // x1
__int64 v29; // x0
cocos2d::CCMenu *v30; // x28
__int64 v31; // x28
__int64 v32; // x25
__int64 (__fastcall *v33)(__int64, __int64 *); // x28
LoadingCircle *v34; // x0
__int64 v35; // x0
__int64 v36; // x25
void (__fastcall *v37)(__int64, __int64 *); // x28
const char *v38; // x1
__int64 v39; // x28
__int64 v40; // x25
float v41; // s11
cocos2d::CCNode *v42; // x28
void (__fastcall *v43)(__int64, __int64 *); // x23
float v44; // s9
float v45; // s11
const char *v46; // x1
__int64 v47; // x23
__int64 v48; // x23
cocos2d::CCNode *v49; // x28
void (__fastcall *v50)(__int64, __int64 *); // x25
__int64 v51; // x23
GJSelectionStrip *v52; // x0
cocos2d::CCNotificationCenter *updated; // x0
int v54; // w0
const char *v55; // x2
__int64 v56; // x0
__int64 v57; // x23
void (__fastcall *v58)(__int64, __int64 *); // x25
float v59; // s9
const char *v60; // x1
__int64 v61; // x25
__int64 v62; // x0
__int64 v63; // x25
cocos2d::CCNode *v64; // x27
void (__fastcall *v65)(__int64, __int64 *); // x26
const char *v66; // x1
cocos2d::CCSprite *v67; // x23
__int64 v68; // x0
__int64 v69; // x23
cocos2d::CCNode *v70; // x26
void (__fastcall *v71)(__int64, __int64 *); // x25
GameLevelManager *v72; // x0
__int64 v73; // x0
__int64 v74; // x0
__int64 v75; // x23
cocos2d::CCNode *v76; // x26
void (__fastcall *v77)(__int64, __int64 *); // x25
float v78; // [xsp+B0h] [xbp+B0h]
void (__fastcall *v79)(__int64, __int64 *); // [xsp+C0h] [xbp+C0h]
void (__fastcall *v80)(__int64, __int64 *); // [xsp+C0h] [xbp+C0h]
void (__fastcall *v81)(__int64, __int64 *); // [xsp+C0h] [xbp+C0h]
cocos2d::CCNode *v82; // [xsp+C0h] [xbp+C0h]
__int64 v83; // [xsp+C0h] [xbp+C0h]
__int64 v84; // [xsp+D8h] [xbp+D8h] BYREF
_BYTE v85[8]; // [xsp+E0h] [xbp+E0h] BYREF
__int64 v86[2]; // [xsp+E8h] [xbp+E8h] BYREF
__int64 v87[2]; // [xsp+F8h] [xbp+F8h] BYREF
void *v88; // [xsp+108h] [xbp+108h]
__int64 v89[2]; // [xsp+110h] [xbp+110h] BYREF
void *v90; // [xsp+120h] [xbp+120h]
v4 = FLAlertLayer::init(this, 150);
v5 = v4;
if ( v4 )
{
*((_BYTE *)this + 704) = a2;
*((_BYTE *)this + 596) = (unsigned __int8)&dword_0 + 1;
v7 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)((char *)&dword_0 + 1));
cocos2d::CCDirector::getWinSize(&v84, v7);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v86, 0.0, 0.0, 80.0, 80.0);
v8 = cocos2d::extension::CCScale9Sprite::create("GJ_square01.png", v86);
(*(void (__fastcall **)(__int64, __int64))(*(_QWORD *)v8 + 912LL))(v8, 0xFFFFFFFFLL);
v9 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v8 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v86, 440.0, 290.0);
v9(v8, v86);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v8,
0xFFFFFFFFLL);
v10 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v8 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, *(float *)&v84 * 0.5, *((float *)&v84 + 1) * 0.5);
v10(v8, v86);
if ( *((_BYTE *)this + 704) )
v12 = "Sent Requests";
else
v12 = "Friend Requests";
v13 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)v12, "bigFont.fnt", v11);
*((_QWORD *)this + 96) = v13;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v13,
20);
v14 = *((_QWORD *)this + 96);
v15 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v14 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v86,
*(float *)&v84 * 0.5,
(float)((float)(*((float *)&v84 + 1) * 0.5) + 145.0) - 17.0);
v15(v14, v86);
cocos2d::CCLabelBMFont::limitLabelWidth(*((cocos2d::CCLabelBMFont **)this + 96), 185.0, 0.8, 0.0);
v16 = (float)((float)(*((float *)&v84 + 1) * 0.5) + 145.0) - 45.0;
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v86, 0.0, 0.0, 40.0, 40.0);
v17 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v86);
v18 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v17 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v86, 200.0, 24.0);
v18(v17, v86);
v19 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v17 + 960LL);
LOWORD(v86[0]) = 13405;
BYTE2(v86[0]) = 31;
v19(v17, v86);
v20 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v17 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, *(float *)&v84 * 0.5, v16);
v20(v17, v86);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v17,
9);
InputNode = GameToolbox::createInputNode(
(GameToolbox *)"Search",
188.0,
24.0,
(const char *)&dword_14,
v21,
v22,
v23);
*((_QWORD *)this + 108) = InputNode;
v79 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)InputNode + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, *(float *)&v84 * 0.5, v16);
v79(InputNode, v86);
CCTextInputNode::setLabelPlaceholderScale(*((CCTextInputNode **)this + 108), 0.6);
*(_QWORD *)(*((_QWORD *)this + 108) + 584LL) = (char *)this + 544;
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 108),
10);
v26 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11E1A70, "chatFont.fnt", v25);
*((_QWORD *)this + 95) = v26;
(*(void (__fastcall **)(__int64, void *))(*(_QWORD *)v26 + 1072LL))(v26, &unk_11710F0);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 95) + 1024LL))(*((_QWORD *)this + 95), 4294967190LL);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 95),
20);
v27 = *((_QWORD *)this + 95);
v80 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v27 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v86,
*(float *)&v84 * 0.5,
(float)((float)(*((float *)&v84 + 1) * 0.5) + -145.0) + 14.0);
v80(v27, v86);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 95) + 160LL))(*((_QWORD *)this + 95), 0.5);
v29 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_backBtn_001.png", v28);
v30 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create(
v29,
0,
(__int64)this,
(__int64)FRequestProfilePage::onClose,
0);
CCMenuItemSpriteExtra::setSizeMult((__int64)v30, 1.6);
v31 = cocos2d::CCMenu::create(v30, nullptr);
*((_QWORD *)this + 69) = v31;
v81 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v31 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v86,
(float)((float)(*(float *)&v84 * 0.5) + -220.0) + 10.0,
(float)((float)(*((float *)&v84 + 1) * 0.5) + 145.0) - 10.0);
v81(v31, v86);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 69),
10);
v87[0] = 0;
v87[1] = 0;
v88 = nullptr;
std::string::__init(v87, "Friend Requests", 0xFu);
v89[0] = 0;
v89[1] = 0;
v90 = nullptr;
std::string::__init(
v89,
"Accept adds the player as a friend.\n"
"Ignore moves a request to the Ignored tab. They are not told, and you can still accept it there.\n"
"Requests you do not answer expire after 120 days.\n"
"A request carries a message only if you allow it in Account Settings.\n"
"Sent lists your own requests; Cancel takes one back.",
0x161u);
v32 = InfoAlertButton::create((char *)v87, (char *)v89, 0.8);
if ( (v89[0] & 1) != 0 )
operator delete(v90);
if ( (v87[0] & 1) != 0 )
operator delete(v88);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v32);
v33 = *(__int64 (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v32 + 184LL);
v82 = *((cocos2d::CCNode **)this + 69);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v85,
(float)((float)(*(float *)&v84 * 0.5) + 220.0) - 17.0,
(float)((float)(*((float *)&v84 + 1) * 0.5) + 145.0) - 17.0);
cocos2d::CCNode::convertToNodeSpace(v86, v82, (const cocos2d::CCPoint *)v85);
v34 = (LoadingCircle *)v33(v32, v86);
v35 = LoadingCircle::create(v34);
*((_QWORD *)this + 99) = v35;
*(_QWORD *)(v35 + 552) = *((_QWORD *)this + 73);
*(_BYTE *)(*((_QWORD *)this + 99) + 560LL) = 0;
cocos2d::CCObject::retain(*((cocos2d::CCObject **)this + 99));
LoadingCircle::show(*((cocos2d::CCNode ***)this + 99));
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 99) + 344LL))(*((_QWORD *)this + 99), 0);
v36 = *(_QWORD *)(*((_QWORD *)this + 99) + 544LL);
v37 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v36 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, *(float *)&v84 * 0.5, *((float *)&v84 + 1) * 0.5);
v37(v36, v86);
FRequestProfilePage::updateModeButtons(this);
v39 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_longBtn06_001.png", v38);
*(float *)&v82 = 20.8 / *(float *)((*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 328LL))(v39) + 4);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v39 + 160LL))(v39, *(float *)&v82);
v40 = CCMenuItemSpriteExtra::create(v39, 0, (__int64)this, (__int64)FRequestProfilePage::onGlobalSearch, 0);
CCMenuItemSpriteExtra::setSizeMult(v40, 1.2);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v40);
v78 = *(float *)&v82;
*(float *)&v82 = *(float *)&v82 * *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v39 + 328LL))(v39);
v41 = -(float)((float)(*(float *)&v82 + 4.0) - (float)(*(float *)&v84 * 0.5));
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v17 + 216LL))(v17, v41);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 108) + 216LL))(*((_QWORD *)this + 108), v41);
v42 = *((cocos2d::CCNode **)this + 69);
v43 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v40 + 184LL);
v44 = v16 - 1.0;
v45 = (float)((float)(v41 + 100.0) + 4.0) + (float)(*(float *)&v82 * 0.5);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v85, v45, v44);
cocos2d::CCNode::convertToNodeSpace(v86, v42, (const cocos2d::CCPoint *)v85);
v43(v40, v86);
v47 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_longBtn07_001.png", v46);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v47 + 160LL))(v47, v78);
v48 = CCMenuItemSpriteExtra::create(v47, 0, (__int64)this, (__int64)FRequestProfilePage::onClearSearch, 0);
CCMenuItemSpriteExtra::setSizeMult(v48, 1.2);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v48);
v49 = *((cocos2d::CCNode **)this + 69);
v50 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v48 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v85, (float)(v45 + *(float *)&v82) + 4.0, v44);
cocos2d::CCNode::convertToNodeSpace(v86, v49, (const cocos2d::CCPoint *)v85);
v50(v48, v86);
v51 = *((_QWORD *)this + 69);
v83 = *((_QWORD *)this + 73);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v86,
(float)((float)(*(float *)&v84 * 0.5) + -220.0) + 21.0,
(float)((float)((float)(*((float *)&v84 + 1) * 0.5) + -145.0) + 18.0) + 3.0);
v52 = (GJSelectionStrip *)GJSelectionStrip::create(
v51,
v83,
(const cocos2d::CCPoint *)v86,
(__int64)this,
(__int64)FRequestProfilePage::onToggleAllObjects,
0,
1.0);
*((_QWORD *)this + 111) = v52;
GJSelectionStrip::addCountLabel(v52, 31.0, 0xAu);
*((_QWORD *)this + 112) = GJSelectionStrip::addAction(
*((_QWORD *)this + 111),
(cocos2d::CCSprite *)"threadBtn_markRead_001.png",
(__int64)FRequestProfilePage::onMarkRead,
0,
63.0,
1.4);
GJSelectionStrip::addAction(
*((_QWORD *)this + 111),
(cocos2d::CCSprite *)"threadBtn_delete_001.png",
(__int64)FRequestProfilePage::onDeleteSelected,
0,
99.0,
1.2);
updated = (cocos2d::CCNotificationCenter *)FRequestProfilePage::updateSelectUI((GJSelectionStrip **)this);
v54 = cocos2d::CCNotificationCenter::sharedNotificationCenter(updated);
cocos2d::CCNotificationCenter::addObserver(
v54,
(int)this,
(int)FRequestProfilePage::onSelectionChanged,
0,
"RequestSelectionChangedNotification");
v56 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)"Something went wrong...", "chatFont.fnt", v55);
*((_QWORD *)this + 97) = v56;
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v56,
10);
v57 = *((_QWORD *)this + 97);
v58 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v57 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v86, *(float *)&v84 * 0.5, *((float *)&v84 + 1) * 0.5);
v58(v57, v86);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 97) + 160LL))(*((_QWORD *)this + 97), 0.6);
(*(void (__fastcall **)(_QWORD, void *))(**((_QWORD **)this + 97) + 1072LL))(*((_QWORD *)this + 97), &unk_11710F0);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 97) + 1024LL))(*((_QWORD *)this + 97), 4294967190LL);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 97) + 344LL))(*((_QWORD *)this + 97), 0);
v59 = (float)(*((float *)&v84 + 1) * 0.5) + -59.0;
v61 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_arrow_01_001.png", v60);
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v61 + 160LL))(v61, 0.8);
v62 = CCMenuItemSpriteExtra::create(v61, 0, (__int64)this, (__int64)FRequestProfilePage::onPrevPage, 0);
*((_QWORD *)this + 103) = v62;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v62);
v63 = *((_QWORD *)this + 103);
v64 = *((cocos2d::CCNode **)this + 69);
v65 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v63 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v85, (float)(*(float *)&v84 * 0.5) + -195.0, v59);
cocos2d::CCNode::convertToNodeSpace(v86, v64, (const cocos2d::CCPoint *)v85);
v65(v63, v86);
CCMenuItemSpriteExtra::setSizeMult(*((_QWORD *)this + 103), 2.0);
v67 = (cocos2d::CCSprite *)cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_arrow_01_001.png",
v66);
cocos2d::CCSprite::setFlipX(v67, 1);
(*(void (__fastcall **)(cocos2d::CCSprite *, float))(*(_QWORD *)v67 + 160LL))(v67, 0.8);
v68 = CCMenuItemSpriteExtra::create((__int64)v67, 0, (__int64)this, (__int64)FRequestProfilePage::onNextPage, 0);
*((_QWORD *)this + 102) = v68;
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v68);
v69 = *((_QWORD *)this + 102);
v70 = *((cocos2d::CCNode **)this + 69);
v71 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v69 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v85, (float)(*(float *)&v84 * 0.5) + 195.0, v59);
cocos2d::CCNode::convertToNodeSpace(v86, v70, (const cocos2d::CCPoint *)v85);
v71(v69, v86);
CCMenuItemSpriteExtra::setSizeMult(*((_QWORD *)this + 102), 2.0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 103) + 344LL))(*((_QWORD *)this + 103), 0);
v72 = (GameLevelManager *)(*(__int64 (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 102) + 344LL))(
*((_QWORD *)this + 102),
0);
*(_QWORD *)(GameLevelManager::sharedState(v72) + 1376) = (char *)this + 688;
v73 = cocos2d::CCSprite::createWithSpriteFrameName(
(cocos2d::CCSprite *)"GJ_updateBtn_001.png",
(const char *)this + 688);
v74 = CCMenuItemSpriteExtra::create(v73, 0, (__int64)this, (__int64)FRequestProfilePage::onUpdate, 0);
*((_QWORD *)this + 104) = v74;
CCMenuItemSpriteExtra::setSizeMult(v74, 1.5);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 69) + 456LL))(
*((_QWORD *)this + 69),
*((_QWORD *)this + 104));
v75 = *((_QWORD *)this + 104);
v76 = *((cocos2d::CCNode **)this + 69);
v77 = *(void (__fastcall **)(__int64, __int64 *))(*(_QWORD *)v75 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v85,
(float)((float)(*(float *)&v84 * 0.5) + 220.0) - 10.0,
(float)((float)((float)(*((float *)&v84 + 1) * 0.5) + -145.0) + 10.0) + 1.0);
cocos2d::CCNode::convertToNodeSpace(v86, v76, (const cocos2d::CCPoint *)v85);
v77(v75, v86);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 104) + 344LL))(*((_QWORD *)this + 104), 0);
FRequestProfilePage::loadPage(this, 0);
}
return v5;
}