//
// InfoLayer::confirmReport from 0x1007b0bb0 to 0x1007b0dd4 (548 bytes)
//
// 1 xrefs:
// > InfoLayer::init @ 0x1007af25f
//
// 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
//
void __fastcall InfoLayer::confirmReport(InfoLayer *a1, cocos2d::CCObject *a2)
{
GameLevelManager *v2; // rax
GJUserScore *m_score; // rcx
GJLevelList *m_levelList; // rcx
GJGameLevel *m_level; // rcx
const std::string::value_type *v6; // rsi
__int64 v7; // r14
const char *data; // r15
size_t v9; // rax
size_t v10; // r12
char *v11; // r13
char *v12; // rbx
int v13; // [rsp+0h] [rbp-80h]
_QWORD __dst[2]; // [rsp+8h] [rbp-78h] BYREF
void *__p; // [rsp+18h] [rbp-68h]
std::string __src; // [rsp+20h] [rbp-60h] BYREF
std::string v17; // [rsp+40h] [rbp-40h] BYREF
v2 = GameLevelManager::sharedState();
m_score = a1->m_score;
if ( m_score )
{
if ( GameLevelManager::hasReportedLevel(v2, m_score->m_userID) )
return;
}
else
{
m_levelList = a1->m_levelList;
if ( m_levelList )
{
if ( GameLevelManager::hasReportedLevel(v2, -m_levelList->m_listID) )
return;
}
else
{
m_level = a1->m_level;
if ( m_level )
{
if ( GameLevelManager::hasReportedLevel(v2, m_level->m_levelID.random - m_level->m_levelID.seed) )
return;
}
else if ( GameLevelManager::hasReportedLevel(v2, 0) )
{
return;
}
}
}
memset(&v17, 0, sizeof(v17));
memset(&__src, 0, sizeof(__src));
if ( a1->m_mode == User )
{
std::string::assign(&v17, "Report List");
v6 = "Do you want to report this list 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.";
}
else
{
std::string::assign(&v17, "Report Level");
v6 = "Do you want to report this level for breaking the upload guidelines found in the editor? Valid "
"reasons include hateful, abusive, or otherwise inappropriate content, as well as hacks, cheats, or exploits.";
}
std::string::assign(&__src, v6);
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
{
LODWORD(v7) = v17.__r_.__value_.__r.__words[2];
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 )
{
LABEL_16:
data = __src.__r_.__value_.__s.__data_;
goto LABEL_19;
}
}
else
{
v7 = (__int64)v17.__r_.__value_.__r.__words + 1;
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) == 0 )
goto LABEL_16;
}
data = __src.__r_.__value_.__l.__data_;
LABEL_19:
v9 = strlen(data);
if ( v9 >= 0xFFFFFFFFFFFFFFF8LL )
sub_100006BF0(0.0);
v10 = v9;
if ( v9 >= 0x17 )
{
v13 = v7;
v7 = 26;
if ( (v9 | 7) != 0x17 )
v7 = (v9 | 7) + 1;
v11 = (char *)operator new(v7);
__p = v11;
__dst[0] = v7 | 1;
__dst[1] = v10;
LODWORD(v7) = v13;
}
else
{
LOBYTE(__dst[0]) = 2 * v9;
v11 = (char *)__dst + 1;
if ( !v9 )
goto LABEL_27;
}
memmove(v11, data, v10);
LABEL_27:
v11[v10] = 0;
v12 = FLAlertLayer::create_1((int)a1 + 648, v7, (__int64)__dst, (int)"NO", (int)"YES", COERCE_DOUBLE(1136525312));
if ( (__dst[0] & 1) != 0 )
operator delete(__p);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v12 + 72LL))(v12, 2);
(*(void (__fastcall **)(char *))(*(_QWORD *)v12 + 1288LL))(v12);
if ( (*(_BYTE *)&__src.__r_.__value_.__s.0 & 1) != 0 )
operator delete(__src.__r_.__value_.__l.__data_);
if ( (*(_BYTE *)&v17.__r_.__value_.__s.0 & 1) != 0 )
operator delete(v17.__r_.__value_.__l.__data_);
}