//
// InfoLayer::confirmReport from 0x1402bce50 to 0x1402bd26f (1055 bytes)
//
// 2 xrefs:
// > InfoLayer::init @ 0x1402bbb18
// > ??> @ 0x1406d2804
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=4
void InfoLayer::confirmReport(InfoLayer *a1, cocos2d::CCObject *a2)
{
GJUserScore *m_score; // rbx
int m_userID; // ebx
GJLevelList *m_levelList; // rbx
GJGameLevel *m_level; // rax
GameLevelManager *v7; // rcx
char *v8; // r9
size_t v9; // r8
void **v10; // rbx
__int64 v11; // rax
FLAlertLayer *v12; // rbx
void *v13; // rcx
void *v14; // rcx
void *v15; // [rsp+50h] [rbp-49h]
__int128 v16; // [rsp+58h] [rbp-41h] BYREF
__int64 v17; // [rsp+68h] [rbp-31h]
__int64 v18; // [rsp+70h] [rbp-29h]
_BYTE v19[32]; // [rsp+80h] [rbp-19h] BYREF
void *v20[2]; // [rsp+A0h] [rbp+7h] BYREF
__int64 v21; // [rsp+B0h] [rbp+17h]
unsigned __int64 v22; // [rsp+B8h] [rbp+1Fh]
void *Block[2]; // [rsp+C0h] [rbp+27h]
__int64 v24; // [rsp+D0h] [rbp+37h]
unsigned __int64 v25; // [rsp+D8h] [rbp+3Fh]
m_score = a1->m_score;
if ( m_score )
{
m_userID = m_score->m_userID;
}
else
{
m_levelList = a1->m_levelList;
if ( m_levelList )
{
m_userID = -m_levelList->m_listID;
}
else
{
m_level = a1->m_level;
if ( m_level )
m_userID = m_level->m_levelID.random - m_level->m_levelID.seed;
else
m_userID = 0;
}
}
v7 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v15 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v15);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v7 = (GameLevelManager *)qword_1406C2EC0;
}
if ( !GameLevelManager::hasReportedLevel(v7, m_userID) )
{
*(_OWORD *)v20 = 0;
v22 = 15;
LOBYTE(v20[0]) = 0;
*(_OWORD *)Block = 0;
v24 = 0;
v25 = 15;
LOBYTE(Block[0]) = 0;
if ( a1->m_mode == User )
{
v21 = 11;
strcpy((char *)v20, "Report List");
v8 = (char *)sub_14003AA10(0xE0u);
v24 = 218;
v25 = 223;
strcpy(
v8,
"Do you want to report this list for breaking the upload guidelines found in the editor? Valid re"
"asons include hateful, abusive, or otherwise inappropriate content, as well as hacks, cheats, or exploits.");
}
else
{
v21 = 12;
strcpy((char *)v20, "Report Level");
v8 = (char *)sub_14003AA10(0xE0u);
v24 = 219;
v25 = 223;
qmemcpy(
v8,
"Do you want to report this level for breaking the upload guidelines found in the editor? Valid r"
"easons include hateful, abusive, or otherwise inappropriate content, as well as hacks, cheats, or exploits",
218);
*((_WORD *)v8 + 109) = (unsigned __int8)aDoYouWantToCrR_0[218];
}
Block[0] = v8;
v16 = 0;
v17 = 0;
v18 = 0;
v9 = -1;
do
++v9;
while ( v8[v9] );
sub_14003A930(&v16, v8, v9);
v10 = v20;
if ( v22 > 0xF )
LODWORD(v10) = v20[0];
v11 = sub_14003BDB0((__int64)v19, (__int64)&v16);
v12 = FLAlertLayer::create(
(int)a1 + 648,
(int)v10,
v11,
(__int64)&unk_140547160,
(__int64)"YES",
1136525312,
0,
0,
1065353216);
sub_14003A830((__int64)&v16);
v12->setTag(v12, 2);
v12->show(v12);
if ( v25 > 0xF )
{
v13 = Block[0];
if ( v25 + 1 >= 0x1000 )
{
v13 = *((void **)Block[0] - 1);
if ( (unsigned __int64)((char *)Block[0] - (char *)v13 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v13);
}
if ( v22 > 0xF )
{
v14 = v20[0];
if ( v22 + 1 >= 0x1000 )
{
v14 = *((void **)v20[0] - 1);
if ( (unsigned __int64)((char *)v20[0] - (char *)v14 - 8) > 0x1F )
invalid_parameter_noinfo_noreturn();
}
j_j_free(v14);
}
}
}