//
// GJComment::create from 0x3cd0d0 to 0x3cd3e6 (790 bytes)
//
// 3 xrefs:
// > GameLevelManager::createAndGetCommentsFull @ 0x3cd4ea
// > GameLevelManager::createAndGetCommentsFull @ 0x3cd580
// > GJMultiplayerManager::addComment @ 0x51000e
//
// 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
//
GJComment *GJComment::create()
{
cocos2d::CCDictionary *v0; // r0
cocos2d::CCDictionary *v1; // r5
cocos2d::CCString *v2; // r0
char *CString; // r0
cocos2d::CCString *v4; // r0
int v5; // r11
cocos2d::CCString *v6; // r0
cocos2d::CCString *v7; // r0
const char *v8; // r0
cocos2d::CCString *v9; // r0
bool v10; // r10
cocos2d::CCString *v11; // r0
cocos2d::CCString *v12; // r0
char *v13; // r0
cocos2d::CCString *v14; // r0
cocos2d::CCString *v15; // r0
int v16; // r8
cocos2d::CCString *v17; // r0
int v18; // r9
GJComment *v19; // r0
GJComment *v20; // r4
cocos2d::CCString *v21; // r0
char *v22; // r0
cocos2d::CCArray *v23; // r6
cocos2d::CCString *v24; // r0
GLubyte v25; // r8
cocos2d::CCString *v26; // r0
GLubyte v27; // r5
cocos2d::CCString *v28; // r0
GLubyte v29; // r0
int v31; // [sp+0h] [bp-54h]
int v32; // [sp+4h] [bp-50h]
int v33; // [sp+8h] [bp-4Ch]
int v34; // [sp+Ch] [bp-48h]
cocos2d::ZipUtils v35; // [sp+10h] [bp-44h] BYREF
std::string v36; // [sp+14h] [bp-40h] BYREF
std::string v37; // [sp+18h] [bp-3Ch] BYREF
std::string v38; // [sp+1Ch] [bp-38h] BYREF
std::string v39; // [sp+20h] [bp-34h] BYREF
std::string v40; // [sp+24h] [bp-30h] BYREF
_BYTE v41[4]; // [sp+28h] [bp-2Ch] BYREF
std::string v42; // [sp+2Ch] [bp-28h] BYREF
std::string v43; // [sp+30h] [bp-24h] BYREF
std::string v44; // [sp+34h] [bp-20h] BYREF
std::string v45; // [sp+38h] [bp-1Ch] BYREF
_BYTE v46[4]; // [sp+3Ch] [bp-18h] BYREF
char *v47; // [sp+40h] [bp-14h] BYREF
std::string v48; // [sp+44h] [bp-10h] BYREF
std::string v49; // [sp+48h] [bp-Ch] BYREF
v1 = v0;
sub_776584((int)&v48, (char *)&aO1i2r3e45s7t89[3]);
v2 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v48);
CString = (char *)cocos2d::CCString::getCString(v2);
sub_776584((int)&v49, CString);
LevelTools::base64DecodeString(&v35, &v49);
sub_774008(&v49);
sub_774008(&v48);
sub_776584((int)&v36, (char *)&aO1i2r3e45s7t89[5]);
v4 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v36);
v5 = cocos2d::CCString::intValue(v4);
sub_774008(&v36);
sub_776584((int)&v37, (char *)&aO1i2r3e45s7t89[7]);
v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v37);
v31 = cocos2d::CCString::intValue(v6);
sub_774008(&v37);
sub_776584((int)&v38, "6");
v7 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v38);
v8 = cocos2d::CCString::getCString(v7);
v32 = atoi(v8);
sub_774008(&v38);
sub_776584((int)&v39, (char *)&aO1i2r3e45s7t89[10]);
v9 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v39);
v10 = cocos2d::CCString::boolValue(v9);
sub_774008(&v39);
sub_776584((int)&v40, (char *)&aO1i2r3e45s7t89[12]);
v11 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v40);
v33 = cocos2d::CCString::intValue(v11);
sub_774008(&v40);
sub_776584((int)&v42, (char *)&aO1i2r3e45s7t89[13]);
v12 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v42);
v13 = (char *)cocos2d::CCString::getCString(v12);
sub_776584((int)v41, v13);
sub_774008(&v42);
sub_776584((int)&v43, "10");
v14 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v43);
v34 = cocos2d::CCString::intValue(v14);
sub_774008(&v43);
sub_776584((int)&v44, "11");
v15 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v44);
v16 = cocos2d::CCString::intValue(v15);
sub_774008(&v44);
sub_776584((int)&v45, (char *)&aO1i2r3e45s7t89[1]);
v17 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v45);
v18 = cocos2d::CCString::intValue(v17);
v19 = (GJComment *)sub_774008(&v45);
v20 = GJComment::create(v19);
sub_775C20(v46);
sub_775D40(&v20->m_commentString, v46);
sub_774008(v46);
v20->m_userID = v5;
v20->m_isSpam = v10;
v20->m_likeCount = v31;
v20->m_commentID = v32;
v20->m_accountID = v33;
sub_775C20(&v47);
sub_775D40(&v20->m_uploadDate, &v47);
sub_774008(&v47);
v20->m_modBadge = v16;
v20->m_levelID = v18;
v20->m_percentage = v34;
if ( v18 )
v20->m_hasLevelID = 1;
if ( v16 > 0 )
{
sub_776584((int)&v48, "12");
v21 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(v1, &v48);
v22 = (char *)cocos2d::CCString::getCString(v21);
sub_776584((int)&v47, v22);
sub_774008(&v48);
sub_776584((int)&v49, v47);
v23 = sub_3BE530((cocos2d::CCArray *)&v49, ",");
sub_774008(&v49);
if ( cocos2d::CCArray::count(v23) > 2u )
{
v24 = cocos2d::CCArray::stringAtIndex(v23, 0);
v25 = cocos2d::CCString::intValue(v24);
v26 = cocos2d::CCArray::stringAtIndex(v23, 1u);
v27 = cocos2d::CCString::intValue(v26);
v28 = cocos2d::CCArray::stringAtIndex(v23, 2u);
v29 = cocos2d::CCString::intValue(v28);
v20->m_color.r = v25;
v20->m_color.g = v27;
v20->m_color.b = v29;
}
sub_774008(&v47);
}
sub_774008(v41);
sub_774008(&v35);
return v20;
}