//
// GJMessageCell::markAsRead from 0x14015d470 to 0x14015d53b (203 bytes)
//
// 3 xrefs:
// > GJMessageCell::onViewMessage @ 0x14015d3db
// > GJMessageCell::FLAlert_Clicked @ 0x14015d7a7
// > ??> @ 0x140917bac
//
// 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:27:23 +0000
//
// Hidden C++ exception states: #wind=1
struct cocos2d::CCObject *__fastcall GJMessageCell::markAsRead(__int64 a1)
{
struct cocos2d::CCObject *result; // rax
__int64 v2; // rax
__int64 v3; // rcx
__int64 v4; // rax
int v5; // ebx
__int64 v6; // rcx
int v7; // ecx
void *v8; // [rsp+30h] [rbp+8h]
result = *(struct cocos2d::CCObject **)(a1 + 584);
if ( !*((_BYTE *)result + 464) )
{
*((_BYTE *)result + 464) = 1;
v2 = (*(__int64 (__fastcall **)(_QWORD, __int64))(**(_QWORD **)(a1 + 544) + 472LL))(*(_QWORD *)(a1 + 544), 100);
if ( v2 )
(*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v2 + 336LL))(v2, 0);
v4 = GJAccountManager::sharedState(v3);
v5 = *(_DWORD *)(v4 + 360) - *(_DWORD *)(v4 + 364);
v6 = *(_QWORD *)&qword_14090BFB0;
if ( !*(_QWORD *)&qword_14090BFB0 )
{
v8 = operator new(0x690u);
*(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager(v8);
(*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);
v6 = *(_QWORD *)&qword_14090BFB0;
}
result = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(v6 + 1232), v5);
if ( result )
{
v7 = *((_DWORD *)result + 191) - 1;
if ( v7 < 0 )
v7 = 0;
*((_DWORD *)result + 191) = v7;
}
}
return result;
}