{"type": "func", "start": 4296091664, "end": 4296091804, "name": "GJMessageCell::markAsRead", "pseudocode": "// \n// GJMessageCell::markAsRead from 0x100112810 to 0x10011289c (140 bytes)\n// \n// 2 xrefs:\n// > GJMessageCell::onViewMessage @ 0x1001126a8\n// > GJMessageCell::FLAlert_Clicked @ 0x100112984\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 __fastcall GJMessageCell::markAsRead(GJMessageCell *a1)\n{\n  GJUserMessage *m_message; // x8\n  __int64 v2; // x0\n  GameLevelManager *v3; // x19\n  GJAccountManager *v4; // x0\n  GJUserScore *v5; // x0\n  int m_newMsgCount; // w8\n\n  m_message = a1->m_message;\n  if ( !m_message->m_read )\n  {\n    m_message->m_read = 1;\n    v2 = ((__int64 (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->getChildByTag)(a1->m_mainLayer, 100);\n    if ( v2 )\n      (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v2 + 328LL))(v2, 0);\n    v3 = GameLevelManager::sharedState();\n    v4 = GJAccountManager::sharedState();\n    v5 = GameLevelManager::userInfoForAccountID(v3, v4->m_accountID - v4->m_unkInt1);\n    if ( v5 )\n    {\n      m_newMsgCount = v5->m_newMsgCount;\n      if ( m_newMsgCount <= 1 )\n        m_newMsgCount = 1;\n      v5->m_newMsgCount = m_newMsgCount - 1;\n    }\n  }\n}", "assembly": "; \n; GJMessageCell::markAsRead from 0x100112810 to 0x10011289c (140 bytes)\n; \n; 2 xrefs:\n; > GJMessageCell::onViewMessage @ 0x1001126a8\n; > GJMessageCell::FLAlert_Clicked @ 0x100112984\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\nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x100112810\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x100112814\nADD             X29, SP, #0x10                                         ; +0x8, 0x100112818\nLDR             X8, [X0,#0x240]                                        ; +0xc, 0x10011281c\nLDRB            W9, [X8,#0x1A8]                                        ; +0x10, 0x100112820\nTBNZ            W9, #0, loc_100112890                                  ; +0x14, 0x100112824\nMOV             W9, #1                                                 ; +0x18, 0x100112828\nSTRB            W9, [X8,#0x1A8]                                        ; +0x1c, 0x10011282c\nLDR             X0, [X0,#0x218]                                        ; +0x20, 0x100112830\nLDR             X8, [X0]                                               ; +0x24, 0x100112834\nLDR             X8, [X8,#0x1D0]                                        ; +0x28, 0x100112838\nMOV             W1, #0x64 ; 'd'                                        ; +0x2c, 0x10011283c\nBLR             X8                                                     ; +0x30, 0x100112840\nCBZ             X0, loc_100112858                                      ; +0x34, 0x100112844\nLDR             X8, [X0]                                               ; +0x38, 0x100112848\nLDR             X8, [X8,#0x148]                                        ; +0x3c, 0x10011284c\nMOV             W1, #0                                                 ; +0x40, 0x100112850\nBLR             X8                                                     ; +0x44, 0x100112854\nBL              GameLevelManager__sharedState                          ; +0x48, 0x100112858\nMOV             X19, X0                                                ; +0x4c, 0x10011285c\nBL              GJAccountManager__sharedState                          ; +0x50, 0x100112860\nLDR             W8, [X0,#0x160]                                        ; +0x54, 0x100112864\nLDR             W9, [X0,#0x164]                                        ; +0x58, 0x100112868\nSUB             W1, W8, W9                                             ; +0x5c, 0x10011286c\nMOV             X0, X19                                                ; +0x60, 0x100112870\nBL              GameLevelManager__userInfoForAccountID                 ; +0x64, 0x100112874\nCBZ             X0, loc_100112890                                      ; +0x68, 0x100112878\nLDR             W8, [X0,#0x2A4]                                        ; +0x6c, 0x10011287c\nCMP             W8, #1                                                 ; +0x70, 0x100112880\nCSINC           W8, W8, WZR, GT                                        ; +0x74, 0x100112884\nSUB             W8, W8, #1                                             ; +0x78, 0x100112888\nSTR             W8, [X0,#0x2A4]                                        ; +0x7c, 0x10011288c\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x80, 0x100112890\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x84, 0x100112894\nRET                                                                    ; +0x88, 0x100112898", "xrefs": ["GJMessageCell::onViewMessage @ 0x1001126a8", "GJMessageCell::FLAlert_Clicked @ 0x100112984"], "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"}