{"type": "func", "start": 3383112, "end": 3383200, "name": "GJMessageCell::markAsRead", "pseudocode": "// \n// GJMessageCell::markAsRead from 0x339f48 to 0x339fa0 (88 bytes)\n// \n// 2 xrefs:\n// > GJMessageCell::onViewMessage @ 0x339faa\n// > GJMessageCell::FLAlert_Clicked @ 0x33a000\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid GJMessageCell::markAsRead(GJMessageCell *a1)\n{\n  GJUserMessage *m_message; // r3\n  _BOOL4 m_read; // r4\n  cocos2d::CCLayer *m_mainLayer; // r0\n  int v4; // r0\n  GameLevelManager *v5; // r4\n  GJAccountManager *v6; // r0\n  GJUserScore *v7; // r0\n\n  m_message = a1->m_message;\n  m_read = m_message->m_read;\n  if ( !m_message->m_read )\n  {\n    m_mainLayer = a1->m_mainLayer;\n    m_message->m_read = 1;\n    v4 = (int)m_mainLayer->getChildByTag(m_mainLayer, 100);\n    if ( v4 )\n      (*(void (__fastcall **)(int, _BOOL4))(*(_DWORD *)v4 + 164))(v4, m_read);\n    v5 = GameLevelManager::sharedState();\n    v6 = GJAccountManager::sharedState();\n    v7 = GameLevelManager::userInfoForAccountID(v5, v6->m_accountID - v6->m_unkInt1);\n    if ( v7 )\n      v7->m_newMsgCount = (v7->m_newMsgCount - 1) & ~((v7->m_newMsgCount - 1) >> 31);\n  }\n}", "assembly": "; \n; GJMessageCell::markAsRead from 0x339f48 to 0x339fa0 (88 bytes)\n; \n; 2 xrefs:\n; > GJMessageCell::onViewMessage @ 0x339faa\n; > GJMessageCell::FLAlert_Clicked @ 0x33a000\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nLDR.W           R3, [R0,#0x1A8]                                        ; +0x0, 0x339f48\nPUSH            {R4,LR}                                                ; +0x4, 0x339f4c\nLDRB.W          R4, [R3,#0x124]                                        ; +0x6, 0x339f4e\nCBNZ            R4, locret_339F9E                                      ; +0xa, 0x339f52\nLDR.W           R0, [R0,#0x194]                                        ; +0xc, 0x339f54\nMOVS            R2, #1                                                 ; +0x10, 0x339f58\nSTRB.W          R2, [R3,#0x124]                                        ; +0x12, 0x339f5a\nMOVS            R1, #0x64 ; 'd'                                        ; +0x16, 0x339f5e\nLDR             R3, [R0]                                               ; +0x18, 0x339f60\nLDR.W           R3, [R3,#0xE8]                                         ; +0x1a, 0x339f62\nBLX             R3                                                     ; +0x1e, 0x339f66\nCBZ             R0, loc_339F74                                         ; +0x20, 0x339f68\nLDR             R3, [R0]                                               ; +0x22, 0x339f6a\nMOV             R1, R4                                                 ; +0x24, 0x339f6c\nLDR.W           R3, [R3,#0xA4]                                         ; +0x26, 0x339f6e\nBLX             R3                                                     ; +0x2a, 0x339f72\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x2c, 0x339f74\nMOV             R4, R0                                                 ; +0x30, 0x339f78\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0x32, 0x339f7a\nLDR.W           R1, [R0,#0x110]                                        ; +0x36, 0x339f7e\nLDR.W           R3, [R0,#0x114]                                        ; +0x3a, 0x339f82\nMOV             R0, R4; this                                           ; +0x3e, 0x339f86\nSUBS            R1, R1, R3; int                                        ; +0x40, 0x339f88\nBL              _ZN16GameLevelManager20userInfoForAccountIDEi; GameLevelManager::userInfoForAccountID(int) ; +0x42, 0x339f8a\nCBZ             R0, locret_339F9E                                      ; +0x46, 0x339f8e\nLDR.W           R3, [R0,#0x1B8]                                        ; +0x48, 0x339f90\nSUBS            R3, #1                                                 ; +0x4c, 0x339f94\nBIC.W           R3, R3, R3,ASR#31                                      ; +0x4e, 0x339f96\nSTR.W           R3, [R0,#0x1B8]                                        ; +0x52, 0x339f9a\nPOP             {R4,PC}                                                ; +0x56, 0x339f9e", "xrefs": ["GJMessageCell::onViewMessage @ 0x339faa", "GJMessageCell::FLAlert_Clicked @ 0x33a000"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}