//
// MessagesProfilePage::loadMessagesFinished from 0x1403381c0 to 0x14033830e (334 bytes)
//
// 2 xrefs:
// > ??> @ 0x1405ab8c0
// > ??> @ 0x1406d52d0
//
// This function is hookable on this platform!
//
// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA
// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings
//
// Hidden C++ exception states: #wind=1
void MessagesProfilePage::loadMessagesFinished(MessagesProfilePage *a1, cocos2d::CCArray *a2, const char *a3)
{
__int64 v5; // rdx
signed int v6; // ebx
cocos2d::ccArray *data; // rcx
__int64 num; // rax
cocos2d::CCObject **arr; // rcx
cocos2d::CCObject **i; // r8
signed int v11; // edx
GJAccountManager *v12; // rax
int v13; // edi
__int64 v14; // rcx
struct cocos2d::CCObject *v15; // rax
void *v16; // [rsp+30h] [rbp+8h]
if ( FRequestProfilePage::isCorrect(&a1[-1].m_sTransform.d, a3) )
{
MessagesProfilePage::setupCommentsBrowser((MessagesProfilePage *)((char *)a1 - 656), a2);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)&a1->m_fVertexZ + 320LL))(*(_QWORD *)&a1->m_fVertexZ, 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)&a1->m_fRotationX + 320LL))(*(_QWORD *)&a1->m_fRotationX, 0);
LOBYTE(v5) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)&a1->m_obContentSize.height + 320LL))(
*(_QWORD *)&a1->m_obContentSize.height,
v5);
if ( !LOBYTE(a1->m_uID) && a2 && cocos2d::CCArray::count(a2) )
{
v6 = 0;
data = a2->data;
num = data->num;
if ( (_DWORD)num )
{
arr = data->arr;
for ( i = &arr[num - 1]; arr <= i; ++arr )
{
v11 = v6;
if ( !*arr )
break;
++v6;
if ( LOBYTE((*arr)[8].m_nTag) )
v6 = v11;
}
}
v12 = GJAccountManager::sharedState();
v13 = v12->m_accountID - v12->m_unkInt1;
v14 = qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v16 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v16);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v14 = qword_1406C2EC0;
}
v15 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(v14 + 600), v13);
if ( v15 )
{
if ( (signed int)v15[13].m_uReference < v6 )
v15[13].m_uReference = v6;
}
}
}
}