//
// FRequestProfilePage::updateModeButtons from 0x140211b40 to 0x140211daf (623 bytes)
//
// 3 xrefs:
// > FRequestProfilePage::init @ 0x14020fa9c
// > FRequestProfilePage::onSelectMode @ 0x140211b12
// > ??> @ 0x14091b53c
//
// 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:28:19 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall FRequestProfilePage::updateModeButtons(__int64 a1)
{
__int64 v2; // rax
float v3; // xmm6_4
int v4; // ebp
int v5; // esi
__int64 **v6; // r15
__int64 *v7; // rbx
__int64 v8; // rdi
__int64 result; // rax
__int64 v10; // rdx
__int64 v11; // rbx
const char *v12; // rcx
__int64 *v13; // rbx
__int64 *v14; // rax
__int64 *v15; // r14
__int64 v16; // rdi
__int64 v17; // rbx
__int64 v18; // rax
__int64 v19; // rax
char v20[8]; // [rsp+30h] [rbp-88h] BYREF
char v21[8]; // [rsp+38h] [rbp-80h] BYREF
float v22; // [rsp+C8h] [rbp+10h] BYREF
float v23; // [rsp+CCh] [rbp+14h]
__int16 v24; // [rsp+D0h] [rbp+18h] BYREF
char v25; // [rsp+D2h] [rbp+1Ah]
void *v26; // [rsp+D8h] [rbp+20h]
v2 = cocos2d::CCDirector::sharedDirector(a1);
cocos2d::CCDirector::getWinSize(v2, &v22);
v3 = (float)((float)(v22 * 0.5) - 220.0) + 26.0;
if ( *(_BYTE *)(a1 + 704) )
v4 = 1;
else
v4 = *(_BYTE *)(a1 + 705) != 0 ? 2 : 0;
v5 = 0;
v6 = (__int64 **)(a1 + 856);
do
{
v7 = *v6;
if ( !*v6 )
{
if ( v5 == 1 )
{
v12 = "threadBtn_sentOn_001.png";
}
else
{
v12 = "threadBtn_ignoreOn_001.png";
if ( v5 != 2 )
v12 = "threadBtn_inboxOn_001.png";
}
v24 = -3856;
v25 = -16;
v13 = (__int64 *)sub_14006C4D0(v12, v5 == v4, (__int64)&v24);
*v6 = v13;
v26 = operator new(0x208u);
v14 = (__int64 *)CCMenuItemSpriteExtra::CCMenuItemSpriteExtra((__int64)v26);
v15 = v14;
if ( v14 )
{
if ( CCMenuItemSpriteExtra::init(v14, v13, 0, a1, (__int64)FRequestProfilePage::onSelectMode) )
{
cocos2d::CCObject::autorelease((cocos2d::CCObject *)v15);
LABEL_19:
(*(void (__fastcall **)(__int64 *, _QWORD))(*v15 + 64))(v15, (unsigned int)v5);
*((_DWORD *)v15 + 93) = 1067030938;
(*(void (__fastcall **)(_QWORD, __int64 *))(**(_QWORD **)(a1 + 552) + 464LL))(*(_QWORD *)(a1 + 552), v15);
v16 = *v15;
v17 = *(_QWORD *)(a1 + 552);
cocos2d::CCPoint::CCPoint((cocos2d::CCPoint *)v20, v3, (float)((float)(v23 * 0.5) + 68.0) - (float)(37 * v5));
cocos2d::CCNode::convertToNodeSpace(v17, v21, v18);
result = (*(__int64 (__fastcall **)(__int64 *, __int64))(v16 + 184))(v15, v19);
goto LABEL_20;
}
(*(void (__fastcall **)(__int64 *, __int64))(*v15 + 8))(v15, 1);
}
v15 = nullptr;
goto LABEL_19;
}
v8 = (*(__int64 (__fastcall **)(__int64 *, __int64))(*v7 + 472))(*v6, 1);
result = (*(__int64 (__fastcall **)(__int64 *, __int64))(*v7 + 472))(v7, 2);
v11 = result;
if ( v8 )
result = (*(__int64 (__fastcall **)(__int64, bool))(*(_QWORD *)v8 + 336LL))(v8, v5 == v4);
if ( v11 )
{
LOBYTE(v10) = v5 != v4;
result = (*(__int64 (__fastcall **)(__int64, __int64))(*(_QWORD *)v11 + 336LL))(v11, v10);
}
LABEL_20:
++v5;
++v6;
}
while ( v5 < 3 );
return result;
}