//
// GJNotificationCell::loadFromNotification from 0x431d80 to 0x432662 (2274 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x434254
//
// 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:16 +0000
//
int __fastcall GJNotificationCell::loadFromNotification(GJNotificationCell *this, GJNotification *a2)
{
cocos2d::CCObject *v4; // r0
int v5; // r0
cocos2d::CCMenu *v6; // r0
const cocos2d::CCPoint *v7; // r10
int v8; // r7
float v9; // s22
float v10; // s21
float v11; // s20
_BOOL4 v12; // r9
float v13; // s15
int v14; // r5
int v15; // r2
size_t v16; // r2
float v17; // s16
EmoteSprite *v18; // r0
int v19; // r0
int v20; // r0
EmoteSprite *v21; // r0
int v22; // r0
int v23; // r0
int i; // r8
EmoteSprite *v25; // r0
int v26; // r0
_DWORD *v27; // r6
void (__fastcall *v28)(_DWORD *, _DWORD *); // r7
void (__fastcall *v29)(_DWORD *, _DWORD *); // r7
int v30; // r0
int v31; // r1
int v32; // r7
int v33; // r7
const char *v34; // r0
const char *v35; // r8
size_t v36; // r0
int v37; // r1
int v38; // r2
int v39; // r3
EmoteSprite *v40; // r0
cocos2d::CCSprite *v41; // r7
const char *v42; // r0
size_t v43; // r0
int v44; // r1
int v45; // r2
int v46; // r3
int v47; // r0
int v48; // r3
cocos2d::CCLabelBMFont *v49; // r0
float v50; // r0
void (__fastcall *v51)(cocos2d::CCSprite *, _DWORD *); // r8
cocos2d::CCLabelBMFont *v52; // r7
void (__fastcall *v53)(cocos2d::CCLabelBMFont *, _DWORD *); // r8
void (__fastcall *v54)(cocos2d::CCLabelBMFont *, _DWORD *); // r8
float v55; // s17
float v56; // r0
int v57; // r1
float v58; // s16
cocos2d::CCString *v59; // r0
cocos2d::CCLabelBMFont *CString; // r0
const char *v61; // r2
int v62; // r7
void (__fastcall *v63)(int, _DWORD *); // r8
void (__fastcall *v64)(int, _DWORD *); // r8
const char *v65; // r1
int v66; // r3
int v67; // r5
void (__fastcall *v68)(int, _DWORD *); // r8
GJChestSprite *v69; // r0
int v70; // r7
int v71; // r0
int v72; // r8
int v73; // r8
void (__fastcall *v74)(int, _DWORD *); // r9
void (__fastcall *v75)(int, _DWORD *); // r8
float v76; // s17
int v77; // r0
int v78; // r7
ButtonSprite *v79; // r0
int *v80; // kr00_4
int v81; // r3
_DWORD *v82; // r5
void (__fastcall *v83)(_DWORD *, _DWORD *); // r9
int v84; // r5
int v85; // r5
const cocos2d::CCPoint *v86; // r9
void (__fastcall *v87)(int, _BYTE *); // r8
float v89; // [sp+10h] [bp-B4h]
cocos2d::CCPoint *v90; // [sp+1Ch] [bp-A8h]
cocos2d::CCPoint *v91; // [sp+1Ch] [bp-A8h]
cocos2d::CCPoint *v92; // [sp+1Ch] [bp-A8h]
cocos2d::CCPoint *v93; // [sp+20h] [bp-A4h]
cocos2d::CCPoint *v94; // [sp+20h] [bp-A4h]
_BYTE v95[8]; // [sp+2Ch] [bp-98h] BYREF
_BYTE v96[8]; // [sp+34h] [bp-90h] BYREF
_BYTE v97[8]; // [sp+3Ch] [bp-88h] BYREF
_DWORD v98[2]; // [sp+44h] [bp-80h] BYREF
_DWORD v99[2]; // [sp+4Ch] [bp-78h] BYREF
_DWORD v100[2]; // [sp+54h] [bp-70h] BYREF
unsigned __int8 v101[12]; // [sp+5Ch] [bp-68h] BYREF
int v102[3]; // [sp+68h] [bp-5Ch] BYREF
int v103[3]; // [sp+74h] [bp-50h] BYREF
int v104[3]; // [sp+80h] [bp-44h] BYREF
int v105[3]; // [sp+8Ch] [bp-38h] BYREF
int v106[3]; // [sp+98h] [bp-2Ch] BYREF
int v107[3]; // [sp+A4h] [bp-20h] BYREF
int v108[3]; // [sp+B0h] [bp-14h] BYREF
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 102) + 584))(*((_DWORD *)this + 102), 255);
cocos2d::CCObject::retain(a2);
v4 = *((cocos2d::CCObject **)this + 106);
if ( v4 )
cocos2d::CCObject::release(v4);
v5 = *((_DWORD *)this + 103);
*((_DWORD *)this + 106) = a2;
*((_DWORD *)this + 107) = 0;
v6 = (cocos2d::CCMenu *)(*(int (__fastcall **)(int, int))(*(_DWORD *)v5 + 292))(v5, 1);
v7 = (const cocos2d::CCPoint *)cocos2d::CCMenu::create(v6);
(*(void (__fastcall **)(_DWORD, const cocos2d::CCPoint *, int))(**((_DWORD **)this + 103) + 232))(
*((_DWORD *)this + 103),
v7,
2);
v8 = *((_DWORD *)this + 106);
v9 = *((float *)this + 101) - 15.0;
v10 = v9 + 3.0;
v11 = v9 - 4.0;
v12 = *(int *)(v8 + 116) > 0 && *(_DWORD *)(v8 + 112) != 0;
if ( *(int *)(v8 + 140) > 0 )
{
v13 = 70.0;
v14 = 1;
}
else
{
v13 = 14.0;
if ( v12 )
{
v14 = 1;
v13 = 70.0;
}
else
{
v14 = 0;
}
}
v15 = *(unsigned __int8 *)(v8 + 84);
if ( *(int *)(v8 + 148) > 0 )
v13 = v13 + 32.0;
if ( (v15 & 1) != 0 )
v16 = *(_DWORD *)(v8 + 88);
else
v16 = v15 >> 1;
v17 = (float)(*((float *)this + 100) - 36.0) - v13;
GameToolbox::singleLineSnippet(v101, v8 + 84, v16);
std::string::basic_string(v102, (int)v101);
std::string::basic_string(v103, (int)v102);
v18 = (EmoteSprite *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, 0.0, 1.0);
v19 = EmoteSprite::maxEmotesComment(v18);
v20 = TextArea::create(
(int)v103,
"chatFont.fnt",
1065353216,
COERCE_INT(v17 / 0.54),
(const cocos2d::CCPoint *)v97,
COERCE_INT(20.0),
0,
v19);
if ( sub_431C60(v20, (unsigned __int8 *)v102) )
v90 = (cocos2d::CCPoint *)(v14 ^ 1);
else
v90 = nullptr;
std::string::~string((int)v103);
if ( v90 )
{
v17 = (float)(*((float *)this + 100) - 36.0) - 70.0;
std::string::operator=((unsigned __int8 *)v102, v101);
std::string::basic_string(v104, (int)v102);
v21 = (EmoteSprite *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, 0.0, 1.0);
v22 = EmoteSprite::maxEmotesComment(v21);
v23 = TextArea::create(
(int)v104,
"chatFont.fnt",
1065353216,
COERCE_INT(v17 / 0.54),
(const cocos2d::CCPoint *)v100,
COERCE_INT(20.0),
0,
v22);
sub_431C60(v23, (unsigned __int8 *)v102);
std::string::~string((int)v104);
}
for ( i = 0; ; i = 1 )
{
std::string::basic_string(v105, (int)v102);
v25 = (EmoteSprite *)cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, 0.0, 1.0);
v26 = EmoteSprite::maxEmotesComment(v25);
v27 = (_DWORD *)TextArea::create(
(int)v105,
"chatFont.fnt",
1065353216,
COERCE_INT(v17 / 0.54),
(const cocos2d::CCPoint *)v100,
COERCE_INT(20.0),
0,
v26);
std::string::~string((int)v105);
v28 = *(void (__fastcall **)(_DWORD *, _DWORD *))(*v27 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, 0.0, 1.0);
v28(v27, v100);
(*(void (__fastcall **)(_DWORD *, int))(*v27 + 80))(v27, 1057635697);
v29 = *(void (__fastcall **)(_DWORD *, _DWORD *))(*v27 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v100,
(float)((float)i * 0.5) + 36.0,
(float)(v9 - 10.0) - (float)((float)i * 0.5));
v29(v27, v100);
if ( i )
{
TextArea::colorAllLabels((int)v27, 0);
(*(void (__fastcall **)(_DWORD *, int))(*v27 + 456))(v27, 100);
v30 = *(_DWORD *)(v27[130] + 524);
if ( v30 )
(*(void (__fastcall **)(int, _DWORD))(*(_DWORD *)v30 + 172))(v30, 0);
}
(*(void (__fastcall **)(_DWORD, _DWORD *, int))(**((_DWORD **)this + 103) + 232))(
*((_DWORD *)this + 103),
v27,
1 - i);
if ( i )
break;
}
v31 = *((_DWORD *)this + 106);
v32 = *(unsigned __int8 *)(v31 + 60);
if ( (v32 & 1) != 0 )
v33 = *(_DWORD *)(v31 + 64);
else
v33 = v32 >> 1;
if ( v33 )
{
std::string::basic_string(v106, v31 + 60);
}
else
{
v34 = sub_422990(*(_DWORD *)(v31 + 56));
memset(v106, 0, sizeof(v106));
v35 = v34;
v36 = strlen(v34);
std::string::__init(v106, v35, v36);
}
v40 = EmoteSprite::createWithName((int)v106, v37, v38, v39);
v41 = v40;
if ( v40
|| (v42 = sub_422990(*(_DWORD *)(*((_DWORD *)this + 106) + 56)),
memset(v107, 0, sizeof(v107)),
v93 = (cocos2d::CCPoint *)v42,
v43 = strlen(v42),
std::string::__init(v107, v93, v43),
v41 = EmoteSprite::createWithName((int)v107, v44, v45, v46),
v40 = (EmoteSprite *)std::string::~string((int)v107),
v41) )
{
v50 = COERCE_FLOAT(EmoteSprite::heightFactor(v40));
EmoteSprite::fitToHeight(v41, v50 * 18.0, 1.22);
v51 = *(void (__fastcall **)(cocos2d::CCSprite *, _DWORD *))(*(_DWORD *)v41 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, 18.0, v11);
v51(v41, v100);
(*(void (__fastcall **)(_DWORD, cocos2d::CCSprite *, int))(**((_DWORD **)this + 103) + 232))(
*((_DWORD *)this + 103),
v41,
1);
}
v47 = *((_DWORD *)this + 106);
v48 = *(unsigned __int8 *)(v47 + 72);
if ( (v48 & 1) != 0 )
v49 = *(cocos2d::CCLabelBMFont **)(v47 + 80);
else
v49 = (cocos2d::CCLabelBMFont *)(v47 + 73);
v52 = (cocos2d::CCLabelBMFont *)cocos2d::CCLabelBMFont::create(v49, "bigFont.fnt", (const char *)(v48 << 31));
cocos2d::CCLabelBMFont::limitLabelWidth(v52, v17 - 60.0, 0.5, 0.2);
v53 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD *))(*(_DWORD *)v52 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, 0.0, 0.5);
v53(v52, v100);
v54 = *(void (__fastcall **)(cocos2d::CCLabelBMFont *, _DWORD *))(*(_DWORD *)v52 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, 36.0, v10);
v54(v52, v100);
(*(void (__fastcall **)(_DWORD, cocos2d::CCLabelBMFont *, int))(**((_DWORD **)this + 103) + 232))(
*((_DWORD *)this + 103),
v52,
1);
v55 = *(float *)(*(int (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v52 + 164))(v52);
v56 = (*(float (__fastcall **)(cocos2d::CCLabelBMFont *))(*(_DWORD *)v52 + 84))(v52);
v57 = *((_DWORD *)this + 106);
v58 = (float)(v55 * v56) + 36.0;
if ( (*(_BYTE *)(v57 + 96) & 1) != 0 )
v59 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s ago",
*(const char **)(v57 + 104));
else
v59 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%s ago",
(const char *)(v57 + 97));
CString = (cocos2d::CCLabelBMFont *)cocos2d::CCString::getCString(v59);
v62 = cocos2d::CCLabelBMFont::create(CString, "chatFont.fnt", v61);
v63 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v62 + 148);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, 0.0, 0.5);
v63(v62, v100);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v62 + 80))(v62, 1056964608);
(*(void (__fastcall **)(int, char *))(*(_DWORD *)v62 + 536))(v62, &byte_BEB9C0);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v62 + 512))(v62, 150);
v64 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v62 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, v58 + 6.0, v10 - 1.0);
v64(v62, v100);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v62, 1);
if ( *(_BYTE *)(*((_DWORD *)this + 106) + 108) )
{
v67 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"d_ball_01_001.png", v65);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v67 + 480))(v67, &unk_BEB9C3);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v67 + 80))(v67, 1046160081);
v68 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v67 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, 6.0, v11 + 9.0);
v68(v67, v100);
(*(void (__fastcall **)(_DWORD, int, int))(**((_DWORD **)this + 103) + 232))(*((_DWORD *)this + 103), v67, 10);
}
v66 = *((_DWORD *)this + 106);
if ( *(int *)(v66 + 140) <= 0 )
{
if ( v12 || v90 )
{
v79 = ButtonSprite::create(
(ButtonSprite *)"View",
(const char *)&word_32,
0,
0.6,
0,
"bigFont.fnt",
"GJ_button_01.png",
(const char *)0x41C80000,
v89);
if ( v12 )
v80 = (int *)&GJNotificationCell::onViewTarget;
else
v80 = (int *)&GJNotificationCell::onShowBody;
v81 = *v80;
v99[1] = 0;
v99[0] = v81;
v82 = (_DWORD *)CCMenuItemSpriteExtra::create((int)v79, 0, (int)this, v81, 0);
(*(void (__fastcall **)(_DWORD *, int))(*v82 + 80))(v82, 1061997773);
v82[79] = 1061997773;
CCMenuItemSpriteExtra::setSizeMult((int)v82, 1.1);
(*(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD *))(*(_DWORD *)v7 + 228))(v7, v82);
v83 = *(void (__fastcall **)(_DWORD *, _DWORD *))(*v82 + 92);
v92 = *((cocos2d::CCPoint **)this + 103);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, *((float *)this + 100) - 34.0, *((float *)this + 101) * 0.5);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v98, v92);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v100, v7);
v83(v82, v100);
}
}
else
{
v69 = *(GJChestSprite **)(v66 + 144);
if ( (int)v69 < 1 )
v69 = (GJChestSprite *)((char *)&dword_0 + 1);
v70 = GJChestSprite::create(v69, (int)v65);
GJChestSprite::switchToState(v70, 2, 1);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v70 + 80))(v70, 1047502258);
v98[1] = 0;
v98[0] = GJNotificationCell::onClaimReward;
v71 = CCMenuItemSpriteExtra::create(v70, 0, (int)this, (int)GJNotificationCell::onClaimReward, 0);
memset(v108, 0, sizeof(v108));
v72 = v71;
*((_DWORD *)this + 107) = v71;
std::string::__init(v108, "chestClick.ogg", 0xEu);
std::string::operator=((unsigned __int8 *)(v72 + 340), (unsigned __int8 *)v108);
std::string::~string((int)v108);
v73 = *((_DWORD *)this + 107);
v74 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v73 + 160);
cocos2d::CCSize::CCSize((cocos2d::CCSize *)v100, 23.4, 18.72);
v74(v73, v100);
v75 = *(void (__fastcall **)(int, _DWORD *))(*(_DWORD *)v70 + 92);
v76 = *(float *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 107) + 164))(*((_DWORD *)this + 107));
v77 = (*(int (__fastcall **)(_DWORD))(**((_DWORD **)this + 107) + 164))(*((_DWORD *)this + 107));
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v100, v76 * 0.5, *(float *)(v77 + 4) * 0.5);
v75(v70, v100);
*(_BYTE *)(*((_DWORD *)this + 107) + 320) = 0;
*(_BYTE *)(*((_DWORD *)this + 107) + 321) = 1;
(*(void (__fastcall **)(const cocos2d::CCPoint *, _DWORD))(*(_DWORD *)v7 + 228))(v7, *((_DWORD *)this + 107));
v78 = *((_DWORD *)this + 107);
v91 = *(cocos2d::CCPoint **)(*(_DWORD *)v78 + 92);
v94 = *((cocos2d::CCPoint **)this + 103);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v97, *((float *)this + 100) - 34.0, *((float *)this + 101) * 0.5);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v99, v94);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v100, v7);
((void (__fastcall *)(int, _DWORD *))v91)(v78, v100);
GJNotificationCell::refreshChest(this);
}
if ( *(int *)(*((_DWORD *)this + 106) + 148) > 0 )
{
v84 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"accountBtn_notifications_001.png", v65);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v84 + 80))(v84, 1056964608);
v100[1] = 0;
v100[0] = GJNotificationCell::onMute;
v85 = CCMenuItemSpriteExtra::create(v84, 0, (int)this, (int)GJNotificationCell::onMute, 0);
CCMenuItemSpriteExtra::setSizeMult(v85, 1.2);
(*(void (__fastcall **)(const cocos2d::CCPoint *, int))(*(_DWORD *)v7 + 228))(v7, v85);
v86 = *((const cocos2d::CCPoint **)this + 103);
v87 = *(void (__fastcall **)(int, _BYTE *))(*(_DWORD *)v85 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v95, *((float *)this + 100) - 74.0, *((float *)this + 101) * 0.5);
cocos2d::CCNode::convertToWorldSpace((cocos2d::CCNode *)v96, v86);
cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)v97, v7);
v87(v85, v97);
}
std::string::~string((int)v106);
std::string::~string((int)v102);
return std::string::~string((int)v101);
}