//
// GJComment::create from 0x4c4aa8 to 0x4c4ee6 (1086 bytes)
//
// 3 xrefs:
// > GameLevelManager::createAndGetCommentsFull @ 0x4d29c0
// > GameLevelManager::createAndGetCommentsFull @ 0x4d2a56
// > GJMultiplayerManager::addComment @ 0x6418b0
//
// 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:50:29 +0000
//
int *__fastcall GJComment::create(GJComment *this, cocos2d::CCDictionary *a2)
{
cocos2d::CCString *v3; // r0
const char *CString; // r7
size_t v5; // r0
cocos2d::CCString *v6; // r0
int v7; // r11
cocos2d::CCString *v8; // r0
cocos2d::CCString *v9; // r0
const char *v10; // r0
cocos2d::CCString *v11; // r0
char v12; // r10
cocos2d::CCString *v13; // r0
cocos2d::CCString *v14; // r0
const char *v15; // r7
size_t v16; // r0
cocos2d::CCString *v17; // r0
cocos2d::CCString *v18; // r0
int v19; // r7
cocos2d::CCString *v20; // r0
char v21; // r9
cocos2d::CCString *v22; // r0
int v23; // r8
cocos2d::CCString *v24; // r0
GJComment *v25; // r0
int *v26; // r4
cocos2d::CCString *v27; // r0
int v28; // r9
char *v29; // r7
cocos2d::CCString *v30; // r0
const char *v31; // r5
size_t v32; // r0
size_t v33; // r0
cocos2d::CCArray *v34; // r7
cocos2d::CCString *v35; // r0
char v36; // r8
cocos2d::CCString *v37; // r0
char v38; // r5
cocos2d::CCString *v39; // r0
char v40; // r0
int v42; // [sp+4h] [bp-F8h]
int v43; // [sp+8h] [bp-F4h]
int v44; // [sp+Ch] [bp-F0h]
int v45; // [sp+10h] [bp-ECh]
int v46; // [sp+14h] [bp-E8h]
_DWORD v47[3]; // [sp+1Ch] [bp-E0h] BYREF
int v48[3]; // [sp+28h] [bp-D4h] BYREF
int v49[3]; // [sp+34h] [bp-C8h] BYREF
int v50[3]; // [sp+40h] [bp-BCh] BYREF
int v51[3]; // [sp+4Ch] [bp-B0h] BYREF
int v52[3]; // [sp+58h] [bp-A4h] BYREF
int v53[3]; // [sp+64h] [bp-98h] BYREF
int v54[3]; // [sp+70h] [bp-8Ch] BYREF
int v55[3]; // [sp+7Ch] [bp-80h] BYREF
int v56[3]; // [sp+88h] [bp-74h] BYREF
int v57[3]; // [sp+94h] [bp-68h] BYREF
int v58[3]; // [sp+A0h] [bp-5Ch] BYREF
int v59[3]; // [sp+ACh] [bp-50h] BYREF
int v60[3]; // [sp+B8h] [bp-44h] BYREF
int v61[3]; // [sp+C4h] [bp-38h] BYREF
int v62; // [sp+D0h] [bp-2Ch] BYREF
int v63; // [sp+D4h] [bp-28h]
char *v64; // [sp+D8h] [bp-24h]
int v65; // [sp+DCh] [bp-20h] BYREF
int v66; // [sp+E0h] [bp-1Ch]
int v67; // [sp+E4h] [bp-18h]
int v68; // [sp+E8h] [bp-14h] BYREF
int v69; // [sp+ECh] [bp-10h]
int v70; // [sp+F0h] [bp-Ch]
v65 = 0;
v66 = 0;
v67 = 0;
std::string::__init(&v65, &a1i2r3e45s789g[2], 1u);
v3 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, &v65);
CString = (const char *)cocos2d::CCString::getCString(v3);
v68 = 0;
v69 = 0;
v70 = 0;
v5 = strlen(CString);
std::string::__init(&v68, CString, v5);
LevelTools::base64DecodeString(v47, &v68);
std::string::~string((int)&v68);
std::string::~string((int)&v65);
memset(v48, 0, sizeof(v48));
std::string::__init(v48, &a1i2r3e45s789g[4], 1u);
v6 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v48);
v7 = cocos2d::CCString::intValue(v6);
std::string::~string((int)v48);
memset(v49, 0, sizeof(v49));
std::string::__init(v49, &a1i2r3e45s789g[6], 1u);
v8 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v49);
v42 = cocos2d::CCString::intValue(v8);
std::string::~string((int)v49);
memset(v50, 0, sizeof(v50));
std::string::__init(v50, "6", 1u);
v9 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v50);
v10 = (const char *)cocos2d::CCString::getCString(v9);
v43 = atoi(v10);
std::string::~string((int)v50);
memset(v51, 0, sizeof(v51));
std::string::__init(v51, &a1i2r3e45s789g[9], 1u);
v11 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v51);
v12 = cocos2d::CCString::boolValue(v11);
std::string::~string((int)v51);
memset(v52, 0, sizeof(v52));
std::string::__init(v52, &a1i2r3e45s789g[10], 1u);
v13 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v52);
v44 = cocos2d::CCString::intValue(v13);
std::string::~string((int)v52);
memset(v54, 0, sizeof(v54));
std::string::__init(v54, &a1i2r3e45s789g[11], 1u);
v14 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v54);
v15 = (const char *)cocos2d::CCString::getCString(v14);
memset(v53, 0, sizeof(v53));
v16 = strlen(v15);
std::string::__init(v53, v15, v16);
std::string::~string((int)v54);
memset(v55, 0, sizeof(v55));
std::string::__init(v55, "10", 2u);
v17 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v55);
v45 = cocos2d::CCString::intValue(v17);
std::string::~string((int)v55);
memset(v56, 0, sizeof(v56));
std::string::__init(v56, "11", 2u);
v18 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v56);
v19 = cocos2d::CCString::intValue(v18);
std::string::~string((int)v56);
memset(v57, 0, sizeof(v57));
std::string::__init(v57, "13", 2u);
v20 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v57);
v21 = cocos2d::CCString::boolValue(v20);
std::string::~string((int)v57);
memset(v58, 0, sizeof(v58));
std::string::__init(v58, a1i2r3e45s789g, 1u);
v22 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v58);
v23 = cocos2d::CCString::intValue(v22);
std::string::~string((int)v58);
memset(v59, 0, sizeof(v59));
std::string::__init(v59, "15", 2u);
v24 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, v59);
v46 = cocos2d::CCString::intValue(v24);
v25 = (GJComment *)std::string::~string((int)v59);
v26 = GJComment::create(v25);
std::string::basic_string(v60, (int)v47);
std::string::operator=((unsigned __int8 *)v26 + 264, (unsigned __int8 *)v60);
std::string::~string((int)v60);
*((_BYTE *)v26 + 304) = v12;
v26[73] = v7;
v26[74] = v42;
v26[72] = v43;
v26[77] = v44;
std::string::basic_string(v61, (int)v53);
std::string::operator=((unsigned __int8 *)v26 + 312, (unsigned __int8 *)v61);
std::string::~string((int)v61);
v26[83] = v19;
v26[82] = v45;
*((_BYTE *)v26 + 336) = v21;
v26[75] = v23;
v26[88] = v46;
v62 = 0;
v63 = 0;
v64 = nullptr;
std::string::__init(&v62, "14", 2u);
v27 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, &v62);
v28 = cocos2d::CCString::intValue(v27);
std::string::~string((int)&v62);
if ( v28 == 6 )
v26[86] = 3;
if ( v23 )
*((_BYTE *)v26 + 340) = 1;
if ( v19 > 0 )
{
v29 = (char *)&v65;
v65 = 0;
v66 = 0;
v67 = 0;
std::string::__init(&v65, "12", 2u);
v30 = (cocos2d::CCString *)cocos2d::CCDictionary::valueForKey(this, &v65);
v31 = (const char *)cocos2d::CCString::getCString(v30);
v62 = 0;
v63 = 0;
v64 = nullptr;
v32 = strlen(v31);
std::string::__init(&v62, v31, v32);
std::string::~string((int)&v65);
if ( (v62 & 1) == 0 )
v29 = (char *)&v62 + 1;
v68 = 0;
if ( (v62 & 1) != 0 )
v29 = v64;
v69 = 0;
v70 = 0;
v33 = strlen(v29);
std::string::__init(&v68, v29, v33);
v34 = sub_4C1A88(&v68, ",");
std::string::~string((int)&v68);
if ( cocos2d::CCArray::count(v34) > 2u )
{
v35 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v34, 0);
v36 = cocos2d::CCString::intValue(v35);
v37 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v34, 1u);
v38 = cocos2d::CCString::intValue(v37);
v39 = (cocos2d::CCString *)cocos2d::CCArray::stringAtIndex(v34, 2u);
v40 = cocos2d::CCString::intValue(v39);
*((_BYTE *)v26 + 337) = v36;
*((_BYTE *)v26 + 338) = v38;
*((_BYTE *)v26 + 339) = v40;
}
std::string::~string((int)&v62);
}
std::string::~string((int)v53);
std::string::~string((int)v47);
return v26;
}