//
// MessagesProfilePage::onUpdate from 0x140337210 to 0x140337310 (256 bytes)
//
// 2 xrefs:
// > MessagesProfilePage::init @ 0x140337035
// > ??> @ 0x1406d5258
//
// 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::onUpdate(MessagesProfilePage *a1, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // rcx
GameLevelManager *v4; // rcx
GameLevelManager *v5; // rcx
void *v6; // [rsp+40h] [rbp+18h]
void *v7; // [rsp+40h] [rbp+18h]
void *v8; // [rsp+40h] [rbp+18h]
v3 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v6 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v6);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v3 = (GameLevelManager *)qword_1406C2EC0;
}
if ( (unsigned int)(GameLevelManager::getTimeLeft(v3, "upd_messages", 5.0) - 1) > 4 )
{
v4 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v7 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v7);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v4 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::makeTimeStamp(v4, "upd_messages");
v5 = (GameLevelManager *)qword_1406C2EC0;
if ( !qword_1406C2EC0 )
{
v8 = operator new(0x3D0u);
qword_1406C2EC0 = sub_140141280((__int64)v8);
(*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);
v5 = (GameLevelManager *)qword_1406C2EC0;
}
GameLevelManager::invalidateMessages(v5, a1->m_sentMessages, 1);
}
}