//
// ReportPopup::createForComment from 0x7a1270 to 0x7a1408 (408 bytes)
//
// 1 xrefs:
// > CommentOptionsPopup::onReport @ 0x7a1418
//
// 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:59:54 +0000
//
_DWORD *__fastcall ReportPopup::createForComment(ReportPopup *this, GJComment *a2)
{
_DWORD *v3; // r4
int v5; // r3
int v6; // r3
int *v7; // r0
int v8; // r3
cocos2d::CCDictionary **v9; // r0
int v10; // r0
int v11; // r1
_BYTE *v12; // r2
int v13; // r3
_BYTE *v14; // r2
int v15; // r3
int v16; // r0
int v17; // r1
_BYTE *v18; // r2
const ReportPopupConfig *v19; // r1
int v20; // [sp+0h] [bp-80h] BYREF
int v21; // [sp+4h] [bp-7Ch]
_BYTE *v22; // [sp+8h] [bp-78h]
int v23; // [sp+Ch] [bp-74h] BYREF
int v24; // [sp+10h] [bp-70h]
_BYTE *v25; // [sp+14h] [bp-6Ch]
int v26; // [sp+18h] [bp-68h] BYREF
int v27; // [sp+1Ch] [bp-64h]
_BYTE *v28; // [sp+20h] [bp-60h]
char *v29[3]; // [sp+24h] [bp-5Ch] BYREF
int v30[2]; // [sp+30h] [bp-50h] BYREF
_DWORD *v31; // [sp+38h] [bp-48h]
unsigned __int8 v32[12]; // [sp+3Ch] [bp-44h] BYREF
int v33; // [sp+48h] [bp-38h] BYREF
int v34; // [sp+4Ch] [bp-34h]
_BYTE *v35; // [sp+50h] [bp-30h]
unsigned __int8 v36[12]; // [sp+60h] [bp-20h] BYREF
char *v37; // [sp+6Ch] [bp-14h] BYREF
if ( !this )
return nullptr;
if ( (unsigned int)(*((_DWORD *)this + 86) - 4) > 1 )
{
ReportPopupConfig::ReportPopupConfig((ReportPopupConfig *)v30);
v5 = *((_DWORD *)this + 86);
v3 = *((_DWORD **)this + 75);
if ( v5 == 3 )
{
v6 = 7;
}
else
{
if ( !v3 )
{
if ( v5 != 1 || *((int *)this + 77) <= 0 )
{
LABEL_7:
ReportPopupConfig::~ReportPopupConfig((char **)v30);
return v3;
}
v31 = *((_DWORD **)this + 77);
v30[0] = 4;
LABEL_15:
v7 = std::string::basic_string(&v20, (int)this + 276);
if ( (v20 & 1) != 0 )
v8 = v21;
else
v8 = (int)(unsigned __int8)v20 >> 1;
if ( !v8 )
{
v9 = (cocos2d::CCDictionary **)GameLevelManager::sharedState((GameLevelManager *)v7);
GameLevelManager::tryGetUsername((GameLevelManager *)&v23, v9, *((_DWORD *)this + 77));
if ( (v20 & 1) != 0 )
{
*v22 = 0;
v21 = 0;
}
else
{
LOWORD(v20) = 0;
}
std::string::reserve(&v20, 0);
v10 = v23;
v11 = v24;
v12 = v25;
v23 = 0;
v24 = 0;
v25 = nullptr;
v20 = v10;
v21 = v11;
v22 = v12;
std::string::~string((int)&v23);
}
std::string::operator=(v36, (unsigned __int8 *)&v20);
if ( (v20 & 1) != 0 )
v13 = v21;
else
v13 = (int)(unsigned __int8)v20 >> 1;
if ( !v13 )
std::string::assign(&v20, "Comment", 7u);
v30[1] = *((_DWORD *)this + 72);
std::string::operator=(v32, (unsigned __int8 *)&v20);
std::string::basic_string(&v26, (int)this + 264);
v15 = v33 & 1;
if ( (v33 & 1) != 0 )
{
v14 = v35;
v15 = 0;
}
else
{
BYTE1(v33) = v33 & 1;
}
if ( (v33 & 1) != 0 )
{
*v14 = v15;
v34 = v15;
}
else
{
LOBYTE(v33) = v15;
}
std::string::reserve(&v33, 0);
v16 = v26;
v17 = v27;
v18 = v28;
v26 = 0;
v27 = 0;
v28 = nullptr;
v33 = v16;
v34 = v17;
v35 = v18;
std::string::~string((int)&v26);
ReportPopup::reasonIndicesForType((ReportPopup *)v29, v30[0]);
sub_79F2A8(&v37, v29);
std::__vector_base::~__vector_base(v29);
v3 = ReportPopup::create((ReportPopup *)v30, v19);
std::string::~string((int)&v20);
goto LABEL_7;
}
v6 = 3;
}
v30[0] = v6;
v31 = v3;
goto LABEL_15;
}
return nullptr;
}