//
// FRequestProfilePage::onMarkRead from 0x1402116b0 to 0x1402119e3 (819 bytes)
//
// 2 xrefs:
// > FRequestProfilePage::init @ 0x14020fd1b
// > ??> @ 0x14091b518
//
// This function is hookable on this platform (idp: pc, 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 11:28:19 +0000
//
// Hidden C++ exception states: #wind=5
void __fastcall FRequestProfilePage::onMarkRead(__int64 a1)
{
_QWORD *v2; // rbx
__int64 v3; // rcx
__int64 StoredOnlineLevels; // rax
__int64 v5; // rcx
int v6; // r14d
unsigned int *v7; // rdi
__int64 v8; // rax
__int64 *v9; // rdi
__int64 *v10; // r15
__int64 v11; // rbx
__int64 v12; // rcx
struct cocos2d::CCObject *v13; // rsi
cocos2d::CCString *v14; // rax
char *CString; // rax
size_t v16; // r8
__int64 v17; // rcx
__int64 v18; // rcx
__int64 *v19; // rdi
__int64 v20; // rbx
__int64 v21; // rdx
__int64 v22; // r8
__int64 v23; // rax
__int64 v24; // rdx
void *v25; // [rsp+30h] [rbp-39h]
void *v26; // [rsp+30h] [rbp-39h]
void *v27; // [rsp+30h] [rbp-39h]
char v28[16]; // [rsp+38h] [rbp-31h] BYREF
__int64 v29; // [rsp+48h] [rbp-21h]
__int64 v30; // [rsp+50h] [rbp-19h]
__int128 v31; // [rsp+58h] [rbp-11h] BYREF
__int64 v32; // [rsp+68h] [rbp-1h]
__int64 v33; // [rsp+70h] [rbp+7h]
__int128 Src; // [rsp+78h] [rbp+Fh] BYREF
__int64 v35; // [rsp+88h] [rbp+1Fh]
__int64 v36; // [rsp+90h] [rbp+27h]
if ( !*(_BYTE *)(a1 + 896) && !*(_BYTE *)(a1 + 704) )
{
v2 = (_QWORD *)(a1 + 712);
if ( *(_QWORD *)(a1 + 736) > 0xFu )
v2 = (_QWORD *)*v2;
v3 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v25 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v25);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v3 = *(_QWORD *)&qword_14090BFB0;
}
StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v3, v2);
if ( StoredOnlineLevels )
{
Src = 0;
v35 = 0;
v36 = 15;
LOBYTE(Src) = 0;
v6 = 0;
v7 = *(unsigned int **)(StoredOnlineLevels + 56);
v8 = *v7;
if ( (_DWORD)v8 )
{
v9 = *((__int64 **)v7 + 2);
v10 = &v9[v8 - 1];
if ( v9 <= v10 )
{
do
{
v11 = *v9;
if ( !*v9 )
break;
if ( *(_BYTE *)(v11 + 797) && *(_BYTE *)(v11 + 796) )
{
v12 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v26 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v26);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v12 = *(_QWORD *)&qword_14090BFB0;
}
v13 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(v12 + 1240), *(int *)(v11 + 392));
if ( v13 )
{
if ( v35 )
sub_140044D80(&Src, byte_14070ECF8, 1u);
v14 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, *((unsigned int *)v13 + 80));
CString = (char *)cocos2d::CCString::getCString(v14);
v16 = -1;
do
++v16;
while ( CString[v16] );
sub_140044D80(&Src, CString, v16);
*((_BYTE *)v13 + 400) = 1;
*(_BYTE *)(v11 + 796) = 0;
++v6;
}
}
++v9;
}
while ( v9 <= v10 );
if ( v35 )
{
v17 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v27 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v27);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v17 = *(_QWORD *)&qword_14090BFB0;
}
GameLevelManager::readFriendRequests(v17, &Src);
}
}
}
FRequestProfilePage::removeFromNewCount(v5, v6);
v19 = *(__int64 **)(cocos2d::CCDirector::sharedDirector(v18) + 272);
v31 = 0;
v32 = 0;
v33 = 15;
LOBYTE(v31) = 0;
v28[15] = 0;
v29 = 14;
v30 = 15;
strcpy(v28, "Marked as read");
v20 = *v19;
v23 = TextAlertPopup::create(v28, v21, v22, 150, &v31);
(*(void (__fastcall **)(__int64 *, __int64, __int64))(v20 + 456))(v19, v23, 1000);
FRequestProfilePage::untoggleAll(a1);
FRequestProfilePage::updateSelectUI(a1, v24);
CustomListView::reloadAll(*(_QWORD *)(*(_QWORD *)(a1 + 800) + 544LL));
sub_14003D310((__int64)&Src);
}
}
}