//
// MessageThreadsPage::onMarkRead from 0xc73418 to 0xc73574 (348 bytes)
//
// 3 xrefs:
// > ??> @ 0x5a838
// > MessageThreadsPage::init @ 0xc761cc
// > ??> @ 0x1542168
//
// 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:31 +0000
//
__int64 __fastcall MessageThreadsPage::onMarkRead(MessageThreadsPage *this, cocos2d::CCObject *a2)
{
cocos2d::CCArray *v3; // x0
signed int v4; // w19
GameLevelManager *v5; // x0
__int64 v6; // x20
__int64 v7; // x1
cocos2d::CCString *v8; // x0
char *CString; // x0
cocos2d::CCObject *v10; // x0
GameLevelManager *updated; // x0
__int64 v12; // x0
char v13; // w19
__int64 v15; // [xsp+50h] [xbp+50h] BYREF
__int64 v16; // [xsp+58h] [xbp+58h]
void *v17; // [xsp+60h] [xbp+60h]
if ( (unsigned int)MessageThreadsPage::selectedCount(this) )
{
v3 = *((cocos2d::CCArray **)this + 100);
if ( v3 )
{
v15 = 0;
v4 = 0;
v16 = 0;
v17 = nullptr;
while ( 1 )
{
v5 = (GameLevelManager *)cocos2d::CCArray::count(v3);
if ( v4 >= (int)v5 )
break;
v6 = cocos2d::CCArray::objectAtIndex(*((cocos2d::CCArray **)this + 100), v4);
if ( *(_BYTE *)(v6 + 304) )
{
v7 = (unsigned __int8)v15 >> 1;
if ( (v15 & 1) != 0 )
v7 = v16;
if ( v7 )
std::string::append((__int64)&v15, &byte_1169BE0);
v8 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)*(unsigned int *)(v6 + 56));
CString = (char *)cocos2d::CCString::getCString(v8);
std::string::append((__int64)&v15, CString);
}
v3 = *((cocos2d::CCArray **)this + 100);
++v4;
}
v10 = (cocos2d::CCObject *)GameLevelManager::sharedState(v5);
updated = (GameLevelManager *)(unsigned __int8)GameLevelManager::updateThread(v10, nullptr, 3, (char *)&v15);
if ( !(_BYTE)updated )
{
if ( (v15 & 1) == 0 )
return _stack_chk_guard;
goto LABEL_14;
}
v12 = GameLevelManager::sharedState(updated);
v13 = v15;
*(_QWORD *)(v12 + 1264) = (char *)this + 664;
if ( (v13 & 1) != 0 )
LABEL_14:
operator delete(v17);
}
}
return _stack_chk_guard;
}