//
// MessageThreadsPage::onRefresh from 0xc78938 to 0xc78ad8 (416 bytes)
//
// 3 xrefs:
// > ??> @ 0xd3ff0
// > MessageThreadsPage::init @ 0xc76010
// > ??> @ 0x15464c0
//
// This function is hookable on this platform (idp: arm, 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 13:05:34 +0000
//
__int64 __fastcall MessageThreadsPage::onRefresh(MessageThreadsPage *this, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // x0
cocos2d::CCDirector *v4; // x0
__int64 *v5; // x20
__int64 v6; // x3
void (__fastcall *v7)(__int64 *, __int64, __int64); // x23
__int64 v8; // x0
GameLevelManager *v10; // x0
__int64 v11[2]; // [xsp+48h] [xbp+48h] BYREF
void *v12; // [xsp+58h] [xbp+58h]
__int64 v13[2]; // [xsp+60h] [xbp+60h] BYREF
void *v14; // [xsp+70h] [xbp+70h]
v3 = (GameLevelManager *)GameLevelManager::sharedState(_stack_chk_guard);
v4 = (cocos2d::CCDirector *)((unsigned int)GameLevelManager::getTimeLeft(v3, "threadInboxUpdate", 5.0) - 1);
if ( (unsigned int)v4 <= 4 )
{
v5 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(v4) + 272);
v6 = *v5;
v11[0] = 0;
v11[1] = 0;
v7 = *(void (__fastcall **)(__int64 *, __int64, __int64))(v6 + 464);
v12 = nullptr;
std::string::__init(v11, "Already up to date", 0x12u);
v13[0] = 0;
v13[1] = 0;
v14 = nullptr;
std::string::__init(v13, &byte_11B8890, 0);
v8 = TextAlertPopup::create((char *)v11, 150, (char *)v13, 0.5, 0.6);
v7(v5, v8, 1000);
if ( (v13[0] & 1) != 0 )
{
operator delete(v14);
if ( (v11[0] & 1) == 0 )
return _stack_chk_guard;
}
else if ( (v11[0] & 1) == 0 )
{
return _stack_chk_guard;
}
operator delete(v12);
return _stack_chk_guard;
}
v10 = (GameLevelManager *)GameLevelManager::sharedState(v4);
GameLevelManager::makeTimeStamp(v10, "threadInboxUpdate");
if ( (unsigned __int8)MessageThreadsPage::syncSearchFromBox(this) )
MessageThreadsPage::loadPage(this, 0, 0);
else
MessageThreadsPage::loadPage(this, *((_DWORD *)this + 208), 0);
return _stack_chk_guard;
}