//
// MemberListPopup::init from 0xc6ac48 to 0xc6afa8 (864 bytes)
//
// 2 xrefs:
// > MemberListPopup::create @ 0xc6b208
// > ??> @ 0x85d68
//
// 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:27 +0000
//
__int64 __fastcall MemberListPopup::init(MemberListPopup *this, GJMessageThread *a2, ThreadViewPopup *a3, char a4)
{
unsigned int inited; // w21
long double v10; // q0
const char *v11; // x2
__int64 v12; // x23
void (__fastcall *v13)(__int64, _BYTE *); // x24
__int64 v14; // x23
void (__fastcall *v15)(__int64, _BYTE *); // x24
__int64 refreshed; // x0
GameLevelManager *v17; // x0
GJAccountManager *v18; // x0
int v19; // w25
const char *v20; // x6
int v21; // w23
__int64 v22; // x0
__int64 v23; // x0
__int64 v24; // x24
bool v25; // zf
void (__fastcall *v26)(__int64, _BYTE *); // x23
float v27; // s0
GameLevelManager *v28; // x0
GameLevelManager *v29; // x0
GameLevelManager *v30; // x0
GameLevelManager *v31; // x0
_BYTE v32[8]; // [xsp+58h] [xbp+58h] BYREF
__int64 v33[2]; // [xsp+60h] [xbp+60h] BYREF
void *v34; // [xsp+70h] [xbp+70h]
if ( !a2 )
return 0;
v33[0] = 0;
v33[1] = 0;
v34 = nullptr;
std::string::__init(v33, &byte_11B8890, 0);
inited = (unsigned __int8)PagedListPopup::initPaged(
(__int64)this,
(cocos2d::CCLabelBMFont *)"Members",
(unsigned __int8 *)v33,
340.0,
260.0);
if ( (v33[0] & 1) != 0 )
{
operator delete(v34);
if ( !inited )
return 0;
}
else if ( !inited )
{
return 0;
}
*((_QWORD *)this + 100) = a2;
cocos2d::CCObject::retain(a2);
*((_QWORD *)this + 101) = a3;
*((_BYTE *)this + 816) = a4;
PagedListPopup::createScrollArea(this, 48.0, 44.0);
LODWORD(v10) = 1109393408;
ScrollableContentLayer::setSectionHeight(*((ScrollableContentLayer **)this + 86), v10);
v12 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&byte_11B8890, "goldFont.fnt", v11);
*((_QWORD *)this + 105) = v12;
v13 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v12 + 296LL);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v32, 0.0, 0.5);
v13(v12, v32);
(*(void (__fastcall **)(_QWORD, float))(**((_QWORD **)this + 105) + 160LL))(*((_QWORD *)this + 105), 0.5);
v14 = *((_QWORD *)this + 105);
v15 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v14 + 184LL);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v32,
(float)(*((float *)this + 165) - (float)(*((float *)this + 167) * 0.5)) + 14.0,
(float)(*((float *)this + 166) - (float)(*((float *)this + 168) * 0.5)) + 24.0);
v15(v14, v32);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**((_QWORD **)this + 73) + 464LL))(
*((_QWORD *)this + 73),
*((_QWORD *)this + 105),
5);
refreshed = *((unsigned __int8 *)this + 816);
if ( !*((_BYTE *)this + 816) )
{
v18 = *((GJAccountManager **)this + 100);
v19 = *((_DWORD *)v18 + 50);
refreshed = GJAccountManager::sharedState(v18);
v21 = *(_DWORD *)(refreshed + 352) - *(_DWORD *)(refreshed + 356);
if ( !*((_BYTE *)this + 816) )
{
v22 = ButtonSprite::create(
(ButtonSprite *)"Add Member",
(const char *)&qword_58 + 2,
*((unsigned __int8 *)this + 816),
1,
0.5,
"bigFont.fnt",
"GJ_button_01.png",
v20,
26.0);
v23 = CCMenuItemSpriteExtra::create(v22, 0, (__int64)this, (__int64)MemberListPopup::onAddMember, 0);
*((_QWORD *)this + 103) = v23;
CCMenuItemSpriteExtra::setSizeMult(v23, 1.1);
(*(void (__fastcall **)(_QWORD, _QWORD))(**((_QWORD **)this + 69) + 456LL))(
*((_QWORD *)this + 69),
*((_QWORD *)this + 103));
v24 = *((_QWORD *)this + 103);
v25 = v19 == v21;
v26 = *(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v24 + 184LL);
if ( v25 )
v27 = *((float *)this + 165) - 57.0;
else
v27 = *((float *)this + 165);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v32,
v27,
(float)(*((float *)this + 166) - (float)(*((float *)this + 168) * 0.5)) + 24.0);
v26(v24, v32);
refreshed = MemberListPopup::refreshPolicyBtn(this);
}
}
v17 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)refreshed);
if ( GameLevelManager::getThreadMembers(v17, (const char *)*(unsigned int *)(*((_QWORD *)this + 100) + 56LL)) )
{
if ( !*((_QWORD *)this + 101) )
{
v28 = (GameLevelManager *)GameLevelManager::sharedState(nullptr);
v29 = (GameLevelManager *)(unsigned __int8)GameLevelManager::requestThreadMembers(
v28,
(const char *)*(unsigned int *)(*((_QWORD *)this + 100) + 56LL));
if ( (_BYTE)v29 )
*(_QWORD *)(GameLevelManager::sharedState(v29) + 1264) = (char *)this + 776;
}
}
else
{
v30 = (GameLevelManager *)GameLevelManager::sharedState(nullptr);
v31 = (GameLevelManager *)(unsigned __int8)GameLevelManager::requestThreadMembers(
v30,
(const char *)*(unsigned int *)(*((_QWORD *)this + 100) + 56LL));
if ( (_BYTE)v31 )
{
*(_QWORD *)(GameLevelManager::sharedState(v31) + 1264) = (char *)this + 776;
*((_BYTE *)this + 880) = 1;
PagedListPopup::showLoading(this);
}
}
MemberListPopup::buildRows((GJAccountManager **)this);
return inited;
}