//
// MessagesProfilePage::setupCommentsBrowser from 0x100213a40 to 0x100213baf (367 bytes)
//
// 2 xrefs:
// > sub_100212DC0 @ 0x100213077
// > MessagesProfilePage::loadMessagesFinished @ 0x100213bd6
//
// 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:26:59 +0000
//
__int64 __fastcall MessagesProfilePage::setupCommentsBrowser(_QWORD *a1, __int64 a2)
{
__int64 v2; // r14
_QWORD *v3; // rbx
__int64 v4; // rax
__int64 v5; // rax
__int64 v6; // rax
__int64 v7; // rdi
__int64 v8; // rax
__int64 v9; // r14
__int64 result; // rax
__int64 v11; // rdi
__int64 v12; // rbx
int v13; // eax
_BYTE v14[8]; // [rsp+8h] [rbp-28h] BYREF
float v15[8]; // [rsp+10h] [rbp-20h] BYREF
v2 = a2;
v3 = a1;
if ( a1[93] )
{
v4 = cocos2d::CCDirector::sharedDirector(a1, a2);
v5 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v4 + 160LL))(v4);
a2 = a1[93];
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, a2);
a1 = (_QWORD *)a1[93];
(*(void (__fastcall **)(_QWORD *))(*a1 + 536LL))(a1);
v3[93] = 0;
}
v6 = cocos2d::CCDirector::sharedDirector(a1, a2);
cocos2d::CCDirector::getWinSize(v15, v6);
if ( v2 )
v7 = CustomListView::create(v2, 0, 0, 17, 196.0, 340.0, 0.0);
else
v7 = 0;
v8 = GJCommentListLayer::create(v7, "Old Messages", 4282282687LL, 0, 340.0, 196.0);
v3[93] = v8;
(*(void (__fastcall **)(_QWORD, __int64))(*(_QWORD *)v3[73] + 456LL))(v3[73], v8);
v9 = v3[93];
sub_100278250(v14, (float)(v15[0] + -340.0) * 0.5, (float)((float)((float)(v15[1] + -196.0) * 0.5) + -10.0) + 5.0);
(*(void (__fastcall **)(__int64, _BYTE *))(*(_QWORD *)v9 + 184LL))(v9, v14);
result = v3[93];
v11 = *(_QWORD *)(result + 544);
if ( v11 )
{
v12 = v3[69];
v13 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v11 + 1032LL))(v11);
return (*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v12 + 1024LL))(v12, (unsigned int)(v13 - 2));
}
return result;
}