//
// MessagesProfilePage::loadMessagesFinished from 0x4c10b4 to 0x4c115c (168 bytes)
//
// 1 xrefs:
// > `non-virtual thunk to'MessagesProfilePage::loadMessagesFinished @ 0x4c1160
//
// 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
//
void MessagesProfilePage::loadMessagesFinished(MessagesProfilePage *a1, cocos2d::CCArray *a2, const char *a3)
{
_BOOL4 m_sentMessages; // r6
cocos2d::ccArray *data; // r3
int num; // r4
cocos2d::CCObject **arr; // r2
int v9; // r3
cocos2d::CCObject **v10; // r3
int v11; // r1
int v12; // t1
GameLevelManager *v13; // r5
GJAccountManager *v14; // r0
GJUserScore *v15; // r0
if ( MessagesProfilePage::isCorrect(a1, a3) )
{
MessagesProfilePage::setupCommentsBrowser(a1, a2);
a1->m_loadingCircle->setVisible(a1->m_loadingCircle, 0);
a1->m_errorLabel->setVisible(a1->m_errorLabel, 0);
a1->m_refreshButton->setVisible(a1->m_refreshButton, 1);
m_sentMessages = a1->m_sentMessages;
if ( !a1->m_sentMessages && a2 && cocos2d::CCArray::count(a2) )
{
data = a2->data;
num = data->num;
if ( data->num )
{
arr = data->arr;
v9 = num + 0x3FFFFFFF;
num = m_sentMessages;
v10 = &arr[v9];
while ( arr <= v10 )
{
v12 = (int)*arr++;
v11 = v12;
if ( !v12 )
break;
if ( !*(_BYTE *)(v11 + 292) )
++num;
}
}
v13 = GameLevelManager::sharedState();
v14 = GJAccountManager::sharedState();
v15 = GameLevelManager::userInfoForAccountID(v13, v14->m_accountID - v14->m_unkInt1);
if ( v15 )
{
if ( v15->m_newMsgCount < num )
v15->m_newMsgCount = num;
}
}
}
}