//
// MessagesProfilePage::loadMessagesFinished from 0x1404777a0 to 0x1404778f9 (345 bytes)
//
// 2 xrefs:
// > ??> @ 0x1407b4f08
// > ??> @ 0x140928490
//
// 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:32:41 +0000
//
// Hidden C++ exception states: #wind=1
__int64 __fastcall MessagesProfilePage::loadMessagesFinished(__int64 a1, cocos2d::CCObject *a2, _BYTE *a3)
{
_QWORD *v5; // rsi
__int64 result; // rax
__int64 v7; // rdx
int v8; // ebx
unsigned int *v9; // rcx
__int64 v10; // rax
unsigned __int64 v11; // rcx
unsigned __int64 i; // r8
int v13; // edx
__int64 v14; // rax
int v15; // edi
__int64 v16; // rcx
struct cocos2d::CCObject *v17; // rax
void *v18; // [rsp+30h] [rbp+8h]
v5 = (_QWORD *)(a1 - 688);
result = MessagesProfilePage::isCorrect((_QWORD *)(a1 - 688), a3);
if ( (_BYTE)result )
{
MessagesProfilePage::setupCommentsBrowser(v5, a2);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 72) + 336LL))(*(_QWORD *)(a1 + 72), 0);
(*(void (__fastcall **)(_QWORD, _QWORD))(**(_QWORD **)(a1 + 56) + 336LL))(*(_QWORD *)(a1 + 56), 0);
LOBYTE(v7) = 1;
(*(void (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 112) + 336LL))(*(_QWORD *)(a1 + 112), v7);
if ( !*(_BYTE *)(a1 + 8) && a2 && cocos2d::CCArray::count(a2) )
{
v8 = 0;
v9 = *((unsigned int **)a2 + 7);
v10 = *v9;
if ( (_DWORD)v10 )
{
v11 = *((_QWORD *)v9 + 2);
for ( i = v11 + 8 * (v10 - 1); v11 <= i; v11 += 8LL )
{
v13 = v8;
if ( !*(_QWORD *)v11 )
break;
++v8;
if ( *(_BYTE *)(*(_QWORD *)v11 + 464LL) )
v8 = v13;
}
}
v14 = GJAccountManager::sharedState();
v15 = *(_DWORD *)(v14 + 360) - *(_DWORD *)(v14 + 364);
v16 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v18 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v18);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v16 = *(_QWORD *)&qword_14090BFB0;
}
v17 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(v16 + 1232), v15);
if ( v17 )
{
if ( *((_DWORD *)v17 + 191) < v8 )
*((_DWORD *)v17 + 191) = v8;
}
}
return MessagesProfilePage::updateSelectUI((__int64)v5);
}
return result;
}