//
// FriendPickerPopup::mountVirtualRow from 0x1400e8470 to 0x1400e8802 (914 bytes)
//
// 2 xrefs:
// > ??> @ 0x140729ff0
// > ??> @ 0x140914d5c
//
// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!
//
// 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:26:33 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall FriendPickerPopup::mountVirtualRow(__int64 a1, unsigned int a2, _QWORD *a3, _QWORD *a4)
{
struct cocos2d::CCObject *v7; // rbp
int v8; // r14d
char v9; // al
bool v10; // di
cocos2d::CCArray *v11; // rcx
unsigned int v12; // ebx
bool v13; // bl
int v14; // eax
__int64 v15; // rcx
int v16; // eax
__int64 v17; // rcx
bool v18; // di
__int64 v19; // rcx
char v20; // al
__int64 result; // rax
const char *v22; // rcx
cocos2d::CCObject *v23; // rdi
__int64 v24; // rbx
__int64 v25; // rax
__int64 v26; // rdx
__int64 v27; // rbx
__int64 v28; // rax
__int64 v29; // rax
__int64 v30; // r8
_QWORD *v31; // rcx
const char *v32; // rcx
struct cocos2d::CCSprite *v33; // rax
int v34; // ebx
__int64 v35; // rbx
__int64 v36; // rax
void *v37; // [rsp+80h] [rbp+8h] BYREF
v7 = cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 40), a2);
v8 = 0;
if ( *(_BYTE *)(a1 + 51) )
goto LABEL_19;
v9 = *(_BYTE *)(a1 + 48);
v10 = v9 == 0;
if ( v9 )
{
v11 = *(cocos2d::CCArray **)(a1 + 24);
if ( v11 )
{
v12 = 0;
if ( (int)cocos2d::CCArray::count(v11) > 0 )
{
while ( *((_DWORD *)cocos2d::CCArray::objectAtIndex(*(cocos2d::CCArray **)(a1 + 24), v12) + 98) != *((_DWORD *)v7 + 98) )
{
if ( (int)++v12 >= (int)cocos2d::CCArray::count(*(cocos2d::CCArray **)(a1 + 24)) )
goto LABEL_9;
}
v10 = 1;
}
}
}
LABEL_9:
if ( !*(_BYTE *)(a1 + 49) )
{
v14 = *((_DWORD *)v7 + 113);
if ( v14 )
{
if ( v14 != 1 )
goto LABEL_18;
if ( !v10 )
{
v15 = qword_14090BFD0;
if ( !qword_14090BFD0 )
{
v37 = operator new(0x6E8u);
qword_14090BFD0 = GameManager::GameManager(v37);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);
v15 = qword_14090BFD0;
}
v16 = *(_DWORD *)(v15 + 1064) - *(_DWORD *)(v15 + 1068);
if ( v16 != 1 && v16 != 2 )
{
LABEL_18:
v13 = 0;
goto LABEL_20;
}
}
}
LABEL_19:
v13 = 1;
goto LABEL_20;
}
v13 = *((_DWORD *)v7 + !v10 + 116) != 2;
LABEL_20:
v18 = false;
if ( *(_BYTE *)(a1 + 50) )
{
v17 = *(_QWORD *)(a1 + 16);
if ( v17 )
{
if ( (*(unsigned __int8 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v17 + 8LL))(v17, *((unsigned int *)v7 + 98)) )
v18 = true;
}
}
if ( *(_BYTE *)(a1 + 52) )
{
v19 = *(_QWORD *)(a1 + 16);
if ( v19 )
v8 = (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v19 + 48LL))(v19, *((unsigned int *)v7 + 98));
}
v20 = !v13 && !v8;
result = GJCompactUserCell::buildUserRow(
(_DWORD)v7,
(_DWORD)a3,
(_DWORD)a4,
(int)a1 - 776,
(__int64)FriendPickerPopup::onShowProfile,
1101004800,
v20,
0);
if ( v13 && v18 )
{
LOWORD(v37) = -256;
BYTE2(v37) = 0;
result = (**(__int64 (__fastcall ***)(__int64, void **))(result + 368))(result + 368, &v37);
}
if ( v8 )
{
v22 = "Invited";
if ( v8 == 1 )
v22 = "Member";
v23 = cocos2d::CCLabelBMFont::create(v22, "chatFont.fnt");
v24 = *(_QWORD *)v23;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v37, 1.0, 0.5);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v24 + 288))(v23, v25);
(*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v23 + 160LL))(v23);
LOBYTE(v26) = -126;
(*(void (__fastcall **)(__int64, __int64))(*((_QWORD *)v23 + 46) + 40LL))((__int64)v23 + 368, v26);
v27 = *(_QWORD *)v23;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v37, *(float *)(a1 - 72) - 12.0, 20.0);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v27 + 184))(v23, v28);
v29 = *a3;
v30 = 1;
v31 = a3;
}
else
{
if ( !v13 )
return result;
v32 = "GJ_checkOff_001.png";
if ( v18 )
v32 = "GJ_checkOn_001.png";
v33 = cocos2d::CCSprite::createWithSpriteFrameName(v32);
v34 = (int)v33;
(*(void (__fastcall **)(struct cocos2d::CCSprite *))(*(_QWORD *)v33 + 160LL))(v33);
v23 = CCMenuItemSpriteExtra::create(v34, 0, (int)a1 - 776, (__int64)FriendPickerPopup::onPickFriend);
*((_DWORD *)v23 + 93) = 1068708659;
(*(void (__fastcall **)(cocos2d::CCObject *, struct cocos2d::CCObject *))(*(_QWORD *)v23 + 640LL))(v23, v7);
v35 = *(_QWORD *)v23;
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)&v37, *(float *)(a1 - 72) - 24.0, 20.0);
(*(void (__fastcall **)(cocos2d::CCObject *, __int64))(v35 + 184))(v23, v36);
v29 = *a4;
v30 = 3;
v31 = a4;
}
return (*(__int64 (__fastcall **)(_QWORD *, cocos2d::CCObject *, __int64))(v29 + 456))(v31, v23, v30);
}