//
// GJCompactUserCell::loadFromScore from 0x42e6a4 to 0x42e7e6 (322 bytes)
//
// 1 xrefs:
// > CustomListView::loadCell @ 0x4341e6
//
// 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:12 +0000
//
cocos2d::CCObject *__fastcall GJCompactUserCell::loadFromScore(GJCompactUserCell *this, GJUserScore *a2)
{
cocos2d::CCObject *result; // r0
cocos2d::CCMenuItem *v5; // r1
int v6; // r5
float v7; // s15
int v8; // r3
GameManager *v9; // r0
const char *v10; // r1
int v11; // r8
int v12; // r6
int (__fastcall *v13)(int, _BYTE *); // r8
_BYTE v14[8]; // [sp+1Ch] [bp-1Ch] BYREF
ProfilePage *(__fastcall *v15)(ProfilePage *, cocos2d::CCObject *, bool); // [sp+24h] [bp-14h]
int v16; // [sp+28h] [bp-10h]
int (__fastcall *v17)(int, cocos2d::CCObject *, int, int); // [sp+2Ch] [bp-Ch]
int v18; // [sp+30h] [bp-8h]
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 292))(*((_DWORD *)this + 103), 1);
result = *((cocos2d::CCObject **)this + 105);
if ( result )
{
result = (cocos2d::CCObject *)cocos2d::CCObject::release(result);
*((_DWORD *)this + 105) = 0;
}
if ( a2 )
{
*((_DWORD *)this + 105) = a2;
cocos2d::CCObject::retain(a2);
v6 = cocos2d::CCMenu::create(nullptr, v5);
(*(void (__fastcall **)(int, void *))(*(_DWORD *)v6 + 92))(v6, &unk_D2B804);
(*(void (__fastcall **)(_DWORD, int))(**((_DWORD **)this + 103) + 228))(*((_DWORD *)this + 103), v6);
v7 = *((float *)this + 101);
v15 = GJCompactUserCell::onViewProfile;
v16 = 0;
result = GJCompactUserCell::buildUserRow(
*((_DWORD *)this + 105),
*((GJUserScore **)this + 103),
v6,
(int)this,
(int)GJCompactUserCell::onViewProfile,
0,
v7 * 0.5,
0,
0);
v8 = *((_DWORD *)this + 105);
if ( *(_DWORD *)(v8 + 520) == 1 && *(_DWORD *)(v8 + 356) != 2 )
{
v9 = (GameManager *)GameManager::sharedState(result);
result = (cocos2d::CCObject *)GameManager::messagesRestricted(v9);
if ( !result )
{
v11 = cocos2d::CCSprite::createWithSpriteFrameName((cocos2d::CCSprite *)"accountBtn_messages_001.png", v10);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v11 + 80))(v11, 1057803469);
v17 = GJCompactUserCell::onSendMessage;
v18 = 0;
v12 = CCMenuItemSpriteExtra::create(v11, 0, (int)this, (int)GJCompactUserCell::onSendMessage, 0);
CCMenuItemSpriteExtra::setSizeMult(v12, 1.6);
(*(void (__fastcall **)(int, int))(*(_DWORD *)v6 + 228))(v6, v12);
v13 = *(int (__fastcall **)(int, _BYTE *))(*(_DWORD *)v12 + 92);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v14, *((float *)this + 100) - 22.0, *((float *)this + 101) * 0.5);
return (cocos2d::CCObject *)v13(v12, v14);
}
}
}
return result;
}