// // GJMessageCell::loadFromMessage from 0x10024ca10 to 0x10024d316 (2310 bytes) // // 1 xrefs: // > CustomListView::loadCell @ 0x100242749 // // 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 GJMessageCell::loadFromMessage(GJMessageCell *a1, GJUserMessage *a2) { double v2; // xmm0_8 GJUserMessage *m_message; // rdi GJUserMessage *v5; // rax std::string *p_m_title; // rax const char *v7; // rdi cocos2d::CCLabelBMFont *v8; // r14 ButtonSprite *v9; // r13 CCMenuItemSpriteExtra *v10; // rax int v11; // r15d int v12; // edx int v13; // ecx int v14; // r8d int v15; // r9d const cocos2d::CCPoint *v16; // r15 float *v17; // rax ButtonSprite *v18; // r12 cocos2d::CCLabelBMFont *m_label; // r13 __int64 v20; // r14 CCMenuItemSpriteExtra *v21; // r12 GJMessageCell *v22; // r15 GJUserMessage *v23; // rbx const char *v24; // rsi __int64 v25; // r14 std::string *p_m_username; // rbx GJMessageCell *v27; // rbx cocos2d::CCLabelBMFont *v28; // r14 cocos2d::CCString *v29; // rax const char *CString; // r12 cocos2d::CCLabelBMFont *v31; // r12 __int64 v32; // r13 float v33; // xmm2_4 CCMenuItemSpriteExtra *v34; // rax const cocos2d::CCPoint *v35; // r13 CCMenuItemSpriteExtra *v36; // r12 __int128 v37; // xmm0 GJUserMessage *v38; // rax std::string *p_m_uploadDate; // rax const cocos2d::CCPoint *v40; // r15 __int64 v41; // rbx bool v42; // zf GJUserMessage *v43; // rax std::string *v44; // rax cocos2d::CCString *v45; // rax const char *v46; // rax cocos2d::CCLabelBMFont *v47; // r12 float *v48; // rax cocos2d::CCSprite *v49; // r12 cocos2d::CCSprite *v50; // r13 CCMenuItemToggler *v51; // rax CCMenuItemToggler *m_toggler; // r12 GJUserMessage *v53; // rax cocos2d::CCLabelBMFont *v54; // r15 __int64 v55; // rbx float v56; // xmm0_4 char v57[8]; // [rsp+0h] [rbp-80h] BYREF cocos2d::CCLabelBMFont *v58; // [rsp+8h] [rbp-78h] char v59[8]; // [rsp+14h] [rbp-6Ch] BYREF float v60; // [rsp+1Ch] [rbp-64h] __int128 __dst; // [rsp+20h] [rbp-60h] BYREF void *__p; // [rsp+30h] [rbp-50h] const cocos2d::CCPoint *v63; // [rsp+38h] [rbp-48h] __int128 v64; // [rsp+40h] [rbp-40h] BYREF void *longStorage; // [rsp+50h] [rbp-30h] double v66; // 0:xmm0_8.8 double v67; // 0:xmm0_8.8 ((void (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->removeAllChildrenWithCleanup)(a1->m_mainLayer, 1); if ( !a2 ) return; m_message = a1->m_message; if ( m_message ) { cocos2d::CCObject::release(m_message); a1->m_message = nullptr; } a1->m_message = a2; cocos2d::CCObject::retain(a2); v5 = a1->m_message; if ( (v5->m_title.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70(&__dst, v5->m_title.m_data.m_long.longStorage, v5->m_title.m_data.m_long.size, v2); if ( (__dst & 1) == 0 ) goto LABEL_6; } else { p_m_title = &v5->m_title; __p = p_m_title->m_data.m_long.longStorage; __dst = *(_OWORD *)&p_m_title->m_data.m_short.sizex2; if ( (__dst & 1) == 0 ) { LABEL_6: v7 = (char *)&__dst + 1; goto LABEL_9; } } v7 = (const char *)__p; LABEL_9: v8 = cocos2d::CCLabelBMFont::create_3(v7, "bigFont.fnt"); if ( (__dst & 1) != 0 ) operator delete(__p); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v8); sub_10028CBE0(&__dst, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v8->setAnchorPoint)(v8, &__dst); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v8->setScale)(v8, 1.0); sub_10028CBE0(&__dst, 38.0, (float)(a1->m_height * 0.5) + 14.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v8->setPosition)(v8, &__dst); v58 = v8; cocos2d::CCLabelBMFont::limitLabelWidth(v8, 180.0, 0.5, 0.0); v9 = ButtonSprite::create_1("View", 50, 0, 0.60000002, 0, "bigFont.fnt", "GJ_button_01.png", 25.0); v10 = CCMenuItemSpriteExtra::create( v9, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJMessageCell::onViewMessage); v11 = (int)v10; CCMenuItemSpriteExtra::setSizeMult(v10, 1.1); v16 = (const cocos2d::CCPoint *)sub_100792C50(v11, 0, v12, v13, v14, v15); ((void (__fastcall *)(cocos2d::CCLayer *, const cocos2d::CCPoint *))a1->m_mainLayer->addChild)(a1->m_mainLayer, v16); *(float *)&v63 = a1->m_width; v17 = (float *)((__int64 (__fastcall *)(ButtonSprite *))v9->getContentSize)(v9); sub_10028CBE0(&__dst, (float)((float)(*v17 * -0.5) + *(float *)&v63) + -45.0, a1->m_height * 0.5); (*(void (__fastcall **)(const cocos2d::CCPoint *, __int128 *))(*(_QWORD *)v16 + 184LL))(v16, &__dst); v18 = ButtonSprite::create_1("X", 50, 0, 0.60000002, 0, "bigFont.fnt", "GJ_button_06.png", 31.25); ((void (__fastcall *)(ButtonSprite *, float))v18->setScale)(v18, 0.80000001); m_label = v18->m_label; v20 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))m_label->getPosition)(m_label); sub_10028CBE0(&v64, 1.5, -0.5); sub_10028CCE0(&__dst, v20); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))m_label->setPosition)(m_label, &__dst); v21 = CCMenuItemSpriteExtra::create( v18, nullptr, a1, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJMessageCell::onDeleteMessage); CCMenuItemSpriteExtra::setSizeMult(v21, 1.1); (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v16 + 440LL))(v16, v21); sub_10028CBE0(&v64, a1->m_width + -22.0, 0.5 * a1->m_height); v63 = v16; *(cocos2d::CCPoint *)&v66 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&__dst, v16); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int128 *, double))v21->setPosition)(v21, &__dst, v66); v22 = a1; v23 = a1->m_message; v24 = "From:"; if ( v23->m_outgoing ) v24 = "To:"; v25 = 2 * !v23->m_outgoing; LOBYTE(__dst) = 2 * (2 * !v23->m_outgoing + 3); memcpy((char *)&__dst + 1, v24, v25 + 3); *((_BYTE *)&__dst + v25 + 4) = 0; if ( (v23->m_username.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70(&v64, v23->m_username.m_data.m_long.longStorage, v23->m_username.m_data.m_long.size, v66); } else { p_m_username = &v23->m_username; longStorage = p_m_username->m_data.m_long.longStorage; v64 = *(_OWORD *)&p_m_username->m_data.m_short.sizex2; } v27 = v22; v28 = v58; v29 = (cocos2d::CCString *)sub_1007AB580("%s %s", v57[0]); CString = cocos2d::CCString::getCString(v29); if ( (v64 & 1) != 0 ) operator delete(longStorage); v31 = cocos2d::CCLabelBMFont::create_3(CString, "goldFont.fnt"); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v31->setScale)(v31, 1.0); cocos2d::CCLabelBMFont::limitLabelWidth(v31, 140.0, 0.5, 0.0); v32 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v58->getPosition)(v58); v60 = *(float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v31->getContentSize)(v31); v33 = (float)((float)(v60 * 0.5) * ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v31->getScale)(v31)) + 1.0; sub_10028CBE0(&v64, v33, -15.0); sub_10028CCE0(v57, v32); v34 = CCMenuItemSpriteExtra::create( v31, nullptr, v22, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJMessageCell::onViewProfile); v35 = v63; v36 = v34; (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemSpriteExtra *))(*(_QWORD *)v63 + 440LL))(v63, v34); *(cocos2d::CCPoint *)&v37 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v64, v35); ((void (__fastcall *)(CCMenuItemSpriteExtra *, __int128 *, double))v36->setPosition)(v36, &v64, *(double *)&v37); v38 = v22->m_message; if ( (v38->m_uploadDate.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70( &v64, v38->m_uploadDate.m_data.m_long.longStorage, v38->m_uploadDate.m_data.m_long.size, *(double *)&v37); } else { p_m_uploadDate = &v38->m_uploadDate; longStorage = p_m_uploadDate->m_data.m_long.longStorage; v37 = *(_OWORD *)&p_m_uploadDate->m_data.m_short.sizex2; v64 = *(_OWORD *)&p_m_uploadDate->m_data.m_short.sizex2; } if ( (v64 & 1) != 0 ) { v41 = *((_QWORD *)&v64 + 1); operator delete(longStorage); v42 = v41 == 0; v27 = v22; v40 = v63; if ( v42 ) goto LABEL_31; LABEL_25: v43 = v27->m_message; if ( (v43->m_uploadDate.m_data.m_short.sizex2 & 1) != 0 ) { sub_100006B70( &v64, v43->m_uploadDate.m_data.m_long.longStorage, v43->m_uploadDate.m_data.m_long.size, *(double *)&v37); } else { v44 = &v43->m_uploadDate; longStorage = v44->m_data.m_long.longStorage; v64 = *(_OWORD *)&v44->m_data.m_short.sizex2; } v45 = (cocos2d::CCString *)sub_1007AB580("%s ago", v57[0]); v46 = cocos2d::CCString::getCString(v45); v47 = cocos2d::CCLabelBMFont::create_3(v46, "chatFont.fnt"); if ( (v64 & 1) != 0 ) operator delete(longStorage); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))v27->m_mainLayer->addChild_0)( v27->m_mainLayer, v47, 1); sub_10028CBE0(&v64, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v47->setAnchorPoint)(v47, &v64); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v47->setScale)(v47, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))v47->setColor)(v47, &unk_100818050); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v47->setOpacity)(v47, 125); v48 = (float *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v28->getPosition)(v28); sub_10028CBE0(&v64, *v48 + 3.0, 10.0); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v47->setPosition)(v47, &v64); goto LABEL_31; } v40 = v63; if ( (_BYTE)v64 ) goto LABEL_25; LABEL_31: v49 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOn_001.png"); v50 = cocos2d::CCSprite::createWithSpriteFrameName("GJ_checkOff_001.png"); ((void (__fastcall *)(cocos2d::CCSprite *, float))v49->setScale)(v49, 0.69999999); ((void (__fastcall *)(cocos2d::CCSprite *, float))v50->setScale)(v50, 0.69999999); v51 = CCMenuItemToggler::create(v50, v49, v27, (cocos2d::SEL_MenuHandler)(unsigned __int64)GJMessageCell::onToggle); v27->m_toggler = v51; CCMenuItemToggler::toggle(v51, v27->m_message->m_toggled); (*(void (__fastcall **)(const cocos2d::CCPoint *, CCMenuItemToggler *))(*(_QWORD *)v40 + 440LL))(v40, v27->m_toggler); m_toggler = v27->m_toggler; sub_10028CBE0(v59, 20.0, v27->m_height * 0.5); *(cocos2d::CCPoint *)&v67 = cocos2d::CCNode::convertToNodeSpace((cocos2d::CCNode *)&v64, v40); ((void (__fastcall *)(CCMenuItemToggler *, __int128 *, double))m_toggler->setPosition)(m_toggler, &v64, v67); CCMenuItemToggler::setSizeMult(v27->m_toggler, 1.2); v53 = v27->m_message; if ( !v53->m_read && !v53->m_outgoing ) { v54 = cocos2d::CCLabelBMFont::create_3("!", "bigFont.fnt"); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, void *))v54->setColor)(v54, &unk_100818053); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, float))v54->setScale)(v54, 0.5); sub_10028CBE0(&v64, 0.0, 0.5); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v54->setAnchorPoint)(v54, &v64); ((void (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCLabelBMFont *, __int64))v27->m_mainLayer->addChild_0)( v27->m_mainLayer, v54, 10); v55 = ((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v28->getPosition)(v28); LODWORD(v63) = *(_DWORD *)((__int64 (__fastcall *)(cocos2d::CCLabelBMFont *))v28->getContentSize)(v28); v56 = ((float (__fastcall *)(cocos2d::CCLabelBMFont *))v28->getScale)(v28); sub_10028CBE0(v59, (float)(*(float *)&v63 * v56) + 5.0, 0.0); sub_10028CCE0(&v64, v55); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int128 *))v54->setPosition)(v54, &v64); ((void (__fastcall *)(cocos2d::CCLabelBMFont *, __int64))v54->setTag)(v54, 100); } if ( (__dst & 1) != 0 ) operator delete(__p); }
GD Web Decomp Icon

GD Web Decomp

Raw Source