{"type": "func", "start": 4297426176, "end": 4297426388, "name": "GJMessageCell::onViewMessage", "pseudocode": "// \n// GJMessageCell::onViewMessage from 0x100258500 to 0x1002585d4 (212 bytes)\n// \n// 1 xrefs:\n// > GJMessageCell::loadFromMessage @ 0x10024cbbc\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::onViewMessage(GJMessageCell *a1, cocos2d::CCObject *a2)\n{\n  GJUserMessage *m_message; // rax\n  __int64 v3; // rax\n  GameLevelManager *v4; // r14\n  GJAccountManager *v5; // rax\n  GJUserScore *v6; // rax\n  int m_newMsgCount; // edx\n  GameLevelManager *v8; // rax\n  GJUserMessage *StoredUserMessage; // rax\n  GJMessagePopup *v10; // rax\n\n  m_message = a1->m_message;\n  if ( m_message )\n  {\n    if ( !m_message->m_read )\n    {\n      m_message->m_read = 1;\n      v3 = ((__int64 (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->getChildByTag)(a1->m_mainLayer, 100);\n      if ( v3 )\n        (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v3 + 328LL))(v3, 0);\n      v4 = GameLevelManager::sharedState();\n      v5 = GJAccountManager::sharedState();\n      v6 = GameLevelManager::userInfoForAccountID(v4, v5->m_accountID - v5->m_unkInt1);\n      if ( v6 )\n      {\n        m_newMsgCount = 1;\n        if ( v6->m_newMsgCount >= 2 )\n          m_newMsgCount = v6->m_newMsgCount;\n        v6->m_newMsgCount = m_newMsgCount - 1;\n      }\n    }\n    v8 = GameLevelManager::sharedState();\n    StoredUserMessage = GameLevelManager::getStoredUserMessage(v8, a1->m_message->m_messageID);\n    if ( !StoredUserMessage )\n      StoredUserMessage = a1->m_message;\n    v10 = GJMessagePopup::create(StoredUserMessage);\n    ((void (__fastcall *)(GJMessagePopup *))v10->show)(v10);\n  }\n}", "assembly": "; \n; GJMessageCell::onViewMessage from 0x100258500 to 0x1002585d4 (212 bytes)\n; \n; 1 xrefs:\n; > GJMessageCell::loadFromMessage @ 0x10024cbbc\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, 0x100258500\nmov     rbp, rsp                                                       ; +0x1, 0x100258501\npush    r14                                                            ; +0x4, 0x100258504\npush    rbx                                                            ; +0x6, 0x100258506\nmov     rax, [rdi+240h]                                                ; +0x7, 0x100258507\ntest    rax, rax                                                       ; +0xe, 0x10025850e\njz      loc_1002585CF                                                  ; +0x11, 0x100258511\nmov     rbx, rdi                                                       ; +0x17, 0x100258517\ncmp     byte ptr [rax+1A8h], 0                                         ; +0x1a, 0x10025851a\njnz     short loc_100258591                                            ; +0x21, 0x100258521\nmov     byte ptr [rax+1A8h], 1                                         ; +0x23, 0x100258523\nmov     rdi, [rbx+218h]                                                ; +0x2a, 0x10025852a\nmov     rax, [rdi]                                                     ; +0x31, 0x100258531\nmov     esi, 64h ; 'd'                                                 ; +0x34, 0x100258534\ncall    qword ptr [rax+1D0h]                                           ; +0x39, 0x100258539\ntest    rax, rax                                                       ; +0x3f, 0x10025853f\njz      short loc_100258552                                            ; +0x42, 0x100258542\nmov     rcx, [rax]                                                     ; +0x44, 0x100258544\nmov     rdi, rax                                                       ; +0x47, 0x100258547\nxor     esi, esi                                                       ; +0x4a, 0x10025854a\ncall    qword ptr [rcx+148h]                                           ; +0x4c, 0x10025854c\ncall    GameLevelManager__sharedState                                  ; +0x52, 0x100258552\nmov     r14, rax                                                       ; +0x57, 0x100258557\ncall    GJAccountManager__sharedState                                  ; +0x5a, 0x10025855a\nmov     esi, [rax+160h]                                                ; +0x5f, 0x10025855f\nsub     esi, [rax+164h]                                                ; +0x65, 0x100258565\nmov     rdi, r14                                                       ; +0x6b, 0x10025856b\ncall    GameLevelManager__userInfoForAccountID                         ; +0x6e, 0x10025856e\ntest    rax, rax                                                       ; +0x73, 0x100258573\njz      short loc_100258591                                            ; +0x76, 0x100258576\nmov     ecx, [rax+2A4h]                                                ; +0x78, 0x100258578\ncmp     ecx, 2                                                         ; +0x7e, 0x10025857e\nmov     edx, 1                                                         ; +0x81, 0x100258581\ncmovge  edx, ecx                                                       ; +0x86, 0x100258586\ndec     edx                                                            ; +0x89, 0x100258589\nmov     [rax+2A4h], edx                                                ; +0x8b, 0x10025858b\ncall    GameLevelManager__sharedState                                  ; +0x91, 0x100258591\nmov     rcx, [rbx+240h]                                                ; +0x96, 0x100258596\nmov     esi, [rcx+13Ch]                                                ; +0x9d, 0x10025859d\nmov     rdi, rax                                                       ; +0xa3, 0x1002585a3\ncall    GameLevelManager__getStoredUserMessage                         ; +0xa6, 0x1002585a6\ntest    rax, rax                                                       ; +0xab, 0x1002585ab\njnz     short loc_1002585B7                                            ; +0xae, 0x1002585ae\nmov     rax, [rbx+240h]                                                ; +0xb0, 0x1002585b0\nmov     rdi, rax                                                       ; +0xb7, 0x1002585b7\ncall    GJMessagePopup__create                                         ; +0xba, 0x1002585ba\nmov     rcx, [rax]                                                     ; +0xbf, 0x1002585bf\nmov     rdi, rax                                                       ; +0xc2, 0x1002585c2\npop     rbx                                                            ; +0xc5, 0x1002585c5\npop     r14                                                            ; +0xc6, 0x1002585c6\npop     rbp                                                            ; +0xc8, 0x1002585c8\njmp     qword ptr [rcx+508h]                                           ; +0xc9, 0x1002585c9\npop     rbx                                                            ; +0xcf, 0x1002585cf\npop     r14                                                            ; +0xd0, 0x1002585d0\npop     rbp                                                            ; +0xd2, 0x1002585d2\nretn                                                                   ; +0xd3, 0x1002585d3", "xrefs": ["GJMessageCell::loadFromMessage @ 0x10024cbbc"], "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"}