//
// ProfilePage::setupCommentsBrowser from 0x5f63bc to 0x5f64f6 (314 bytes)
//
// 8 xrefs:
// > ProfilePage::onUpdate @ 0x5f66ec
// > ProfilePage::updateUserScoreFinished @ 0x5f6778
// > ProfilePage::loadCommentsFinished @ 0x5f8bd2
// > ProfilePage::init @ 0x5fae18
// > ProfilePage::init @ 0x5faf8a
// > ProfilePage::init @ 0x5fafa6
// > ProfilePage::userInfoChanged @ 0x5fb30e
// > ProfilePage::loadPage @ 0x5fb55a
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:31 +0000
//
int __fastcall ProfilePage::setupCommentsBrowser(ProfilePage *this, cocos2d::CCArray *a2)
{
ProfilePage *v2; // r4
int v4; // r0
cocos2d::CCTouchDispatcher *v5; // r0
cocos2d::CCLayer *v6; // r0
cocos2d::CCLayerColor *v7; // r0
int v8; // r8
int (__fastcall *v9)(int, int *); // r9
cocos2d::CCDirector *v10; // r0
int v11; // r0
cocos2d::CCTouchDispatcher *v12; // r0
float v14[2]; // [sp+14h] [bp-18h] BYREF
int v15[2]; // [sp+1Ch] [bp-10h] BYREF
v2 = this;
if ( *((_DWORD *)this + 146) )
{
v4 = cocos2d::CCDirector::sharedDirector(this);
v5 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v4 + 80))(v4);
cocos2d::CCTouchDispatcher::unregisterForcePrio(v5, *((cocos2d::CCObject **)v2 + 146));
this = (ProfilePage *)(*(int (__fastcall **)(_DWORD))(**((_DWORD **)v2 + 146) + 268))(*((_DWORD *)v2 + 146));
*((_DWORD *)v2 + 146) = 0;
}
cocos2d::CCDirector::sharedDirector(this);
cocos2d::CCDirector::getWinSize((cocos2d::CCDirector *)v14);
if ( a2 )
v6 = CustomListView::create(a2, 0, 1120403456, 1135214592, 0, 15, 0);
else
v6 = nullptr;
v7 = GJCommentListLayer::create((int)v6, (int)"Comments", -12684609, 340.0, 100.0, 0);
*((_DWORD *)v2 + 146) = v7;
(*(void (__fastcall **)(_DWORD, cocos2d::CCLayerColor *))(**((_DWORD **)v2 + 115) + 228))(*((_DWORD *)v2 + 115), v7);
v8 = *((_DWORD *)v2 + 146);
v9 = *(int (__fastcall **)(int, int *))(*(_DWORD *)v8 + 92);
cocos2d::CCPoint::CCPoint(
(cocos2d::CCPoint *)v15,
(float)(v14[0] - 340.0) * 0.5,
(float)((float)(v14[1] - 100.0) * 0.5) - 53.0);
v10 = (cocos2d::CCDirector *)v9(v8, v15);
v15[0] = 0;
v11 = cocos2d::CCDirector::sharedDirector(v10);
v12 = (cocos2d::CCTouchDispatcher *)(*(int (__fastcall **)(int))(*(_DWORD *)v11 + 80))(v11);
if ( cocos2d::CCTouchDispatcher::ownerLevelOf(v12, *((cocos2d::CCNode **)v2 + 146), v15) )
return cocos2d::CCMenu::giveMenuTouchPriority(*((cocos2d::CCMenu **)v2 + 111), v15[0] - 1);
else
return cocos2d::CCMenu::giveMenuTouchPriority(*((cocos2d::CCMenu **)v2 + 111));
}