// // GJUserCell::loadFromScore from 0x1400bac60 to 0x1400bb4f7 (2199 bytes) // // 2 xrefs: // > CustomListView::loadCell @ 0x1400abb06 // > @ 0x1406c7d34 // // 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 // // Hidden C++ exception states: #wind=6 void GJUserCell::loadFromScore(GJUserCell *a1, GJUserScore *a2) { GJUserScore *v2; // r13 GJUserScore *m_userScore; // rcx int m_friendReqStatus; // r12d SimplePlayer *v6; // r14 SimplePlayer_vtbl *v7; // rbx const cocos2d::CCPoint *v8; // rax cocos2d::ccColor3B *v9; // rcx cocos2d::CCRGBAProtocol_vtbl *v10; // rdi cocos2d::ccColor3B *v11; // rax cocos2d::ccColor3B *v12; // rcx cocos2d::ccColor3B *v13; // rax GJUserScore *v14; // rax bool v15; // al struct cocos2d::CCMenu *v16; // r15 bool v17; // bl std::string *p_m_userName; // rcx const char *v19; // rcx cocos2d::CCLabelBMFont *v20; // rdi float v21; // xmm6_4 double v22; // xmm0_8 __int64 v23; // rax CCMenuItemSpriteExtra *v24; // rdi CCMenuItemSpriteExtra_vtbl *v25; // rbx struct cocos2d::CCPoint v26; // rax ButtonSprite *v27; // r14 CCMenuItemSpriteExtra *v28; // rdi CCMenuItemSpriteExtra_vtbl *v29; // rbx float v30; // xmm6_4 float width; // xmm0_4 ButtonSprite **p_p_Src; // rdx ButtonSprite *v33; // r14 float v34; // xmm6_4 float v35; // xmm0_4 struct cocos2d::CCPoint v36; // rax struct cocos2d::CCSprite *v37; // rbx CCMenuItemSpriteExtra *v38; // rdi CCMenuItemSpriteExtra_vtbl *v39; // rbx struct cocos2d::CCPoint v40; // rax struct cocos2d::CCSprite *v41; // rbx CCMenuItemSpriteExtra *v42; // rdi CCMenuItemSpriteExtra_vtbl *v43; // rbx struct cocos2d::CCPoint v44; // rax struct cocos2d::CCLabelBMFont *v45; // rdi cocos2d::CCLabelBMFont_vtbl *v46; // rbx const cocos2d::CCPoint *v47; // rax cocos2d::CCPoint v48; // rbx float v49; // xmm6_4 double v50; // xmm0_8 ButtonSprite *p_Src; // [rsp+58h] [rbp-59h] BYREF _QWORD *v52; // [rsp+60h] [rbp-51h] BYREF ButtonSprite *v53; // [rsp+68h] [rbp-49h] BYREF char v54[8]; // [rsp+70h] [rbp-41h] BYREF __int128 Src; // [rsp+78h] [rbp-39h] BYREF __int64 v56; // [rsp+88h] [rbp-29h] __int64 v57; // [rsp+90h] [rbp-21h] char v58; // [rsp+98h] [rbp-19h] BYREF _QWORD v59[4]; // [rsp+A0h] [rbp-11h] BYREF v2 = a2; LOBYTE(a2) = 1; a1->m_mainLayer->removeAllChildrenWithCleanup(a1->m_mainLayer, (bool)a2); m_userScore = a1->m_userScore; if ( m_userScore ) { cocos2d::CCObject::release(m_userScore); a1->m_userScore = nullptr; } if ( v2 ) { a1->m_userScore = v2; cocos2d::CCObject::retain(v2); m_friendReqStatus = v2->m_friendReqStatus; v6 = SimplePlayer::create(1); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v6, 1); ((void (__fastcall *)(SimplePlayer *))v6->setScale_0)(v6); v7 = v6->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v52, 30.0, a1->m_height * 0.5); v7->setPosition_0(v6, v8); v9 = (cocos2d::ccColor3B *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { p_Src = (ButtonSprite *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(p_Src); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v9 = (cocos2d::ccColor3B *)qword_1406C2ED8; } v10 = v6->cocos2d::CCSprite::cocos2d::CCNodeRGBA::cocos2d::CCRGBAProtocol::__vftable; v11 = GameManager::colorForIdx(v9, (GameManager *)&v58, a1->m_userScore->m_color1); v10->setColor(&v6->cocos2d::CCRGBAProtocol, v11); v12 = (cocos2d::ccColor3B *)qword_1406C2ED8; if ( !qword_1406C2ED8 ) { p_Src = (ButtonSprite *)operator new(0x668u); qword_1406C2ED8 = sub_14017AB00(p_Src); (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2ED8 + 72LL))(qword_1406C2ED8); v12 = (cocos2d::ccColor3B *)qword_1406C2ED8; } v13 = GameManager::colorForIdx(v12, (GameManager *)&v52, a1->m_userScore->m_color2); v6->m_secondLayer->setColor(&v6->m_secondLayer->cocos2d::CCRGBAProtocol, v13); SimplePlayer::updateColors(v6); SimplePlayer::tryEnableCustomGlowColor(v6, a1->m_userScore->m_color3); v14 = a1->m_userScore; v15 = v14->m_special == 2 || v14->m_glowEnabled; v6->m_hasGlowOutline = v15; SimplePlayer::updatePlayerFrame(v6, a1->m_userScore->m_iconID, a1->m_userScore->m_iconType); SimplePlayer::updateColors(v6); v16 = cocos2d::CCMenu::create(nullptr); a1->m_mainLayer->addChild_1(a1->m_mainLayer, v16); sub_14003BDB0((__int64)v59, (__int64)&a1->m_userScore->m_userName); v17 = v59[2] == 0; sub_14003A830((__int64)v59); if ( v17 ) { Src = 0; v56 = 1; v57 = 15; LOWORD(Src) = 45; p_Src = (ButtonSprite *)&Src; p_m_userName = &a1->m_userScore->m_userName; if ( p_m_userName != (std::string *)&Src ) sub_14003CCE0((void **)p_m_userName, &Src, 1u); sub_14003A830((__int64)&Src); } sub_14003BDB0((__int64)v59, (__int64)&a1->m_userScore->m_userName); v19 = (const char *)v59; if ( v59[3] > 0xFu ) v19 = (const char *)v59[0]; v20 = cocos2d::CCLabelBMFont::create(v19, (const char *)&qword_14052A4D8); v52 = &v20->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; sub_14003A830((__int64)v59); cocos2d::CCLabelBMFont::limitLabelWidth(v20, 150.0, 0.80000001, 0.0); v21 = v20->getContentSize(v20)->width * 0.5; v22 = ((double (__fastcall *)(cocos2d::CCLabelBMFont *))v20->getScale)(v20); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&p_Src, (float)(*(float *)&v22 * v21) + 35.0, 0.0); v23 = (__int64)v6->getPosition_0(v6); cocos2d::CCPoint::operator+(v23, v54); v24 = CCMenuItemSpriteExtra::create(v20, nullptr, a1, (cocos2d::SEL_MenuHandler *)GJRequestCell::onViewProfile); v16->addChild_1(v16, v24); v25 = v24->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v26 = cocos2d::CCNode::convertToNodeSpace(v16, (const struct cocos2d::CCPoint *)&p_Src); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v25->setPosition_0)(v24, v26); if ( m_friendReqStatus == 2 ) { v24->setEnabled(v24, 0); p_Src = (ButtonSprite *)operator new(0x2C0u); v27 = ButtonSprite::ButtonSprite(p_Src); if ( v27 ) { if ( ButtonSprite::init_1( v27, "Unblock", 50, 0, 0.60000002, 0, (const char *)&qword_14052A4D8, "GJ_button_05.png", 28.0) ) { cocos2d::CCObject::autorelease(v27); } else { ((void (__fastcall *)(ButtonSprite *, __int64))v27->~ButtonSprite)(v27, 1); v27 = nullptr; } } v28 = CCMenuItemSpriteExtra::create(v27, nullptr, a1, (cocos2d::SEL_MenuHandler *)GJUserCell::onUnblockUser); HIDWORD(v28->m_pfnSelector.adj) = 1069547520; v16->addChild_1(v16, v28); v29 = v28->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v30 = a1->m_height * 0.5; width = v27->getContentSize(v27)->width; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&p_Src, (float)(a1->m_width - (float)(width * 0.5)) - 9.0, v30); p_p_Src = &v53; } else { if ( m_friendReqStatus != 4 ) { LABEL_31: if ( v2->m_friendReqStatus == 1 ) { if ( v2->m_messageState != 2 ) { v37 = cocos2d::CCSprite::createWithSpriteFrameName("accountBtn_messages_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v37->setScale_0)(v37); v38 = CCMenuItemSpriteExtra::create(v37, nullptr, a1, (cocos2d::SEL_MenuHandler *)GJUserCell::onSendMessage); HIDWORD(v38->m_pfnSelector.adj) = 1067030938; v16->addChild_1(v16, v38); v39 = v38->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, a1->m_width - 60.0, a1->m_height * 0.5); v40 = cocos2d::CCNode::convertToNodeSpace(v16, (const struct cocos2d::CCPoint *)&p_Src); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v39->setPosition_0)(v38, v40); } v41 = cocos2d::CCSprite::createWithSpriteFrameName("accountBtn_removeFriend_001.png"); ((void (__fastcall *)(struct cocos2d::CCSprite *))v41->setScale_0)(v41); v42 = CCMenuItemSpriteExtra::create(v41, nullptr, a1, (cocos2d::SEL_MenuHandler *)GJUserCell::onRemoveFriend); HIDWORD(v42->m_pfnSelector.adj) = 1067030938; v16->addChild_1(v16, v42); v43 = v42->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, a1->m_width - 24.0, a1->m_height * 0.5); v44 = cocos2d::CCNode::convertToNodeSpace(v16, (const struct cocos2d::CCPoint *)&p_Src); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v43->setPosition_0)(v42, v44); } if ( a1->m_userScore->m_newFriendRequest && ((m_friendReqStatus - 2) & 0xFFFFFFFD) != 0 ) { v45 = cocos2d::CCLabelBMFont::create("New!", "goldFont.fnt"); ((void (__fastcall *)(struct cocos2d::CCLabelBMFont *))v45->setScale_0)(v45); v46 = v45->cocos2d::CCSpriteBatchNode::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, 0.0, 0.5); v46->setAnchorPoint(v45, v47); a1->m_mainLayer->addChild_0(a1->m_mainLayer, v45, 10); v45->setTag(v45, 100); v48 = (cocos2d::CCPoint)v52; v49 = *(float *)(*(__int64 (__fastcall **)(_QWORD *))(*v52 + 304LL))(v52) * 0.5; v50 = (*(double (__fastcall **)(cocos2d::CCPoint))(**(_QWORD **)&v48 + 168LL))(v48); cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, (float)(*(float *)&v50 * v49) + 10.0, 0.0); cocos2d::CCPoint::operator+(v54, &v52); v45->setPosition_0(v45, (const cocos2d::CCPoint *)&v52); } return; } v53 = (ButtonSprite *)operator new(0x2C0u); v33 = ButtonSprite::ButtonSprite(v53); if ( v33 ) { if ( ButtonSprite::init_1( v33, "Cancel", 50, 0, 0.60000002, 0, (const char *)&qword_14052A4D8, "GJ_button_05.png", 28.0) ) { cocos2d::CCObject::autorelease(v33); } else { ((void (__fastcall *)(ButtonSprite *, __int64))v33->~ButtonSprite)(v33, 1); v33 = nullptr; } } v28 = CCMenuItemSpriteExtra::create( v33, nullptr, a1, (cocos2d::SEL_MenuHandler *)GJUserCell::onCancelFriendRequest); HIDWORD(v28->m_pfnSelector.adj) = 1069547520; v16->addChild_1(v16, v28); v29 = v28->cocos2d::CCMenuItemSprite::cocos2d::CCMenuItem::cocos2d::CCNodeRGBA::cocos2d::CCNode::cocos2d::CCObject::cocos2d::CCCopying::__vftable; v34 = a1->m_height * 0.5; v35 = v33->getContentSize(v33)->width; cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v53, (float)(a1->m_width - (float)(v35 * 0.5)) - 9.0, v34); p_p_Src = &p_Src; } v36 = cocos2d::CCNode::convertToNodeSpace(v16, (const struct cocos2d::CCPoint *)p_p_Src); ((void (__fastcall *)(CCMenuItemSpriteExtra *, struct cocos2d::CCPoint))v29->setPosition_0)(v28, v36); goto LABEL_31; } }