//
// GJMessageCell::loadFromMessage from 0x42bb68 to 0x42c1bc (1620 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x434218
//
// 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:48:10 +0000
//
int __fastcall GJMessageCell::loadFromMessage(GJMessageCell *this, GJUserMessage *a2)
{
int result; // r0
cocos2d::CCObject *v5; // r0
const char *v6; // r2
cocos2d::CCLabelBMFont *v7; // r0
cocos2d::CCLabelBMFont *v8; // r5
void (__fastcall *v9)(cocos2d::CCLabelBMFont *, _DWORD *); // r7
void (__fastcall *v10)(cocos2d::CCLabelBMFont *, _DWORD *); // r7
ButtonSprite *v11; // r10
cocos2d::CCMenu *v12; // r7
const cocos2d::CCPoint *v13; // r7
float v14; // s17
float *v15; // r0
ButtonSprite *v16; // r10
int v17; // r11
int v18; // r10
void (__fastcall *v19)(int, _DWORD *); // r11
const char *v20; // r8
size_t v21; // r0
const char *v22; // r10
char *v23; // r2
cocos2d::CCString *v24; // r0
cocos2d::CCLabelBMFont *CString; // r10
const char *v26; // r2
cocos2d::CCLabelBMFont *v27; // r8
int v28; // r11
float v29; // s17
float v30; // r0
int v31; // r8
void (__fastcall *v32)(int, _DWORD *); // r11
int v33; // r10
const char *v34; // r1
cocos2d::CCLabelBMFont *v35; // r1
cocos2d::CCString *v36; // r0
cocos2d::CCLabelBMFont *v37; // r0
const char *v38; // r2
int v39; // r8
void (__fastcall *v40)(int, _DWORD *); // r10
void (__fastcall *v41)(int, _DWORD *); // r10
float *v42; // r0
int v43; // r6
const char *v44; // r1
int v45; // r8
cocos2d::CCNodeRGBA *v46; // r0
int v47; // r3
int v48; // r10
void (__fastcall *v49)(int, _BYTE *); // r11
int v50; // r3
int v51; // r7
void (__fastcall *v52)(int, _BYTE *); // r10
void (__fastcall *v53)(int, _BYTE *); // r4
int v54; // r10
float v55; // s16
float v56; // r0
cocos2d::CCPoint *v57; // [sp+10h] [bp-84h]
cocos2d::CCPoint *v58; // [sp+10h] [bp-84h]
void (__fastcall *v59)(int, _DWORD *); // [sp+14h] [bp-80h]
int v60; // [sp+1Ch] [bp-78h]
_BYTE v61[8]; // [sp+24h] [bp-70h] BYREF
_BYTE v62[8]; // [sp+2Ch] [bp-68h] BYREF
_BYTE v63[8]; // [sp+34h] [bp-60h] BYREF
int (__fastcall *v64)(int, cocos2d::CCObject *); // [sp+3Ch] [bp-58h]
int v65; // [sp+40h] [bp-54h]
int (__fastcall *v66)(int, cocos2d::CCObject *); // [sp+44h] [bp-50h]
int v67; // [sp+48h] [bp-4Ch]
_DWORD v68[2]; // [sp+4Ch] [bp-48h] BYREF
_DWORD v69[2]; // [sp+54h] [bp-40h] BYREF
int v70[2]; // [sp+5Ch] [bp-38h] BYREF
const char *v71; // [sp+64h] [bp-30h]
int v72[3]; // [sp+68h] [bp-2Ch] BYREF
int v73[3]; // [sp+74h] [bp-20h] BYREF
int v74[2]; // [sp+80h] [bp-14h] BYREF
cocos2d::CCLabelBMFont *v75; // [sp+88h] [bp-Ch]
result = (*(int (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 292))(*((_DWORD *)this + 103), 1);
if ( a2 )
{
v5 = *((cocos2d::CCObject **)this + 108);
if ( v5 )
cocos2d::CCObject::release(v5);
*((_DWORD *)this + 108) = a2;
cocos2d::CCObject::retain(a2);
std::string::basic_string(v74, *((_DWORD *)this + 108) + 276);
if ( (v74[0] & 1) != 0 )
v7 = v75;
else
v7 = (cocos2d::CCLabelBMFont *)((char *)v74 + 1);
v8 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v7, "bigFont.fnt", v6);
std::string::~string((int)v74);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *))(**((_DWORD **)this + 103) + 228))(
*((_DWORD *)this + 103),
v8);
v9 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD *))(*(_DWORD *)v8 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, 0.0, 0.5);
v9(v8, v69);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, int))(*(_DWORD *)v8 + 80))(v8, 1065353216);
v10 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD *))(*(_DWORD *)v8 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, 38.0, (float)(*((float *)this + 101) * 0.5) + 14.0);
v10(v8, v69);
cocos2d::CCLabelBMFont::limitLabelWidth(v8, 180.0, 0.5, 0.0);
v65 = 0;
v64 = GJMessageCell::onViewMessage;
v11 = ButtonSprite::create(
(ButtonSprite *)"View",
(const char *)&word_32,
0,
0.6,
0,
"bigFont.fnt",
"GJ_button_01.png",
(const char *)0x41C80000,
*(float *)&v57);
v12 = (cocos2d::CCMenu *)CCMenuItemSpriteExtra::create((int)v11, 0, (int)this, (int)GJMessageCell::onViewMessage, 0);
CCMenuItemSpriteExtra::setSizeMult((int)v12, 1.1);
v13 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v12, nullptr);
(*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *))(**((_DWORD **)this + 103) + 228))(
*((_DWORD *)this + 103),
v13);
v14 = *((float *)this + 100);
v58 = *(cocos2d::CCPoint **)(*(_DWORD *)v13 + 92);
v15 = (float *)(*(int (__fastcall **)(ButtonSprite *))(*(_DWORD *)v11 + 164))(v11);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v69,
(float)(v14 - (float)(*v15 * 0.5)) - 45.0,
*((float *)this + 101) * 0.5);
((void (__fastcall *)(const cocos2d::CCPoint *, _DWORD *))v58)(v13, v69);
v16 = ButtonSprite::create(
(ButtonSprite *)"X",
(const char *)&word_32,
0,
0.6,
0,
"bigFont.fnt",
"GJ_button_06.png",
(const char *)0x41FA0000,
*(float *)&v58);
(*(void (__fastcall **)(ButtonSprite *, int))(*(_DWORD *)v16 + 80))(v16, 1061997773);
v17 = *((_DWORD *)v16 + 134);
v59 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v17 + 92);
v60 = (*(int (__fastcall **)(int))(*(_DWORD *)v17 + 96))(v17);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, 1.5, -0.5);
cocos2d::CCPoint::operator+(v69, v60, v68);
v59(v17, v69);
v67 = 0;
v66 = GJMessageCell::onDeleteMessage;
v18 = CCMenuItemSpriteExtra::create((int)v16, 0, (int)this, (int)GJMessageCell::onDeleteMessage, 0);
CCMenuItemSpriteExtra::setSizeMult(v18, 1.1);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v13 + 228))(v13, v18);
v19 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v18 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v68, *((float *)this + 100) - 22.0, *((float *)this + 101) * 0.5);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v69, v13);
v19(v18, v69);
if ( *(_BYTE *)(*((_DWORD *)this + 108) + 325) )
v20 = "To:";
else
v20 = "From:";
v70[0] = 0;
v70[1] = 0;
v71 = nullptr;
v21 = strlen(v20);
std::string::__init(v70, v20, v21);
if ( (v70[0] & 1) != 0 )
v22 = v71;
else
v22 = (char *)v70 + 1;
std::string::basic_string(v72, *((_DWORD *)this + 108) + 300);
if ( (v72[0] & 1) != 0 )
v23 = (char *)v72[2];
else
v23 = (char *)v72 + 1;
v24 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s %s", v22, v23);
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v24);
std::string::~string((int)v72);
v27 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(CString, "goldFont.fnt", v26);
(*(void (__fastcall **)(cocos2d::CCLabelBMFont *, int))(*(_DWORD *)v27 + 80))(v27, 1065353216);
cocos2d::CCLabelBMFont::limitLabelWidth(v27, 140.0, 0.5, 0.0);
v28 = (*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v8 + 96))(v8);
v29 = *(float *)(*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v27 + 164))(v27) * 0.5;
v30 = (*(float (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v27 + 84))(v27);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, (float)(v29 * v30) + 1.0, -15.0);
cocos2d::CCPoint::operator+(v61, v28, v69);
v68[1] = 0;
v68[0] = GJMessageCell::onViewProfile;
v31 = CCMenuItemSpriteExtra::create((int)v27, 0, (int)this, (int)GJMessageCell::onViewProfile, 0);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v13 + 228))(v13, v31);
v32 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v31 + 92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v69, v13);
v32(v31, v69);
std::string::basic_string(v73, *((_DWORD *)this + 108) + 312);
if ( (v73[0] & 1) != 0 )
v33 = v73[1];
else
v33 = (int)LOBYTE(v73[0]) >> 1;
std::string::~string((int)v73);
if ( v33 )
{
std::string::basic_string(v74, *((_DWORD *)this + 108) + 312);
if ( (v74[0] & 1) != 0 )
v35 = v75;
else
v35 = (cocos2d::CCLabelBMFont *)((char *)v74 + 1);
v36 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat((cocos2d::CCString *)"%s ago", (const char *)v35);
v37 = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v36);
v39 = cocos2d::CCLabelBMFont::create(v37, "chatFont.fnt", v38);
std::string::~string((int)v74);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v39, 1);
v40 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v39 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, 0.0, 0.5);
v40(v39, v69);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v39 + 80))(v39, 1056964608);
(*(void (__fastcall **)(int, char *))(*(_DWORD *)v39 + 536))(v39, &byte_BEB9C0);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v39 + 512))(v39, 125);
v41 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v39 + 92);
v42 = (float *)(*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v8 + 96))(v8);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v69, *v42 + 3.0, 10.0);
v41(v39, v69);
}
v43 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOn_001.png", v34);
v45 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"GJ_checkOff_001.png", v44);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v43 + 80))(v43, 1060320051);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v45 + 80))(v45, 1060320051);
v69[1] = 0;
v69[0] = GJMessageCell::onToggle;
v46 = CCMenuItemToggler::create(v45, v43, (int)this, (int)GJMessageCell::onToggle, 0);
v47 = *((_DWORD *)this + 108);
*((_DWORD *)this + 110) = v46;
CCMenuItemToggler::toggle(v46, *(unsigned __int8 *)(v47 + 326));
(*(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v13 + 228))(v13, *((_DWORD *)this + 110));
v48 = *((_DWORD *)this + 110);
v49 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v48 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, 20.0, *((float *)this + 101) * 0.5);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v63, v13);
v49(v48, v63);
CCMenuItemToggler::setSizeMult(*((CCMenuItemToggler **)this + 110), 1.2);
v50 = *((_DWORD *)this + 108);
if ( !*(_BYTE *)(v50 + 324) && !*(_BYTE *)(v50 + 325) )
{
v51 = cocos2d::CCLabelBMFont::create(
(cocos2d::CCLabelBMFont *)"!",
"bigFont.fnt",
(const char *)*(unsigned __int8 *)(v50 + 324));
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v51 + 536))(v51, &unk_BEB9C3);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v51 + 80))(v51, 1056964608);
v52 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v51 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v63, 0.0, 0.5);
v52(v51, v63);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v51, 10);
v53 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v51 + 92);
v54 = (*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v8 + 96))(v8);
v55 = *(float *)(*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v8 + 164))(v8);
v56 = (*(float (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v8 + 84))(v8);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v62, (float)(v55 * v56) + 5.0, 0.0);
cocos2d::CCPoint::operator+(v63, v54, v62);
v53(v51, v63);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v51 + 36))(v51, 100);
}
return std::string::~string((int)v70);
}
return result;
}