{"type": "func", "start": 4297427120, "end": 4297427462, "name": "GJMessageCell::FLAlert_Clicked", "pseudocode": "// \n// GJMessageCell::FLAlert_Clicked from 0x1002588b0 to 0x100258a06 (342 bytes)\n// \n// 2 xrefs:\n// > sub_100258A20 @ 0x100258a2c\n// > <???> @ 0x1008e8c78\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::FLAlert_Clicked(GJMessageCell *a1, FLAlertLayer *a2, bool a3)\n{\n  GJUserMessage *m_message; // rax\n  __int64 v4; // rax\n  GameLevelManager *v5; // r14\n  GJAccountManager *v6; // rax\n  GJUserScore *v7; // rax\n  int m_newMsgCount; // edx\n  GameLevelManager *v9; // rax\n  UploadActionPopup *m_popup; // rax\n  UploadActionPopup *v11; // rax\n  void *v12[5]; // [rsp+8h] [rbp-28h] BYREF\n\n  if ( a3 && ((unsigned int (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) == 1 )\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        v4 = ((__int64 (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->getChildByTag)(a1->m_mainLayer, 100);\n        if ( v4 )\n          (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v4 + 328LL))(v4, 0);\n        v5 = GameLevelManager::sharedState();\n        v6 = GJAccountManager::sharedState();\n        v7 = GameLevelManager::userInfoForAccountID(v5, v6->m_accountID - v6->m_unkInt1);\n        if ( v7 )\n        {\n          m_newMsgCount = 1;\n          if ( v7->m_newMsgCount >= 2 )\n            m_newMsgCount = v7->m_newMsgCount;\n          v7->m_newMsgCount = m_newMsgCount - 1;\n        }\n      }\n      v9 = GameLevelManager::sharedState();\n      if ( GameLevelManager::deleteUserMessages(v9, 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        strcpy((char *)v12, \"&Deleting message...\");\n        v11 = (UploadActionPopup *)UploadActionPopup::create(&a1->UploadPopupDelegate, v12);\n        a1->m_popup = v11;\n        if ( ((__int64)v12[0] & 1) != 0 )\n        {\n          operator delete(v12[2]);\n          v11 = a1->m_popup;\n        }\n        ((void (__fastcall *)(UploadActionPopup *))v11->show)(v11);\n      }\n    }\n  }\n}", "assembly": "; \n; GJMessageCell::FLAlert_Clicked from 0x1002588b0 to 0x100258a06 (342 bytes)\n; \n; 2 xrefs:\n; > sub_100258A20 @ 0x100258a2c\n; > <???> @ 0x1008e8c78\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, 0x1002588b0\nmov     rbp, rsp                                                       ; +0x1, 0x1002588b1\npush    r14                                                            ; +0x4, 0x1002588b4\npush    rbx                                                            ; +0x6, 0x1002588b6\nsub     rsp, 20h                                                       ; +0x7, 0x1002588b7\ntest    edx, edx                                                       ; +0xb, 0x1002588bb\njz      loc_1002589FD                                                  ; +0xd, 0x1002588bd\nmov     rbx, rdi                                                       ; +0x13, 0x1002588c3\nmov     rax, [rsi]                                                     ; +0x16, 0x1002588c6\nmov     rdi, rsi                                                       ; +0x19, 0x1002588c9\ncall    qword ptr [rax+40h]                                            ; +0x1c, 0x1002588cc\ncmp     eax, 1                                                         ; +0x1f, 0x1002588cf\njnz     loc_1002589FD                                                  ; +0x22, 0x1002588d2\nmov     rax, [rbx+240h]                                                ; +0x28, 0x1002588d8\ntest    rax, rax                                                       ; +0x2f, 0x1002588df\njz      loc_1002589FD                                                  ; +0x32, 0x1002588e2\ncmp     byte ptr [rax+1A8h], 0                                         ; +0x38, 0x1002588e8\njnz     short loc_10025895F                                            ; +0x3f, 0x1002588ef\nmov     byte ptr [rax+1A8h], 1                                         ; +0x41, 0x1002588f1\nmov     rdi, [rbx+218h]                                                ; +0x48, 0x1002588f8\nmov     rax, [rdi]                                                     ; +0x4f, 0x1002588ff\nmov     esi, 64h ; 'd'                                                 ; +0x52, 0x100258902\ncall    qword ptr [rax+1D0h]                                           ; +0x57, 0x100258907\ntest    rax, rax                                                       ; +0x5d, 0x10025890d\njz      short loc_100258920                                            ; +0x60, 0x100258910\nmov     rcx, [rax]                                                     ; +0x62, 0x100258912\nmov     rdi, rax                                                       ; +0x65, 0x100258915\nxor     esi, esi                                                       ; +0x68, 0x100258918\ncall    qword ptr [rcx+148h]                                           ; +0x6a, 0x10025891a\ncall    GameLevelManager__sharedState                                  ; +0x70, 0x100258920\nmov     r14, rax                                                       ; +0x75, 0x100258925\ncall    GJAccountManager__sharedState                                  ; +0x78, 0x100258928\nmov     esi, [rax+160h]                                                ; +0x7d, 0x10025892d\nsub     esi, [rax+164h]                                                ; +0x83, 0x100258933\nmov     rdi, r14                                                       ; +0x89, 0x100258939\ncall    GameLevelManager__userInfoForAccountID                         ; +0x8c, 0x10025893c\ntest    rax, rax                                                       ; +0x91, 0x100258941\njz      short loc_10025895F                                            ; +0x94, 0x100258944\nmov     ecx, [rax+2A4h]                                                ; +0x96, 0x100258946\ncmp     ecx, 2                                                         ; +0x9c, 0x10025894c\nmov     edx, 1                                                         ; +0x9f, 0x10025894f\ncmovge  edx, ecx                                                       ; +0xa4, 0x100258954\ndec     edx                                                            ; +0xa7, 0x100258957\nmov     [rax+2A4h], edx                                                ; +0xa9, 0x100258959\ncall    GameLevelManager__sharedState                                  ; +0xaf, 0x10025895f\nmov     rsi, [rbx+240h]                                                ; +0xb4, 0x100258964\nmovzx   ecx, byte ptr [rsi+1A9h]                                       ; +0xbb, 0x10025896b\nmov     rdi, rax                                                       ; +0xc2, 0x100258972\nxor     edx, edx                                                       ; +0xc5, 0x100258975\ncall    GameLevelManager__deleteUserMessages                           ; +0xc7, 0x100258977\ntest    al, al                                                         ; +0xcc, 0x10025897c\njz      short loc_1002589FD                                            ; +0xce, 0x10025897e\ncall    GameLevelManager__sharedState                                  ; +0xd0, 0x100258980\nlea     rcx, [rbx+238h]                                                ; +0xd5, 0x100258985\nmov     [rax+328h], rcx                                                ; +0xdc, 0x10025898c\nmov     rax, [rbx+248h]                                                ; +0xe3, 0x100258993\ntest    rax, rax                                                       ; +0xea, 0x10025899a\njz      short loc_1002589AA                                            ; +0xed, 0x10025899d\nmov     qword ptr [rax+278h], 0                                        ; +0xef, 0x10025899f\nlea     rdi, [rbx+230h]                                                ; +0xfa, 0x1002589aa\nmov     [rbp+var_28], 26h ; '&'                                        ; +0x101, 0x1002589b1\nmovups  xmm0, xmmword ptr cs:aDeletingMessag_0; \"Deleting message...\"  ; +0x105, 0x1002589b5\nmovups  xmmword ptr [rbp+var_28+1], xmm0                               ; +0x10c, 0x1002589bc\nmov     dword ptr [rbp+var_28+10h], 2E2E2E65h                          ; +0x110, 0x1002589c0\nmov     [rbp+var_28+14h], 0                                            ; +0x117, 0x1002589c7\nlea     rsi, [rbp+var_28]                                              ; +0x11b, 0x1002589cb\ncall    UploadActionPopup__create                                      ; +0x11f, 0x1002589cf\nmov     [rbx+248h], rax                                                ; +0x124, 0x1002589d4\ntest    [rbp+var_28], 1                                                ; +0x12b, 0x1002589db\njz      short loc_1002589F1                                            ; +0x12f, 0x1002589df\nmov     rdi, qword ptr [rbp+var_28+10h]; __p                           ; +0x131, 0x1002589e1\ncall    __ZdlPv; operator delete(void *)                               ; +0x135, 0x1002589e5\nmov     rax, [rbx+248h]                                                ; +0x13a, 0x1002589ea\nmov     rcx, [rax]                                                     ; +0x141, 0x1002589f1\nmov     rdi, rax                                                       ; +0x144, 0x1002589f4\ncall    qword ptr [rcx+508h]                                           ; +0x147, 0x1002589f7\nadd     rsp, 20h                                                       ; +0x14d, 0x1002589fd\npop     rbx                                                            ; +0x151, 0x100258a01\npop     r14                                                            ; +0x152, 0x100258a02\npop     rbp                                                            ; +0x154, 0x100258a04\nretn                                                                   ; +0x155, 0x100258a05", "xrefs": ["sub_100258A20 @ 0x100258a2c", "<???> @ 0x1008e8c78"], "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"}