//
// ThreadViewPopup::buildMemberButton from 0x10092f370 to 0x10092f65e (750 bytes)
//
// 6 xrefs:
// > ThreadViewPopup::init @ 0x10092df3d
// > ThreadViewPopup::threadUpdateFinished @ 0x10093367e
// > ThreadViewPopup::threadMessagesFinished @ 0x100934c94
// > ThreadViewPopup::threadMessagesFinished @ 0x100934e19
// > sub_100943A30 @ 0x100943a41
// > MemberListPopup::threadUpdateFinished @ 0x100943dda
//
// 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 12:38:23 +0000
//
__int64 __fastcall ThreadViewPopup::buildMemberButton(__int64 a1)
{
__int64 result; // rax
char v2; // cl
__int64 v4; // rdi
int v5; // esi
const char *v6; // rdx
char *v7; // rax
__int64 CString; // rax
void *v9; // r14
double v10; // xmm0_8
char *v11; // r15
void *v12; // r12
void *v13; // rax
__int64 v14; // r14
float v15; // [rsp+8h] [rbp-38h] BYREF
float v16; // [rsp+10h] [rbp-30h]
float v17; // [rsp+14h] [rbp-2Ch]
result = *(_QWORD *)(a1 + 752);
v2 = *(_BYTE *)(result + 264);
if ( !v2 && *(_QWORD *)(a1 + 552) )
{
v4 = *(_QWORD *)(a1 + 872);
if ( v4 )
{
(*(void (__fastcall **)(__int64))(*(_QWORD *)v4 + 520LL))(v4);
*(_OWORD *)(a1 + 864) = 0;
result = *(_QWORD *)(a1 + 752);
v2 = *(_BYTE *)(result + 264);
}
if ( (v2 & 1) != 0 || *(_DWORD *)(result + 268) != 8 )
{
v5 = *(_DWORD *)(result + 168);
v6 = "s";
if ( v5 == 1 )
v6 = "";
v7 = sub_10088E820("%i member%s", v5, v6);
CString = cocos2d::CCString::getCString((__int64)v7);
v9 = cocos2d::CCLabelBMFont::create_3(CString, (__int64)"goldFont.fnt");
cocos2d::CCLabelBMFont::limitLabelWidth((__int64)v9, 70.0, (__m128)0x3ECCCCCDu, (__m128)0x3E4CCCCDu);
sub_100278250(&v15, 0.0, 0.5);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v9 + 296LL))(v9, &v15);
v17 = *(float *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v9 + 328LL))(v9);
v10 = (*(double (__fastcall **)(void *))(*(_QWORD *)v9 + 168LL))(v9);
*(float *)&v10 = *(float *)&v10 * v17;
v17 = *(float *)&v10;
v11 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_03_001.png", v10);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v11 + 160LL))(v11, 0.34999999);
(*(void (__fastcall **)(char *, float))(*(_QWORD *)v11 + 360LL))(v11, -90.0);
(*(void (__fastcall **)(char *, __int64))(*(_QWORD *)v11 + 912LL))(v11, 150);
v16 = *(float *)((*(__int64 (__fastcall **)(char *))(*(_QWORD *)v11 + 328LL))(v11) + 4);
*(float *)&v10 = (*(float (__fastcall **)(char *))(*(_QWORD *)v11 + 168LL))(v11);
v17 = v17 + 10.0;
v16 = (float)((float)(*(float *)&v10 * v16) * 0.5) + v17;
v12 = cocos2d::CCNode::create();
sub_100278260(&v15, v16, 28.0);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v12 + 320LL))(v12, &v15);
sub_100278250(&v15, 0.0, 14.0);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v9 + 184LL))(v9, &v15);
(*(void (__fastcall **)(void *, void *))(*(_QWORD *)v12 + 456LL))(v12, v9);
sub_100278250(&v15, v17, 14.0);
(*(void (__fastcall **)(char *, float *))(*(_QWORD *)v11 + 184LL))(v11, &v15);
(*(void (__fastcall **)(void *, char *))(*(_QWORD *)v12 + 456LL))(v12, v11);
*(_QWORD *)(a1 + 864) = v9;
v13 = CCMenuItemSpriteExtra::create((__int64)v12, 0, a1, (__int64)sub_100933350, 0);
*(_QWORD *)(a1 + 872) = v13;
CCMenuItemSpriteExtra::setSizeMult((__int64)v13, 1.3);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 552) + 456LL))(
*(_QWORD *)(a1 + 552),
*(_QWORD *)(a1 + 872));
v14 = *(_QWORD *)(a1 + 872);
sub_100278250(&v15, (float)(v16 * 0.5) + *(float *)(a1 + 880), *(float *)(a1 + 884));
return (*(__int64 (__fastcall **)(__int64, float *))(*(_QWORD *)v14 + 184LL))(v14, &v15);
}
}
return result;
}