//
// ThreadViewPopup::buildMemberButton from 0x1004f975c to 0x1004f9a24 (712 bytes)
//
// 5 xrefs:
// > ThreadViewPopup::init @ 0x1004f8690
// > ThreadViewPopup::threadUpdateFinished @ 0x1004fca58
// > ThreadViewPopup::threadMessagesFinished @ 0x1004fd9d8
// > ThreadViewPopup::threadMessagesFinished @ 0x1004fdb08
// > MemberListPopup::threadUpdateFinished @ 0x100508c24
//
// This function is hookable on this platform (idp: arm, 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:06:49 +0000
//
_QWORD *__fastcall ThreadViewPopup::buildMemberButton(_QWORD *result)
{
__int64 v1; // x8
__int64 v2; // x19
int v3; // w8
const char *v4; // x9
void *v5; // x0
const char *CString; // x0
void *v7; // x20
float v8; // s8
float v9; // s8
void *v10; // x21
float v11; // s9
float v12; // s0
float v13; // s9
float v14; // s8
void *v15; // x22
void *v16; // x0
__int64 v17; // x20
float v18; // [xsp+18h] [xbp-48h] BYREF
v1 = result[94];
if ( (*(_BYTE *)(v1 + 264) & 1) == 0 )
{
v2 = (__int64)result;
if ( result[69] )
{
if ( (result = (_QWORD *)result[109]) != nullptr
&& (result = (_QWORD *)(*(__int64 (__fastcall **)(_QWORD *))(*result + 520LL))(result),
*(_OWORD *)(v2 + 864) = 0u,
v1 = *(_QWORD *)(v2 + 752),
(*(_BYTE *)(v1 + 264) & 1) != 0)
|| *(_DWORD *)(v1 + 268) != 8 )
{
v3 = *(_DWORD *)(v1 + 168);
v4 = "s";
if ( v3 == 1 )
v4 = "";
v5 = sub_1003065B0("%i member%s", v3, v4);
CString = (const char *)cocos2d::CCString::getCString((__int64)v5);
v7 = cocos2d::CCLabelBMFont::create_1(CString, "goldFont.fnt");
cocos2d::CCLabelBMFont::limitLabelWidth((__int64)v7, 70.0, 0.4, 0.2);
sub_1000262BC(&v18, 0.0, 0.5);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v7 + 296LL))(v7, &v18);
v8 = *(float *)(*(__int64 (__fastcall **)(void *))(*(_QWORD *)v7 + 328LL))(v7);
v9 = v8 * (*(float (__fastcall **)(void *))(*(_QWORD *)v7 + 168LL))(v7);
v10 = cocos2d::CCSprite::createWithSpriteFrameName((__int64)"GJ_arrow_03_001.png");
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v10 + 160LL))(v10, 0.35);
(*(void (__fastcall **)(void *, float))(*(_QWORD *)v10 + 360LL))(v10, -90.0);
(*(void (__fastcall **)(void *, __int64))(*(_QWORD *)v10 + 912LL))(v10, 150);
v11 = *(float *)((*(__int64 (__fastcall **)(void *))(*(_QWORD *)v10 + 328LL))(v10) + 4);
v12 = v11 * (*(float (__fastcall **)(void *))(*(_QWORD *)v10 + 168LL))(v10);
v13 = v9 + 10.0;
v14 = (float)(v9 + 10.0) + (float)(v12 * 0.5);
v15 = cocos2d::CCNode::create();
sub_1000262C4(&v18, v14, 28.0);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v15 + 320LL))(v15, &v18);
sub_1000262BC(&v18, 0.0, 14.0);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v7 + 184LL))(v7, &v18);
(*(void (__fastcall **)(void *, void *))(*(_QWORD *)v15 + 456LL))(v15, v7);
sub_1000262BC(&v18, v13, 14.0);
(*(void (__fastcall **)(void *, float *))(*(_QWORD *)v10 + 184LL))(v10, &v18);
(*(void (__fastcall **)(void *, void *))(*(_QWORD *)v15 + 456LL))(v15, v10);
*(_QWORD *)(v2 + 864) = v7;
v16 = CCMenuItemSpriteExtra::create((__int64)v15, 0, v2, (__int64)sub_1004FC7D8, 0);
*(_QWORD *)(v2 + 872) = v16;
CCMenuItemSpriteExtra::setSizeMult((__int64)v16, 1.3);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(v2 + 552) + 456LL))(
*(_QWORD *)(v2 + 552),
*(_QWORD *)(v2 + 872));
v17 = *(_QWORD *)(v2 + 872);
sub_1000262BC(&v18, (float)(v14 * 0.5) + *(float *)(v2 + 880), *(float *)(v2 + 884));
return (_QWORD *)(*(__int64 (__fastcall **)(__int64, float *))(*(_QWORD *)v17 + 184LL))(v17, &v18);
}
}
}
return result;
}