//
// FRequestProfilePage::onMarkRead from 0xa4f2ec to 0xa4f5b8 (716 bytes)
//
// 3 xrefs:
// > ??> @ 0xdbfe8
// > FRequestProfilePage::init @ 0xa4e884
// > ??> @ 0x15469a0
//
// 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:00:04 +0000
//
__int64 __fastcall FRequestProfilePage::onMarkRead(FRequestProfilePage *this, cocos2d::CCObject *a2)
{
GameLevelManager *v3; // x0
GameLevelManager *v5; // x0
const char *v6; // x1
__int64 StoredOnlineLevels; // x0
unsigned int *v8; // x1
__int64 *v9; // x19
__int64 *v10; // x23
__int64 v11; // x20
int i; // w25
cocos2d::CCDictionary **v13; // x0
__int64 v14; // x28
__int64 v15; // x1
cocos2d::CCString *v16; // x0
size_t v17; // x0
__int64 v18; // x1
cocos2d::CCObject *v19; // x0
GameLevelManager *v20; // x0
__int64 *v21; // x19
__int64 v22; // x3
void (__fastcall *v23)(__int64 *, __int64, __int64); // x24
__int64 v24; // x0
char *CString; // [xsp+68h] [xbp+68h]
GameLevelManager *v26; // [xsp+70h] [xbp+70h] BYREF
__int64 v27; // [xsp+78h] [xbp+78h]
void *v28; // [xsp+80h] [xbp+80h]
__int64 v29[2]; // [xsp+88h] [xbp+88h] BYREF
void *v30; // [xsp+98h] [xbp+98h]
__int64 v31[2]; // [xsp+A0h] [xbp+A0h] BYREF
void *v32; // [xsp+B0h] [xbp+B0h]
if ( !*((_BYTE *)this + 880) )
{
v3 = (GameLevelManager *)*((unsigned __int8 *)this + 704);
if ( !*((_BYTE *)this + 704) )
{
v5 = (GameLevelManager *)GameLevelManager::sharedState(v3);
v6 = (char *)this + 713;
if ( (*((_BYTE *)this + 712) & 1) != 0 )
v6 = *((const char **)this + 91);
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v5, v6);
if ( StoredOnlineLevels )
{
v8 = *(unsigned int **)(StoredOnlineLevels + 56);
v26 = nullptr;
v27 = 0;
v28 = nullptr;
if ( *v8 && (v9 = *((__int64 **)v8 + 2), v10 = &v9[*v8 - 1], v9 <= v10) )
{
v11 = *v9;
for ( i = 0; *v9; v11 = *v9 )
{
if ( *(_BYTE *)(v11 + 725) )
{
if ( *(_BYTE *)(v11 + 724) )
{
v13 = (cocos2d::CCDictionary **)GameLevelManager::sharedState((GameLevelManager *)*(unsigned __int8 *)(v11 + 724));
v14 = GameLevelManager::friendRequestFromAccountID(v13, *(_DWORD *)(v11 + 376));
if ( v14 )
{
v15 = (unsigned __int8)v26 >> 1;
if ( ((unsigned __int8)v26 & 1) != 0 )
v15 = v27;
if ( v15 )
std::string::append((__int64)&v26, &byte_1169BE0, 1u);
v16 = (cocos2d::CCString *)cocos2d::CCString::createWithFormat(
(cocos2d::CCString *)"%i",
(const char *)*(unsigned int *)(v14 + 316));
CString = (char *)cocos2d::CCString::getCString(v16);
v17 = strlen(CString);
std::string::append((__int64)&v26, CString, v17);
*(_BYTE *)(v14 + 376) = 1;
*(_BYTE *)(v11 + 724) = 0;
++i;
}
}
}
if ( v10 < ++v9 )
break;
}
}
else
{
i = 0;
}
v18 = (unsigned __int8)v26 >> 1;
if ( ((unsigned __int8)v26 & 1) != 0 )
v18 = v27;
if ( v18 )
{
v19 = (cocos2d::CCObject *)GameLevelManager::sharedState((GameLevelManager *)(unsigned __int8)v26);
GameLevelManager::readFriendRequests(v19, (unsigned __int8 *)&v26);
}
v20 = FRequestProfilePage::removeFromNewCount(this, i);
v21 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(v20) + 272);
v22 = *v21;
v29[0] = 0;
v29[1] = 0;
v23 = *(void (__fastcall **)(__int64 *, __int64, __int64))(v22 + 464);
v30 = nullptr;
std::string::__init(v29, "Marked as read", 0xEu);
v31[0] = 0;
v31[1] = 0;
v32 = nullptr;
std::string::__init(v31, &byte_11B8890, 0);
v24 = TextAlertPopup::create((char *)v29, 150, (char *)v31, 0.5, 0.6);
v23(v21, v24, 1000);
if ( (v31[0] & 1) != 0 )
operator delete(v32);
if ( (v29[0] & 1) != 0 )
operator delete(v30);
FRequestProfilePage::untoggleAll(this);
FRequestProfilePage::updateSelectUI((GJSelectionStrip **)this);
CustomListView::reloadAll(*(_QWORD *)(*((_QWORD *)this + 98) + 544LL));
if ( ((unsigned __int8)v26 & 1) != 0 )
operator delete(v28);
}
}
}
return _stack_chk_guard;
}