//
// ReportQueuePopup::init from 0x1400c7640 to 0x1400c7ed5 (2197 bytes)
//
// 5 xrefs:
// > MenuLayer::onReportQueue @ 0x140473dbe
// > MenuLayer::onReportQueue @ 0x140473dc5
// > MenuLayer::onReportQueue @ 0x140473daf
// > ??> @ 0x140724ba0
// > ??> @ 0x140913f04
//
// This function is hookable on this platform (idp: pc, 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 11:26:21 +0000
//
// Hidden C++ exception states: #wind=7
char __fastcall ReportQueuePopup::init(__int64 a1)
{
bool inited; // bl
void *v3; // r8
__int64 v5; // rdi
__int64 v6; // rbx
__int64 v7; // rax
__int64 v8; // rbx
__int64 v9; // rcx
float v10; // xmm6_4
cocos2d::CCObject *v11; // rbx
cocos2d::CCObject *v12; // rdi
__int64 v13; // rbx
__int64 v14; // rax
_BYTE *v15; // r14
_BYTE *v16; // rcx
const char *v17; // rdx
__int64 v18; // rax
_OWORD *v19; // rcx
_OWORD *v20; // rax
__int64 v21; // rdx
__int64 *v22; // rdi
__int64 v23; // rbx
__int64 v24; // rax
struct cocos2d::CCSprite *v25; // rax
cocos2d::CCObject *v26; // rdi
__int64 v27; // rbx
__int64 v28; // rax
char *v29; // rbx
char *v30; // rdi
_BYTE *v31; // rdx
size_t v32; // r8
__int64 *v33; // rdi
__int64 v34; // rbx
__int64 v35; // rax
__int64 v36; // rdi
__int64 v37; // rbx
__int64 v38; // rax
__int64 v39; // rdi
__int64 v40; // rbx
__int64 v41; // rax
__int64 v42; // rax
char *v43; // rbx
char *v44; // rdi
char *v45; // rax
void **v46; // [rsp+58h] [rbp-B0h] BYREF
void *v47[2]; // [rsp+60h] [rbp-A8h] BYREF
char *v48; // [rsp+70h] [rbp-98h]
__int128 *v49; // [rsp+78h] [rbp-90h] BYREF
__int128 v50; // [rsp+80h] [rbp-88h] BYREF
__int64 v51; // [rsp+90h] [rbp-78h]
__int64 v52; // [rsp+98h] [rbp-70h]
void *Block[2]; // [rsp+A0h] [rbp-68h] BYREF
__int64 v54; // [rsp+B0h] [rbp-58h]
unsigned __int64 v55; // [rsp+B8h] [rbp-50h]
__int128 v56; // [rsp+C0h] [rbp-48h]
__int64 v57; // [rsp+D0h] [rbp-38h]
__int64 v58; // [rsp+D8h] [rbp-30h]
*(_OWORD *)Block = 0;
v54 = 0;
v55 = 15;
LOBYTE(Block[0]) = 0;
inited = PagedListPopup::initPaged(a1, "Moderation Queue", (const char *)Block, 440.0, 300.0);
if ( v55 > 0xF )
{
v3 = Block[0];
if ( v55 + 1 >= 0x1000 )
{
v3 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v3 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v3);
}
if ( !inited )
return 0;
cocos2d::CCLabelBMFont::setFntFile(*(cocos2d::CCLabelBMFont **)(a1 + 744), (const char *)&qword_140704F78);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 744) + 160LL))(*(_QWORD *)(a1 + 744));
v5 = **(_QWORD **)(a1 + 744);
v6 = *(_QWORD *)(a1 + 744);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v49,
*(float *)(a1 + 664),
(float)((float)(*(float *)(a1 + 676) * 0.5) + *(float *)(a1 + 668)) - 14.0);
(*(void (__fastcall **)(__int64, __int64))(v5 + 184))(v6, v7);
PagedListPopup::createScrollArea(a1, 40.0, 40.0);
v8 = *(_QWORD *)(a1 + 688);
if ( *(float *)(v8 + 520) <= 0.0 )
{
v9 = *(_QWORD *)(v8 + 416);
if ( v9 )
(*(void (__fastcall **)(__int64))(*(_QWORD *)v9 + 488LL))(v9);
ScrollableContentLayer::ensureOwnedContentNode((_QWORD *)v8);
}
*(_DWORD *)(v8 + 520) = 1110179840;
v10 = (float)(*(float *)(a1 + 668) - (float)(*(float *)(a1 + 676) * 0.5)) + 22.0;
v49 = (__int128 *)operator new(0x2C8u);
v11 = (cocos2d::CCObject *)ButtonSprite::ButtonSprite((__int64)v49);
if ( v11 )
{
if ( ButtonSprite::init_1(
(__int64)v11,
(__int64)"Top",
44,
0,
1056964608,
1,
&qword_140704F78,
(__int64)"GJ_button_04.png",
1103101952) )
{
cocos2d::CCObject::autorelease(v11);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v11 + 8LL))(v11, 1);
v11 = nullptr;
}
}
*(_QWORD *)(a1 + 808) = v11;
v12 = CCMenuItemSpriteExtra::create((int)v11, 0, a1, (__int64)ReportQueuePopup::onToggleSort);
*((_DWORD *)v12 + 93) = 1066192077;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v12);
v13 = *(_QWORD *)v12;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v49,
(float)(*(float *)(a1 + 664) - (float)(*(float *)(a1 + 672) * 0.5)) + 40.0,
v10);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v13 + 184))(v12, v14);
v56 = 0;
v15 = sub_14003D460(0x170u);
*(_QWORD *)&v56 = v15;
v57 = 355;
v58 = 367;
v16 = v15;
v17 = "Accounts that need a look, highest pts first. Points come from blocked text and player reports.\n"
"\n"
"Review opens the account with everything reported and the actions. Bans and deletes do not close a case."
" Press Clear in the review when you are finished.\n"
"\n"
"Viewed by shows who opened the case in the last hour. It is a hint, not a lock.";
v18 = 2;
do
{
*(_OWORD *)v16 = *(_OWORD *)v17;
*((_OWORD *)v16 + 1) = *((_OWORD *)v17 + 1);
*((_OWORD *)v16 + 2) = *((_OWORD *)v17 + 2);
*((_OWORD *)v16 + 3) = *((_OWORD *)v17 + 3);
*((_OWORD *)v16 + 4) = *((_OWORD *)v17 + 4);
*((_OWORD *)v16 + 5) = *((_OWORD *)v17 + 5);
*((_OWORD *)v16 + 6) = *((_OWORD *)v17 + 6);
v16 += 128;
*((_OWORD *)v16 - 1) = *((_OWORD *)v17 + 7);
v17 += 128;
--v18;
}
while ( v18 );
*(_OWORD *)v16 = *(_OWORD *)v17;
*((_OWORD *)v16 + 1) = *((_OWORD *)v17 + 1);
*((_OWORD *)v16 + 2) = *((_OWORD *)v17 + 2);
*((_OWORD *)v16 + 3) = *((_OWORD *)v17 + 3);
*((_OWORD *)v16 + 4) = *((_OWORD *)v17 + 4);
*((_OWORD *)v16 + 5) = *((_OWORD *)v17 + 5);
*((_WORD *)v16 + 48) = *((_WORD *)v17 + 48);
v16[98] = v17[98];
v15[355] = 0;
v49 = &v50;
v50 = 0;
v51 = 0;
v52 = 0;
v19 = sub_14003D460(0x170u);
*(_QWORD *)&v50 = v19;
v51 = 355;
v52 = 367;
v20 = v15;
v21 = 2;
do
{
*v19 = *v20;
v19[1] = v20[1];
v19[2] = v20[2];
v19[3] = v20[3];
v19[4] = v20[4];
v19[5] = v20[5];
v19[6] = v20[6];
v19 += 8;
*(v19 - 1) = v20[7];
v20 += 8;
--v21;
}
while ( v21 );
*v19 = *v20;
v19[1] = v20[1];
v19[2] = v20[2];
v19[3] = v20[3];
v19[4] = v20[4];
v19[5] = v20[5];
*((_DWORD *)v19 + 24) = *((_DWORD *)v20 + 24);
*(_OWORD *)Block = 0;
v54 = 0;
v55 = 0;
Block[0] = sub_14003D460(0x20u);
v54 = 16;
v55 = 31;
strcpy((char *)Block[0], "Moderation Queue");
v22 = (__int64 *)InfoAlertButton::create(Block, &v50);
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v22);
v23 = *v22;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v46,
(float)(*(float *)(a1 + 664) - (float)(*(float *)(a1 + 672) * 0.5)) + 90.0,
v10);
(*(void (__fastcall **)(__int64 *, __int64))(v23 + 184))(v22, v24);
v25 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_updateBtn_001.png");
LODWORD(v23) = (_DWORD)v25;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v25 + 160LL))(v25);
v26 = CCMenuItemSpriteExtra::create(v23, 0, a1, (__int64)ReportQueuePopup::rebuildContent);
*((_DWORD *)v26 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, cocos2d::CCObject *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v26);
v27 = *(_QWORD *)v26;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v46,
(float)((float)(*(float *)(a1 + 672) * 0.5) + *(float *)(a1 + 664)) - 24.0,
v10);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v27 + 184))(v26, v28);
*(_OWORD *)v47 = 0;
v48 = nullptr;
v29 = (char *)sub_14003D460(0x60u);
v47[0] = v29;
v47[1] = v29;
v48 = v29 + 96;
v46 = v47;
v30 = (char *)off_1408FE3C8;
*(_QWORD *)&v50 = v29;
*((_QWORD *)&v50 + 1) = v29;
v51 = (__int64)v47;
do
{
v31 = *(_BYTE **)v30;
*(_OWORD *)v29 = 0;
*((_QWORD *)v29 + 2) = 0;
*((_QWORD *)v29 + 3) = 0;
v32 = -1;
do
++v32;
while ( v31[v32] );
sub_14003D230(v29, v31, v32);
v29 += 32;
*((_QWORD *)&v50 + 1) = v29;
v30 += 8;
}
while ( v30 != &byte_1408FE3E0 );
v47[1] = v29;
v33 = (__int64 *)Dropdown::create(a1, *(_QWORD *)(a1 + 552), (unsigned int)v47, 0, 1117782016, a1 + 784);
*(_QWORD *)(a1 + 816) = v33;
v34 = *v33;
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v46,
(float)((float)(*(float *)(a1 + 672) * 0.5) + *(float *)(a1 + 664)) - 86.0,
v10);
(*(void (__fastcall **)(__int64 *, __int64))(v34 + 184))(v33, v35);
(*(void (__fastcall **)(_QWORD, _QWORD, __int64))(**(_QWORD **)(a1 + 584) + 456LL))(
*(_QWORD *)(a1 + 584),
*(_QWORD *)(a1 + 816),
2);
v36 = **(_QWORD **)(a1 + 736);
v37 = *(_QWORD *)(a1 + 736);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v46, 1.0, 0.5);
(*(void (__fastcall **)(__int64, __int64))(v36 + 288))(v37, v38);
(**(void (__fastcall ***)(__int64, void *))(*(_QWORD *)(a1 + 736) + 368LL))(
*(_QWORD *)(a1 + 736) + 368LL,
&unk_140702E64);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)(a1 + 736) + 160LL))(*(_QWORD *)(a1 + 736));
v39 = **(_QWORD **)(a1 + 736);
v40 = *(_QWORD *)(a1 + 736);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)&v46,
(float)((float)(*(float *)(a1 + 672) * 0.5) + *(float *)(a1 + 664)) - 12.0,
(float)((float)(*(float *)(a1 + 676) * 0.5) + *(float *)(a1 + 668)) - 14.0);
(*(void (__fastcall **)(__int64, __int64))(v39 + 184))(v40, v41);
v42 = cocos2d::CCNotificationCenter::sharedNotificationCenter();
cocos2d::CCNotificationCenter::addObserver(
v42,
a1,
AccountReviewPopup::onModActionTaken,
"ReportedContentChangedNotification",
0);
PagedListPopup::loadPage(a1, 0);
v43 = (char *)v47[0];
if ( v47[0] )
{
v44 = (char *)v47[1];
if ( v47[0] != v47[1] )
{
do
{
sub_14003D310((__int64)v43);
v43 += 32;
}
while ( v43 != v44 );
v43 = (char *)v47[0];
}
v45 = v43;
if ( ((v48 - v43) & 0xFFFFFFFFFFFFFFE0uLL) >= 0x1000 )
{
v43 = *((char **)v43 - 1);
if ( (unsigned __int64)(v45 - v43 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v43);
*(_OWORD *)v47 = 0;
v48 = nullptr;
}
j_j_free(v15);
return 1;
}