{"type": "func", "start": 4297426768, "end": 4297426907, "name": "GJMessageCell::markAsRead", "pseudocode": "// \n// GJMessageCell::markAsRead from 0x100258750 to 0x1002587db (139 bytes)\n// \n// 0 xrefs:\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; // rax\n  __int64 v2; // rax\n  GameLevelManager *v3; // rbx\n  GJAccountManager *v4; // rax\n  GJUserScore *v5; // rax\n  int m_newMsgCount; // edx\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 = 1;\n      if ( v5->m_newMsgCount >= 2 )\n        m_newMsgCount = v5->m_newMsgCount;\n      v5->m_newMsgCount = m_newMsgCount - 1;\n    }\n  }\n}", "assembly": "; \n; GJMessageCell::markAsRead from 0x100258750 to 0x1002587db (139 bytes)\n; \n; 0 xrefs:\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\npush    rbp                                                            ; +0x0, 0x100258750\nmov     rbp, rsp                                                       ; +0x1, 0x100258751\npush    rbx                                                            ; +0x4, 0x100258754\npush    rax                                                            ; +0x5, 0x100258755\nmov     rax, [rdi+240h]                                                ; +0x6, 0x100258756\ncmp     byte ptr [rax+1A8h], 0                                         ; +0xd, 0x10025875d\njnz     short loc_1002587D4                                            ; +0x14, 0x100258764\nmov     byte ptr [rax+1A8h], 1                                         ; +0x16, 0x100258766\nmov     rdi, [rdi+218h]                                                ; +0x1d, 0x10025876d\nmov     rax, [rdi]                                                     ; +0x24, 0x100258774\nmov     esi, 64h ; 'd'                                                 ; +0x27, 0x100258777\ncall    qword ptr [rax+1D0h]                                           ; +0x2c, 0x10025877c\ntest    rax, rax                                                       ; +0x32, 0x100258782\njz      short loc_100258795                                            ; +0x35, 0x100258785\nmov     rcx, [rax]                                                     ; +0x37, 0x100258787\nmov     rdi, rax                                                       ; +0x3a, 0x10025878a\nxor     esi, esi                                                       ; +0x3d, 0x10025878d\ncall    qword ptr [rcx+148h]                                           ; +0x3f, 0x10025878f\ncall    GameLevelManager__sharedState                                  ; +0x45, 0x100258795\nmov     rbx, rax                                                       ; +0x4a, 0x10025879a\ncall    GJAccountManager__sharedState                                  ; +0x4d, 0x10025879d\nmov     esi, [rax+160h]                                                ; +0x52, 0x1002587a2\nsub     esi, [rax+164h]                                                ; +0x58, 0x1002587a8\nmov     rdi, rbx                                                       ; +0x5e, 0x1002587ae\ncall    GameLevelManager__userInfoForAccountID                         ; +0x61, 0x1002587b1\ntest    rax, rax                                                       ; +0x66, 0x1002587b6\njz      short loc_1002587D4                                            ; +0x69, 0x1002587b9\nmov     ecx, [rax+2A4h]                                                ; +0x6b, 0x1002587bb\ncmp     ecx, 2                                                         ; +0x71, 0x1002587c1\nmov     edx, 1                                                         ; +0x74, 0x1002587c4\ncmovge  edx, ecx                                                       ; +0x79, 0x1002587c9\ndec     edx                                                            ; +0x7c, 0x1002587cc\nmov     [rax+2A4h], edx                                                ; +0x7e, 0x1002587ce\nadd     rsp, 8                                                         ; +0x84, 0x1002587d4\npop     rbx                                                            ; +0x88, 0x1002587d8\npop     rbp                                                            ; +0x89, 0x1002587d9\nretn                                                                   ; +0x8a, 0x1002587da", "xrefs": [], "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"}