//
// InvitesPopup::init from 0xc6c564 to 0xc6ca94 (1328 bytes)
//
// 3 xrefs:
// > InvitesPopup::create @ 0xc682a8
// > ??> @ 0x101bc0
// > ??> @ 0x14f0880
//
// 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:05:28 +0000
//
__int64 __fastcall InvitesPopup::init(InvitesPopup *this)
{
unsigned int inited; // w20
unsigned int v3; // w23
long double v5; // q0
const char *v6; // x6
long double v7; // q0
__int64 v8; // x20
void (__fastcall *v9)(__int64, float); // x24
float v10; // s0
__int64 v11; // x0
__int64 v12; // x24
void (__fastcall *v13)(__int64, _BYTE *); // x26
__int64 v14; // x0
char v15; // w1
float v16; // s9
const char *v17; // x1
__int64 v18; // x22
void (__fastcall *v19)(__int64, float); // x24
__int64 v20; // x0
float v21; // s10
float v22; // s10
float v23; // s8
__int64 v24; // x24
void (__fastcall *v25)(__int64, _BYTE *); // x25
void (__fastcall *v26)(__int64, _BYTE *); // x2
void (__fastcall *v27)(__int64, _BYTE *); // x25
int v28; // w2
__int64 v29; // x3
const char *v30; // x4
__int64 InputNode; // x24
void (__fastcall *v32)(__int64, _BYTE *); // x25
__int64 v33; // x22
__int64 (__fastcall *v34)(__int64, _BYTE *); // x24
GameLevelManager *v35; // x0
GameLevelManager *v36; // x0
GameLevelManager *ThreadInvites; // x0
_BYTE v38[16]; // [xsp+88h] [xbp+88h] BYREF
__int64 v39[2]; // [xsp+98h] [xbp+98h] BYREF
void *v40; // [xsp+A8h] [xbp+A8h]
__int64 v41; // [xsp+B0h] [xbp+B0h] BYREF
__int64 v42; // [xsp+B8h] [xbp+B8h]
void *v43; // [xsp+C0h] [xbp+C0h]
v41 = 0;
v42 = 0;
v43 = nullptr;
std::string::__init(&v41, &byte_11B8890, 0);
inited = (unsigned __int8)PagedListPopup::initPaged(
(__int64)this,
(cocos2d::CCLabelBMFont *)"Pending",
(unsigned __int8 *)&v41,
340.0,
260.0);
v3 = inited;
if ( (v41 & 1) != 0 )
{
operator delete(v43);
if ( !inited )
return v3;
LABEL_5:
PagedListPopup::createScrollArea(this, 64.0, 16.0);
LODWORD(v5) = 1113063424;
v7 = ScrollableContentLayer::setSectionHeight((ScrollableContentLayer *)*((_QWORD *)this + 86), v5);
v8 = *((_QWORD *)this + 93);
if ( v8 )
{
v9 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v8 + 232LL);
v10 = (*(float (__fastcall **)(_QWORD, long double))(*(_QWORD *)v8 + 240LL))(*((_QWORD *)this + 93), v7);
v9(v8, v10 + 2.0);
}
v11 = ButtonSprite::create(
(ButtonSprite *)"Ignored",
(const char *)&word_38,
0,
1,
0.4,
"bigFont.fnt",
"GJ_button_04.png",
v6,
22.0);
*((_QWORD *)this + 102) = v11;
(*(void (__fastcall **)(__int64, float))(*(_QWORD *)v11 + 160LL))(v11, 0.8);
v12 = CCMenuItemSpriteExtra::create(
*((_QWORD *)this + 102),
0,
(__int64)this,
(__int64)InvitesPopup::onToggleIgnored,
0);
CCMenuItemSpriteExtra::setSizeMult(v12, 1.2);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v12);
v13 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v12 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v38,
(float)(*((float *)this + 165) + (float)(*((float *)this + 167) * 0.5)) - 36.0,
(float)(*((float *)this + 166) + (float)(*((float *)this + 168) * 0.5)) - 17.0);
v13(v12, v38);
v39[0] = 0;
v39[1] = 0;
v40 = nullptr;
std::string::__init(v39, "Invites", 7u);
v41 = 0;
v42 = 0;
v43 = nullptr;
std::string::__init(
&v41,
"Message requests and group invites wait here.\n"
"Accepting a request opens the conversation, while accepting an invite joins the group chat.\n"
"Ignore moves it to the Ignored view. The sender is not told.\n"
"Ignored requests and invites can still be accepted later.\n"
"Requests and invites expire 14 days after they are sent and are then removed from both views.",
0x16Eu);
v14 = InfoAlertButton::create((char *)v39, (char *)&v41, 0.5);
v15 = v41;
*((_QWORD *)this + 103) = v14;
if ( (v15 & 1) != 0 )
{
operator delete(v43);
if ( (v39[0] & 1) == 0 )
goto LABEL_9;
}
else if ( (v39[0] & 1) == 0 )
{
LABEL_9:
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 69) + 456LL))(
*((_QWORD *)this + 69),
*((_QWORD *)this + 103));
InvitesPopup::layoutTitleInfo(this);
v16 = (float)(*((float *)this + 166) + (float)(*((float *)this + 168) * 0.5)) - 45.0;
v18 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_longBtn07_001.png", v17);
v19 = *(void (__fastcall **)(__int64, float))(*(_QWORD *)v18 + 160LL);
v20 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v18 + 328LL))(v18);
v19(v18, 20.8 / *(float *)(v20 + 4));
v21 = *(float *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v18 + 328LL))(v18);
v22 = v21 * (*(float (__fastcall **)(__int64))(*(_QWORD *)v18 + 168LL))(v18);
v23 = *((float *)this + 165) - (float)((float)(v22 + 4.0) * 0.5);
cocos2d::CCRect::CCRect((cocos2d::CCRect *)v38, 0.0, 0.0, 40.0, 40.0);
v24 = cocos2d::extension::CCScale9Sprite::create("square02b_small.png", v38);
v25 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v24 + 320LL);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v38, 200.0, 24.0);
v25(v24, v38);
v26 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v24 + 960LL);
qmemcpy(v38, "]4", 2);
v38[2] = 31;
v26(v24, v38);
v27 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v24 + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, v23, v16);
v27(v24, v38);
(*(void (__fastcall **)(_QWORD, __int64, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
v24,
9);
InputNode = GameToolbox::createInputNode(
(GameToolbox *)"Search",
188.0,
24.0,
(const char *)&dword_14,
v28,
v29,
v30);
*((_QWORD *)this + 104) = InputNode;
v32 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)InputNode + 184LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v38, v23, v16);
v32(InputNode, v38);
CCTextInputNode::setLabelPlaceholderScale(*((CCTextInputNode **)this + 104), 0.6);
*(_QWORD *)(*((_QWORD *)this + 104) + 584LL) = (char *)this + 544;
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 104),
10);
v33 = CCMenuItemSpriteExtra::create(v18, 0, (__int64)this, (__int64)InvitesPopup::onClearSearch, 0);
CCMenuItemSpriteExtra::setSizeMult(v33, 1.2);
(*(void (__fastcall **)(_QWORD, __int64))(**((_QWORD **)this + 69) + 456LL))(*((_QWORD *)this + 69), v33);
v34 = *(__int64 (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v33 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v38,
(float)((float)(v23 + 100.0) + 4.0) + (float)(v22 * 0.5),
v16 - 1.0);
v35 = (GameLevelManager *)v34(v33, v38);
v36 = (GameLevelManager *)GameLevelManager::sharedState(v35);
ThreadInvites = (GameLevelManager *)GameLevelManager::getThreadInvites(v36);
*(_QWORD *)(GameLevelManager::sharedState(ThreadInvites) + 1264) = (char *)this + 776;
PagedListPopup::showLoading(this);
return v3;
}
operator delete(v40);
goto LABEL_9;
}
if ( inited )
goto LABEL_5;
return v3;
}