{"type": "func", "start": 4296089940, "end": 4296090088, "name": "GJRequestCell::markAsRead", "pseudocode": "// \n// GJRequestCell::markAsRead from 0x100112154 to 0x1001121e8 (148 bytes)\n// \n// 2 xrefs:\n// > GJRequestCell::onViewFriendRequest @ 0x100112030\n// > GJRequestCell::FLAlert_Clicked @ 0x1001122e8\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 GJRequestCell::markAsRead(GJRequestCell *a1)\n{\n  __int64 v2; // x0\n  GameLevelManager *v3; // x19\n  GJAccountManager *v4; // x0\n  GJUserScore *v5; // x0\n  int m_friendReqCount; // w8\n\n  if ( a1->m_score->m_newFriendRequest )\n  {\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    a1->m_score->m_newFriendRequest = 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_friendReqCount = v5->m_friendReqCount;\n      if ( m_friendReqCount <= 1 )\n        m_friendReqCount = 1;\n      v5->m_friendReqCount = m_friendReqCount - 1;\n    }\n  }\n}", "assembly": "; \n; GJRequestCell::markAsRead from 0x100112154 to 0x1001121e8 (148 bytes)\n; \n; 2 xrefs:\n; > GJRequestCell::onViewFriendRequest @ 0x100112030\n; > GJRequestCell::FLAlert_Clicked @ 0x1001122e8\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, 0x100112154\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x100112158\nADD             X29, SP, #0x10                                         ; +0x8, 0x10011215c\nLDR             X8, [X0,#0x240]                                        ; +0xc, 0x100112160\nLDRB            W8, [X8,#0x2B0]                                        ; +0x10, 0x100112164\nCMP             W8, #1                                                 ; +0x14, 0x100112168\nB.NE            loc_1001121DC                                          ; +0x18, 0x10011216c\nMOV             X19, X0                                                ; +0x1c, 0x100112170\nLDR             X0, [X0,#0x218]                                        ; +0x20, 0x100112174\nLDR             X8, [X0]                                               ; +0x24, 0x100112178\nLDR             X8, [X8,#0x1D0]                                        ; +0x28, 0x10011217c\nMOV             W1, #0x64 ; 'd'                                        ; +0x2c, 0x100112180\nBLR             X8                                                     ; +0x30, 0x100112184\nCBZ             X0, loc_10011219C                                      ; +0x34, 0x100112188\nLDR             X8, [X0]                                               ; +0x38, 0x10011218c\nLDR             X8, [X8,#0x148]                                        ; +0x3c, 0x100112190\nMOV             W1, #0                                                 ; +0x40, 0x100112194\nBLR             X8                                                     ; +0x44, 0x100112198\nLDR             X8, [X19,#0x240]                                       ; +0x48, 0x10011219c\nSTRB            WZR, [X8,#0x2B0]                                       ; +0x4c, 0x1001121a0\nBL              GameLevelManager__sharedState                          ; +0x50, 0x1001121a4\nMOV             X19, X0                                                ; +0x54, 0x1001121a8\nBL              GJAccountManager__sharedState                          ; +0x58, 0x1001121ac\nLDR             W8, [X0,#0x160]                                        ; +0x5c, 0x1001121b0\nLDR             W9, [X0,#0x164]                                        ; +0x60, 0x1001121b4\nSUB             W1, W8, W9                                             ; +0x64, 0x1001121b8\nMOV             X0, X19                                                ; +0x68, 0x1001121bc\nBL              GameLevelManager__userInfoForAccountID                 ; +0x6c, 0x1001121c0\nCBZ             X0, loc_1001121DC                                      ; +0x70, 0x1001121c4\nLDR             W8, [X0,#0x2A8]                                        ; +0x74, 0x1001121c8\nCMP             W8, #1                                                 ; +0x78, 0x1001121cc\nCSINC           W8, W8, WZR, GT                                        ; +0x7c, 0x1001121d0\nSUB             W8, W8, #1                                             ; +0x80, 0x1001121d4\nSTR             W8, [X0,#0x2A8]                                        ; +0x84, 0x1001121d8\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x88, 0x1001121dc\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0x8c, 0x1001121e0\nRET                                                                    ; +0x90, 0x1001121e4", "xrefs": ["GJRequestCell::onViewFriendRequest @ 0x100112030", "GJRequestCell::FLAlert_Clicked @ 0x1001122e8"], "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"}