//
// FRequestProfilePage::onMarkRead from 0x5f3048 to 0x5f320c (452 bytes)
//
// 0 xrefs:
//
// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!
//
// 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:54:29 +0000
//
int __fastcall FRequestProfilePage::onMarkRead(int this, cocos2d::CCObject *a2)
{
int v2; // r5
GameLevelManager *v3; // r0
const char *v4; // r1
int *v5; // r3
int v6; // r4
int *v7; // r6
int v8; // r3
int v9; // r7
int v10; // t1
int v11; // r3
GameLevelManager *v12; // r0
GameManager *v13; // r0
int v14; // r8
void (__fastcall *v15)(int, cocos2d::CCNode *, int); // r9
cocos2d::CCNode *v16; // r0
cocos2d::CCDictionary **v17; // r0
int v18; // r8
int v19; // r3
cocos2d::CCString *v20; // r0
size_t v21; // r0
int *v22; // [sp+Ch] [bp-38h]
const char *CString; // [sp+14h] [bp-30h]
int v24; // [sp+18h] [bp-2Ch] BYREF
int v25; // [sp+1Ch] [bp-28h]
int v26; // [sp+20h] [bp-24h]
int v27[3]; // [sp+24h] [bp-20h] BYREF
int v28[3]; // [sp+30h] [bp-14h] BYREF
v2 = this;
if ( !*(_BYTE *)(this + 628) && !*(_BYTE *)(this + 540) )
{
v3 = (GameLevelManager *)GameLevelManager::sharedState((GameLevelManager *)this);
v4 = (*(_BYTE *)(v2 + 544) & 1) != 0 ? *(const char **)(v2 + 552) : (const char *)(v2 + 545);
this = GameLevelManager::getStoredOnlineLevels(v3, v4);
if ( this )
{
v5 = *(int **)(this + 52);
v24 = 0;
v25 = 0;
v26 = 0;
v6 = *v5;
if ( *v5 )
{
v7 = (int *)v5[3];
v8 = v6 + 0x3FFFFFFF;
v6 = 0;
v22 = &v7[v8];
while ( v7 <= v22 )
{
v10 = *v7++;
v9 = v10;
if ( !v10 )
break;
if ( *(_BYTE *)(v9 + 557) )
{
if ( *(_BYTE *)(v9 + 556) )
{
v17 = (cocos2d::CCDictionary **)GameLevelManager::sharedState((GameLevelManager *)this);
this = GameLevelManager::friendRequestFromAccountID(v17, *(_DWORD *)(v9 + 296));
v18 = this;
if ( this )
{
if ( (v24 & 1) != 0 )
v19 = v25;
else
v19 = (int)(unsigned __int8)v24 >> 1;
if ( v19 )
std::string::append(&v24, ",", 1u);
v20 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
*(const char **)(v18 + 264));
CString = (const char *)cocos2d::CCString::getCString(v20);
v21 = strlen(CString);
this = (int)std::string::append(&v24, CString, v21);
++v6;
*(_BYTE *)(v18 + 300) = 1;
*(_BYTE *)(v9 + 556) = 0;
}
}
}
}
}
if ( (v24 & 1) != 0 )
v11 = v25;
else
v11 = (int)(unsigned __int8)v24 >> 1;
if ( v11 )
{
v13 = (GameManager *)GameLevelManager::sharedState((GameLevelManager *)this);
GameLevelManager::readFriendRequests(v13, (unsigned __int8 *)&v24);
}
v12 = FRequestProfilePage::removeFromNewCount((GameLevelManager *)v2, v6);
v14 = *(_DWORD *)(cocos2d::CCDirector::sharedDirector(v12) + 220);
v15 = *(void (__fastcall **)(int, cocos2d::CCNode *, int))(*(_DWORD *)v14 + 232);
memset(v27, 0, sizeof(v27));
std::string::__init(v27, "Marked as read", 0xEu);
memset(v28, 0, sizeof(v28));
std::string::__init(v28, &unk_B6B226, 0);
v16 = TextAlertPopup::create((int)v27, (cocos2d::CCDelayTime *)0x3F000000, 0.6, 150, (int)v28);
v15(v14, v16, 1000);
std::string::~string((int)v28);
std::string::~string((int)v27);
FRequestProfilePage::untoggleAll((FRequestProfilePage *)v2);
FRequestProfilePage::updateSelectUI((GJSelectionStrip **)v2);
CustomListView::reloadAll(*(CCMenuItemToggler **)(*(_DWORD *)(v2 + 580) + 440));
return std::string::~string((int)&v24);
}
}
return this;
}