//
// MemberListPopup::init from 0x74ae44 to 0x74b088 (580 bytes)
//
// 1 xrefs:
// > MemberListPopup::create @ 0x74b184
//
// 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:58:46 +0000
//
int __fastcall MemberListPopup::init(MemberListPopup *this, GJMessageThread *a2, ThreadViewPopup *a3, bool a4)
{
int inited; // r8
int v9; // r2
int v10; // r3
const char *v11; // r2
int v12; // r0
int v13; // r7
void (__fastcall *v14)(int, _DWORD *); // r9
int v15; // r7
void (__fastcall *v16)(int, _DWORD *); // r9
GJAccountManager *refreshed; // r0
int v18; // r7
_BOOL4 v19; // r7
int v20; // r6
ButtonSprite *v21; // r0
int v22; // r0
int v23; // r9
float v24; // s15
void (__fastcall *v25)(int, float *); // r10
GameLevelManager *v26; // r0
GameLevelManager *ThreadMembers; // r0
GameLevelManager *v28; // r6
GameLevelManager *v29; // r0
GameLevelManager *v30; // r0
int v31; // r1
int v32; // r2
float v34[2]; // [sp+10h] [bp-20h] BYREF
_DWORD v35[2]; // [sp+18h] [bp-18h] BYREF
int v36[3]; // [sp+20h] [bp-10h] BYREF
if ( !a2 )
return 0;
memset(v36, 0, sizeof(v36));
std::string::__init(v36, &unk_B6B226, 0);
inited = PagedListPopup::initPaged(
(int)this,
(cocos2d::CCLabelBMFont *)"Members",
(unsigned __int8 *)v36,
340.0,
260.0);
std::string::~string((int)v36);
if ( !inited )
return 0;
*((_DWORD *)this + 152) = a2;
cocos2d::CCObject::retain(a2);
*((_BYTE *)this + 616) = a4;
*((_DWORD *)this + 153) = a3;
PagedListPopup::createScrollArea(this, 48.0, 44.0);
ScrollableContentLayer::setSectionHeight(*((ScrollableContentLayer **)this + 136), 40.0, v9, v10);
v12 = cocos2d::CCLabelBMFont::create((cocos2d::CCLabelBMFont *)&unk_B6B226, "goldFont.fnt", v11);
*((_DWORD *)this + 157) = v12;
v13 = v12;
v14 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v12 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v35, 0.0, 0.5);
v14(v13, v35);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 157) + 80))(*((_DWORD *)this + 157), 1056964608);
v15 = *((_DWORD *)this + 157);
v16 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v15 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v35,
(float)(*((float *)this + 130) - (float)(*((float *)this + 132) * 0.5)) + 14.0,
(float)(*((float *)this + 131) - (float)(*((float *)this + 133) * 0.5)) + 24.0);
v16(v15, v35);
refreshed = (GJAccountManager *)(*(int (__fastcall **)(_DWORD, _DWORD, int))(**((_DWORD **)this + 115) + 232))(
*((_DWORD *)this + 115),
*((_DWORD *)this + 157),
5);
if ( *((_BYTE *)this + 616) )
{
v19 = 0;
}
else
{
v18 = *(_DWORD *)(*((_DWORD *)this + 152) + 132);
refreshed = (GJAccountManager *)GJAccountManager::sharedState(refreshed);
v19 = v18 == *((_DWORD *)refreshed + 70) - *((_DWORD *)refreshed + 71);
}
v20 = *((unsigned __int8 *)this + 616);
if ( !*((_BYTE *)this + 616) )
{
v21 = ButtonSprite::create(
(ButtonSprite *)"Add Member",
(const char *)&dword_58 + 2,
v20,
0.5,
1,
"bigFont.fnt",
"GJ_button_01.png",
(const char *)0x41D00000,
v34[0]);
v35[0] = MemberListPopup::onAddMember;
v35[1] = v20;
v22 = CCMenuItemSpriteExtra::create((int)v21, v20, (int)this, (int)MemberListPopup::onAddMember, v20);
*((_DWORD *)this + 155) = v22;
CCMenuItemSpriteExtra::setSizeMult(v22, 1.1);
(*(void (__fastcall **)(_DWORD, _DWORD))(**((_DWORD **)this + 111) + 228))(
*((_DWORD *)this + 111),
*((_DWORD *)this + 155));
v23 = *((_DWORD *)this + 155);
v24 = *((float *)this + 130);
v25 = *(void (__fastcall **)(int, float *))(*(_DWORD *)v23 + 92);
if ( v19 )
v24 = v24 - 57.0;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v34,
v24,
(float)(*((float *)this + 131) - (float)(*((float *)this + 133) * 0.5)) + 24.0);
v25(v23, v34);
refreshed = (GJAccountManager *)MemberListPopup::refreshPolicyBtn(this);
}
v26 = (GameLevelManager *)GameLevelManager::sharedState(refreshed);
ThreadMembers = (GameLevelManager *)GameLevelManager::getThreadMembers(
v26,
*(const char **)(*((_DWORD *)this + 152) + 52));
v28 = ThreadMembers;
if ( !ThreadMembers || !*((_DWORD *)this + 153) )
{
v29 = (GameLevelManager *)GameLevelManager::sharedState(ThreadMembers);
v30 = (GameLevelManager *)GameLevelManager::requestThreadMembers(
v29,
*(const char **)(*((_DWORD *)this + 152) + 52));
if ( v30 )
{
*(_DWORD *)(GameLevelManager::sharedState(v30) + 840) = (char *)this + 596;
if ( !v28 )
{
*((_BYTE *)this + 656) = 1;
PagedListPopup::showLoading(this, v31, v32);
}
}
}
MemberListPopup::buildRows((ScrollableContentLayer **)this);
return inited;
}