{"type": "func", "start": 6412432, "end": 6412816, "name": "GJMessageCell::FLAlert_Clicked", "pseudocode": "// \n// GJMessageCell::FLAlert_Clicked from 0x61d890 to 0x61da10 (384 bytes)\n// \n// 3 xrefs:\n// > `non-virtual thunk to'GJMessageCell::FLAlert_Clicked @ 0x61da14\n// > <???> @ 0xba2e8\n// > <???> @ 0x11514a0\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::FLAlert_Clicked(GJMessageCell *a1, FLAlertLayer *a2, bool a3)\n{\n  GameLevelManager *v4; // x0\n  UploadActionPopup *m_popup; // x0\n  UploadActionPopup *v6; // x0\n  UploadPopupDelegate_vtbl *v7; // x3\n  unsigned int *v8; // x2\n  int onClosePopup; // w0\n  UploadPopupDelegate v10; // [xsp+40h] [xbp+40h] BYREF\n  std::string v11; // 0:x2.8\n\n  if ( a3 && a2->getTag(a2) == 1 )\n  {\n    if ( a1->m_message )\n    {\n      GJMessageCell::markAsRead(a1);\n      v4 = GameLevelManager::sharedState();\n      if ( GameLevelManager::deleteUserMessages(v4, a1->m_message, nullptr, a1->m_message->m_outgoing) )\n      {\n        GameLevelManager::sharedState()->m_uploadActionDelegate = &a1->UploadActionDelegate;\n        m_popup = a1->m_popup;\n        if ( m_popup )\n          m_popup->m_delegate = nullptr;\n        sub_D153B8((int)&v10, \"Deleting message...\");\n        v6 = (UploadActionPopup *)UploadActionPopup::create((UploadActionPopup *)&a1->UploadPopupDelegate, &v10, v11);\n        a1->m_popup = v6;\n        v7 = v10.__vftable - 3;\n        if ( (__int64 *)&v10.__vftable[-3] != &qword_124B6B0 )\n        {\n          if ( &pthread_create )\n          {\n            v8 = (unsigned int *)&v10.__vftable[-1];\n            do\n              onClosePopup = __ldaxr(v8);\n            while ( __stlxr(onClosePopup - 1, v8) );\n          }\n          else\n          {\n            onClosePopup = (int)v10.__vftable[-1].onClosePopup;\n            LODWORD(v10.__vftable[-1].onClosePopup) = onClosePopup - 1;\n          }\n          if ( onClosePopup <= 0 )\n            operator delete(v7);\n          v6 = a1->m_popup;\n        }\n        v6->show(v6);\n      }\n    }\n  }\n}", "assembly": "; \n; GJMessageCell::FLAlert_Clicked from 0x61d890 to 0x61da10 (384 bytes)\n; \n; 3 xrefs:\n; > `non-virtual thunk to'GJMessageCell::FLAlert_Clicked @ 0x61da14\n; > <???> @ 0xba2e8\n; > <???> @ 0x11514a0\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             X29, X30, [SP,#var_50]!                                ; +0x0, 0x61d890\nUXTB            W2, W2                                                 ; +0x4, 0x61d894\nMOV             X29, SP                                                ; +0x8, 0x61d898\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0xc, 0x61d89c\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0x10, 0x61d8a0\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x14, 0x61d8a4\nMOV             X20, X0                                                ; +0x18, 0x61d8a8\nLDR             X3, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x1c, 0x61d8ac\nLDR             X3, [X3]                                               ; +0x20, 0x61d8b0\nSTR             X3, [X29,#0x50+var_8]                                  ; +0x24, 0x61d8b4\nCBNZ            W2, loc_61D8E0                                         ; +0x28, 0x61d8b8\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x2c, 0x61d8bc\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x30, 0x61d8c0\nLDR             X0, [X19]                                              ; +0x34, 0x61d8c4\nCMP             X1, X0                                                 ; +0x38, 0x61d8c8\nB.NE            loc_61D9E0                                             ; +0x3c, 0x61d8cc\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x40, 0x61d8d0\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x44, 0x61d8d4\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x48, 0x61d8d8\nRET                                                                    ; +0x4c, 0x61d8dc\nLDR             X2, [X1]                                               ; +0x50, 0x61d8e0\nMOV             X0, X1                                                 ; +0x54, 0x61d8e4\nLDR             X1, [X2,#0x40]                                         ; +0x58, 0x61d8e8\nBLR             X1                                                     ; +0x5c, 0x61d8ec\nCMP             W0, #1                                                 ; +0x60, 0x61d8f0\nB.NE            loc_61D8BC                                             ; +0x64, 0x61d8f4\nLDR             X0, [X20,#0x230]                                       ; +0x68, 0x61d8f8\nCBZ             X0, loc_61D8BC                                         ; +0x6c, 0x61d8fc\nMOV             X0, X20; this                                          ; +0x70, 0x61d900\nBL              _ZN13GJMessageCell10markAsReadEv; GJMessageCell::markAsRead(void) ; +0x74, 0x61d904\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x78, 0x61d908\nLDR             X1, [X20,#0x230]; GJUserMessage *                      ; +0x7c, 0x61d90c\nMOV             X2, #0; cocos2d::CCArray *                             ; +0x80, 0x61d910\nLDRB            W3, [X1,#0x169]; bool                                  ; +0x84, 0x61d914\nBL              _ZN16GameLevelManager18deleteUserMessagesEP13GJUserMessagePN7cocos2d7CCArrayEb; GameLevelManager::deleteUserMessages(GJUserMessage *,cocos2d::CCArray *,bool) ; +0x88, 0x61d918\nUXTB            W0, W0; this                                           ; +0x8c, 0x61d91c\nCBZ             W0, loc_61D8BC                                         ; +0x90, 0x61d920\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x94, 0x61d924\nADD             X1, X20, #0x228                                        ; +0x98, 0x61d928\nSTR             X1, [X0,#0x338]                                        ; +0x9c, 0x61d92c\nLDR             X0, [X20,#0x238]                                       ; +0xa0, 0x61d930\nCBZ             X0, loc_61D93C                                         ; +0xa4, 0x61d934\nSTR             XZR, [X0,#0x278]                                       ; +0xa8, 0x61d938\nADD             X21, X29, #0x50+var_10                                 ; +0xac, 0x61d93c\nADRP            X1, #aDeletingMessag@PAGE; \"Deleting message...\"       ; +0xb0, 0x61d940\nMOV             X0, X21; int                                           ; +0xb4, 0x61d944\nADD             X1, X1, #aDeletingMessag@PAGEOFF; \"Deleting message...\" ; +0xb8, 0x61d948\nADD             X2, X29, #0x50+var_20                                  ; +0xbc, 0x61d94c\nBL              sub_D153B8                                             ; +0xc0, 0x61d950\nADD             X0, X20, #0x220                                        ; +0xc4, 0x61d954\nMOV             X1, X21                                                ; +0xc8, 0x61d958\nBL              _ZN17UploadActionPopup6createEP19UploadPopupDelegateSs; UploadActionPopup::create(UploadPopupDelegate *,std::string) ; +0xcc, 0x61d95c\nADRP            X1, #off_122EFE8@PAGE                                  ; +0xd0, 0x61d960\nSTR             X0, [X20,#0x238]                                       ; +0xd4, 0x61d964\nLDR             X2, [X29,#0x50+var_10]                                 ; +0xd8, 0x61d968\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0xdc, 0x61d96c\nSUB             X3, X2, #0x18                                          ; +0xe0, 0x61d970\nCMP             X3, X1                                                 ; +0xe4, 0x61d974\nB.NE            loc_61D98C                                             ; +0xe8, 0x61d978\nLDR             X1, [X0]                                               ; +0xec, 0x61d97c\nLDR             X1, [X1,#0x508]                                        ; +0xf0, 0x61d980\nBLR             X1                                                     ; +0xf4, 0x61d984\nB               loc_61D8BC                                             ; +0xf8, 0x61d988\nADRP            X0, #pthread_create_ptr_0@PAGE                         ; +0xfc, 0x61d98c\nLDR             X0, [X0,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0x100, 0x61d990\nCBZ             X0, loc_61D9D0                                         ; +0x104, 0x61d994\nSUB             X2, X2, #8                                             ; +0x108, 0x61d998\nLDAXR           W0, [X2]                                               ; +0x10c, 0x61d99c\nSUB             W1, W0, #1                                             ; +0x110, 0x61d9a0\nSTLXR           W4, W1, [X2]                                           ; +0x114, 0x61d9a4\nCBNZ            W4, loc_61D99C                                         ; +0x118, 0x61d9a8\nCMP             W0, WZR                                                ; +0x11c, 0x61d9ac\nB.LE            loc_61D9BC                                             ; +0x120, 0x61d9b0\nLDR             X0, [X20,#0x238]                                       ; +0x124, 0x61d9b4\nB               loc_61D97C                                             ; +0x128, 0x61d9b8\nMOV             X0, X3; p                                              ; +0x12c, 0x61d9bc\nADD             X1, X29, #0x50+var_18                                  ; +0x130, 0x61d9c0\nBL              j__ZdlPv; operator delete(void *)                      ; +0x134, 0x61d9c4\nLDR             X0, [X20,#0x238]                                       ; +0x138, 0x61d9c8\nB               loc_61D97C                                             ; +0x13c, 0x61d9cc\nLDUR            W0, [X2,#-8]                                           ; +0x140, 0x61d9d0\nSUB             W1, W0, #1                                             ; +0x144, 0x61d9d4\nSTUR            W1, [X2,#-8]                                           ; +0x148, 0x61d9d8\nB               loc_61D9AC                                             ; +0x14c, 0x61d9dc\nBL              .__stack_chk_fail                                      ; +0x150, 0x61d9e0\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x154, 0x61d9e4\nMOV             X19, X0                                                ; +0x158, 0x61d9e8\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x15c, 0x61d9ec\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x160, 0x61d9f0\nSUB             X0, X0, #0x18                                          ; +0x164, 0x61d9f4\nCMP             X0, X1                                                 ; +0x168, 0x61d9f8\nB.EQ            loc_61DA08                                             ; +0x16c, 0x61d9fc\nADD             X1, X29, #0x50+var_18                                  ; +0x170, 0x61da00\nBL              sub_4DB620                                             ; +0x174, 0x61da04\nMOV             X0, X19                                                ; +0x178, 0x61da08\nBL              _Unwind_Resume                                         ; +0x17c, 0x61da0c", "xrefs": ["`non-virtual thunk to'GJMessageCell::FLAlert_Clicked @ 0x61da14", "<???> @ 0xba2e8", "<???> @ 0x11514a0"], "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"}