//
// AccountReviewPopup::reviewChoicePicked from 0x1400ba500 to 0x1400baaaf (1455 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407219b0
// > ??> @ 0x1409137e4
//
// 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:16 +0000
//
// Hidden C++ exception states: #wind=8
void __fastcall AccountReviewPopup::reviewChoicePicked(__int64 a1, int a2, int a3, __int64 a4)
{
__int64 v7; // r15
__int64 v8; // r14
__int64 v9; // rcx
__int64 v10; // rdx
int v11; // edx
int v12; // edx
int v13; // edx
const char *v14; // rdx
cocos2d::CCString *v15; // rax
const char *CString; // rax
size_t v17; // rbx
int v18; // ebx
__int64 v19; // rax
char *v20; // rax
void *v21; // rcx
const char *v22; // rdx
cocos2d::CCString *v23; // rax
const char *v24; // rax
size_t v25; // rbx
int v26; // ebx
__int64 v27; // rax
char *v28; // rax
void *v29; // rcx
void *v30; // rcx
int v31; // edx
const char *v32; // r9
const char *v33; // r8
cocos2d::CCString *v34; // rax
const char *v35; // rax
size_t v36; // rbx
size_t v37; // r8
__int64 v38; // rax
__int64 v39; // rsi
__int128 *v40; // rdx
cocos2d::CCObject *v41; // rbx
__int64 v42; // rax
void *v43; // [rsp+50h] [rbp-59h]
void *v44; // [rsp+58h] [rbp-51h]
void *Block[2]; // [rsp+60h] [rbp-49h] BYREF
__int64 v46; // [rsp+70h] [rbp-39h]
unsigned __int64 v47; // [rsp+78h] [rbp-31h]
void *v48[2]; // [rsp+80h] [rbp-29h] BYREF
__int64 v49; // [rsp+90h] [rbp-19h]
unsigned __int64 v50; // [rsp+98h] [rbp-11h]
__int128 v51; // [rsp+A0h] [rbp-9h] BYREF
__int64 v52; // [rsp+B0h] [rbp+7h]
unsigned __int64 v53; // [rsp+B8h] [rbp+Fh]
if ( a2 == 2 )
{
v7 = a1 - 824;
v8 = a1 - 48;
if ( a1 == 824 )
v8 = 0;
v9 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v43 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v43);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v9 = *(_QWORD *)&qword_14090BFB0;
}
*(_QWORD *)(v9 + 1384) = v8;
if ( (unsigned __int8)GameLevelManager::adminCloseCase(v9, *(unsigned int *)(a1 + 16), (unsigned int)a3, a4) )
PagedListPopup::showLoading(v7);
return;
}
if ( a2 != 1 )
return;
if ( a3 < 0 )
return;
v10 = *(_QWORD *)(a1 + 536);
if ( a3 >= (int)((*(_QWORD *)(a1 + 544) - v10) >> 2) )
return;
v11 = *(_DWORD *)(v10 + 4LL * a3) - 1;
if ( v11 )
{
v12 = v11 - 1;
if ( !v12 )
{
AccountReviewPopup::confirmDeleteSelected(a1 - 824);
return;
}
v13 = v12 - 1;
if ( v13 )
{
if ( v13 == 1 )
{
v14 = (const char *)(a1 + 24);
if ( *(_QWORD *)(a1 + 48) > 0xFu )
v14 = *(const char **)v14;
v15 = cocos2d::CCString::createWithFormat(
"Delete all profile posts from %s?\nLevel comments stay. Cannot be undone.",
v14);
CString = cocos2d::CCString::getCString(v15);
*(_OWORD *)v48 = 0;
v49 = 0;
v50 = 0;
v17 = -1;
do
++v17;
while ( CString[v17] );
sub_14003D230(v48, CString, v17);
*(_OWORD *)Block = 0;
v46 = 0;
v47 = 15;
LOBYTE(Block[0]) = 0;
v18 = a1 - 8;
if ( a1 == 824 )
v18 = 0;
v19 = ReportPopup::reasonIndicesForTextModeration(&v51);
v20 = sub_1400A51F0(v18, 2, (int)&qword_1407203B0, (__int64)v48, (__int64)"Delete", v19, (__int64)Block);
(*(void (__fastcall **)(char *))(*(_QWORD *)v20 + 1064LL))(v20);
sub_140069730((__int64)&v51);
if ( v47 > 0xF )
{
v21 = Block[0];
if ( v47 + 1 >= 0x1000 )
{
v21 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v21 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v21);
}
sub_14003D310((__int64)v48);
}
return;
}
v22 = (const char *)(a1 + 24);
if ( *(_QWORD *)(a1 + 48) > 0xFu )
v22 = *(const char **)v22;
v23 = cocos2d::CCString::createWithFormat(
"Delete all level, list and SFX comments from %s?\nProfile posts stay. Cannot be undone.",
v22);
v24 = cocos2d::CCString::getCString(v23);
*(_OWORD *)v48 = 0;
v49 = 0;
v50 = 0;
v25 = -1;
do
++v25;
while ( v24[v25] );
sub_14003D230(v48, v24, v25);
*(_OWORD *)Block = 0;
v46 = 0;
v47 = 15;
LOBYTE(Block[0]) = 0;
v26 = a1 - 8;
if ( a1 == 824 )
v26 = 0;
v27 = ReportPopup::reasonIndicesForTextModeration(&v51);
v28 = sub_1400A51F0(v26, 1, (int)&qword_1407203D0, (__int64)v48, (__int64)"Delete", v27, (__int64)Block);
(*(void (__fastcall **)(char *))(*(_QWORD *)v28 + 1064LL))(v28);
sub_140069730((__int64)&v51);
if ( v47 > 0xF )
{
v29 = Block[0];
if ( v47 + 1 >= 0x1000 )
{
v29 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v29 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
j_j_free(v29);
}
if ( v50 > 0xF )
{
v30 = v48[0];
if ( v50 + 1 >= 0x1000 )
{
v30 = *((void **)v48[0] - 1);
if ( (unsigned __int64)((char *)v48[0] - (char *)v30 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
LABEL_63:
j_j_free(v30);
}
}
else
{
v31 = *(_DWORD *)(a1 + 616);
v32 = (const char *)(a1 + 24);
if ( *(_QWORD *)(a1 + 48) > 0xFu )
v32 = *(const char **)v32;
v33 = (const char *)&unk_14070D03C;
if ( v31 == 1 )
v33 = &byte_1406ED6E0;
v34 = cocos2d::CCString::createWithFormat(
"Dismiss the reports on %i selected item%s by %s?\n"
"The reports are removed, the content stays. Cannot be undone.",
v31,
v33,
v32);
v35 = cocos2d::CCString::getCString(v34);
v51 = 0;
v52 = 0;
v53 = 0;
v36 = -1;
v37 = -1;
do
++v37;
while ( v35[v37] );
sub_14003D230(&v51, v35, v37);
v38 = a1 - 824;
v39 = a1 - 24;
if ( !v38 )
v39 = 0;
v40 = &v51;
if ( v53 > 0xF )
v40 = (__int128 *)v51;
*(_OWORD *)Block = 0;
v46 = 0;
v47 = 0;
do
++v36;
while ( *((_BYTE *)v40 + v36) );
sub_14003D230(Block, v40, v36);
v44 = operator new(0x298u);
v41 = (cocos2d::CCObject *)FLAlertLayer::FLAlertLayer((__int64)v44);
if ( v41 )
{
v42 = sub_14003F4F0((__int64)v48, (__int64)Block);
if ( FLAlertLayer::init(v41, v39, "Dismiss Reports", v42, (__int64)"Cancel", (__int64)"Dismiss", 380.0, 0, 0, 1.0) )
{
cocos2d::CCObject::autorelease(v41);
}
else
{
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v41 + 8LL))(v41, 1);
v41 = nullptr;
}
}
sub_14003D310((__int64)Block);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(*(_QWORD *)v41 + 64LL))(v41, 5);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v41 + 1064LL))(v41);
if ( v53 > 0xF )
{
v30 = (void *)v51;
if ( v53 + 1 >= 0x1000 )
{
v30 = *(void **)(v51 - 8);
if ( (unsigned __int64)(v51 - (_QWORD)v30 - 8) > 0x1F )
invoke_watson(nullptr, nullptr, nullptr, 0, 0);
}
goto LABEL_63;
}
}
}