{"type": "func", "start": 5373389328, "end": 5373389963, "name": "MessagesProfilePage::deleteSelected", "pseudocode": "// \n// MessagesProfilePage::deleteSelected from 0x140476a10 to 0x140476c8b (635 bytes)\n// \n// 2 xrefs:\n// > MessagesProfilePage::FLAlert_Clicked @ 0x140476cb2\n// > <???> @ 0x140928400\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 11:32:41 +0000\n// \n\n// Hidden C++ exception states: #wind=5\nint __fastcall MessagesProfilePage::deleteSelected(__int64 a1)\n{\n  _BYTE *v2; // rbx\n  __int64 v3; // rcx\n  __int64 StoredOnlineLevels; // rax\n  __int64 v5; // rcx\n  __int64 v6; // rbx\n  cocos2d::CCArray *v7; // r15\n  int v8; // esi\n  unsigned int *v9; // rdi\n  __int64 v10; // rax\n  struct cocos2d::CCObject **v11; // rdi\n  struct cocos2d::CCObject **i; // r14\n  struct cocos2d::CCObject *v13; // rbx\n  __int64 v14; // rbx\n  __int64 v15; // rcx\n  __int64 v16; // rax\n  cocos2d::CCObject *v17; // rax\n  __int64 v18; // rax\n  int v19; // ebx\n  __int64 v20; // rcx\n  struct cocos2d::CCObject *v21; // rax\n  int v22; // ecx\n  __int128 v24; // [rsp+20h] [rbp-48h] BYREF\n  __int64 v25; // [rsp+30h] [rbp-38h]\n  __int64 v26; // [rsp+38h] [rbp-30h]\n  void *v27; // [rsp+70h] [rbp+8h]\n  void *v28; // [rsp+70h] [rbp+8h]\n  void *v29; // [rsp+70h] [rbp+8h]\n\n  v2 = (_BYTE *)(a1 + 704);\n  if ( *(_QWORD *)(a1 + 728) > 0xFu )\n    v2 = *(_BYTE **)v2;\n  v3 = *(_QWORD *)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v27 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v27);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v3 = *(_QWORD *)&qword_14090BFB0;\n  }\n  StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v3, v2);\n  v6 = StoredOnlineLevels;\n  if ( StoredOnlineLevels )\n  {\n    v7 = (cocos2d::CCArray *)cocos2d::CCArray::create(v5);\n    v8 = 0;\n    v9 = *(unsigned int **)(v6 + 56);\n    v10 = *v9;\n    if ( (_DWORD)v10 )\n    {\n      v11 = *((struct cocos2d::CCObject ***)v9 + 2);\n      for ( i = &v11[v10 - 1]; v11 <= i; ++v11 )\n      {\n        v13 = *v11;\n        if ( !*v11 )\n          break;\n        if ( *((_BYTE *)v13 + 466) )\n        {\n          cocos2d::CCArray::addObject(v7, *v11);\n          if ( !*((_BYTE *)v13 + 464) )\n          {\n            *((_BYTE *)v13 + 464) = 1;\n            ++v8;\n          }\n        }\n      }\n    }\n    LODWORD(StoredOnlineLevels) = cocos2d::CCArray::count(v7);\n    if ( (_DWORD)StoredOnlineLevels )\n    {\n      v14 = a1 + 688;\n      if ( !a1 )\n        v14 = 0;\n      v15 = *(_QWORD *)&qword_14090BFB0;\n      if ( !*(_QWORD *)&qword_14090BFB0 )\n      {\n        v28 = operator new(0x690u);\n        *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v28);\n        (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n        v15 = *(_QWORD *)&qword_14090BFB0;\n      }\n      *(_QWORD *)(v15 + 1512) = v14;\n      v16 = a1 + 672;\n      if ( !a1 )\n        v16 = 0;\n      *(_QWORD *)(v15 + 1488) = v16;\n      if ( (unsigned __int8)GameLevelManager::deleteUserMessages(v15, nullptr, v7, *(_BYTE *)(a1 + 696)) )\n      {\n        v24 = 0;\n        *(_QWORD *)&v24 = sub_14003D460(0x20u);\n        v25 = 20;\n        v26 = 31;\n        strcpy((char *)v24, \"Deleting Messages...\");\n        v17 = UploadActionPopup::create(a1 + 680, (__int64)&v24);\n        *(_QWORD *)(a1 + 768) = v17;\n        (*(void (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)v17 + 1064LL))(v17);\n      }\n      if ( v8 > 0 )\n      {\n        v18 = GJAccountManager::sharedState();\n        v19 = *(_DWORD *)(v18 + 360) - *(_DWORD *)(v18 + 364);\n        v20 = *(_QWORD *)&qword_14090BFB0;\n        if ( !*(_QWORD *)&qword_14090BFB0 )\n        {\n          v29 = operator new(0x690u);\n          *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v29);\n          (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n          v20 = *(_QWORD *)&qword_14090BFB0;\n        }\n        v21 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(v20 + 1232), v19);\n        if ( v21 )\n        {\n          v22 = *((_DWORD *)v21 + 191) - v8;\n          if ( v22 < 0 )\n            v22 = 0;\n          *((_DWORD *)v21 + 191) = v22;\n        }\n      }\n      LODWORD(StoredOnlineLevels) = MessagesProfilePage::updateSelectUI(a1);\n    }\n  }\n  return StoredOnlineLevels;\n}", "assembly": "; \n; MessagesProfilePage::deleteSelected from 0x140476a10 to 0x140476c8b (635 bytes)\n; \n; 2 xrefs:\n; > MessagesProfilePage::FLAlert_Clicked @ 0x140476cb2\n; > <???> @ 0x140928400\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 11:32:41 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x140476a10\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x140476a15\npush    rsi                                                            ; +0xa, 0x140476a1a\npush    rdi                                                            ; +0xb, 0x140476a1b\npush    r12                                                            ; +0xc, 0x140476a1c\npush    r14                                                            ; +0xe, 0x140476a1e\npush    r15                                                            ; +0x10, 0x140476a20\nsub     rsp, 40h                                                       ; +0x12, 0x140476a22\nmov     rbp, rcx                                                       ; +0x16, 0x140476a26\nlea     rbx, [rcx+2C0h]                                                ; +0x19, 0x140476a29\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x20, 0x140476a30\njbe     short loc_140476A3A                                            ; +0x25, 0x140476a35\nmov     rbx, [rbx]                                                     ; +0x27, 0x140476a37\nmov     rcx, cs:qword_14090BFB0                                        ; +0x2a, 0x140476a3a\ntest    rcx, rcx                                                       ; +0x31, 0x140476a41\njnz     short loc_140476A79                                            ; +0x34, 0x140476a44\nmov     ecx, 690h; Size                                                ; +0x36, 0x140476a46\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3b, 0x140476a4b\nmov     [rsp+68h+arg_0], rax                                           ; +0x40, 0x140476a50\nmov     rcx, rax                                                       ; +0x45, 0x140476a55\ncall    GameLevelManager__GameLevelManager                             ; +0x48, 0x140476a58\nnop                                                                    ; +0x4d, 0x140476a5d\nmov     cs:qword_14090BFB0, rax                                        ; +0x4e, 0x140476a5e\nmov     rcx, [rax]                                                     ; +0x55, 0x140476a65\nmov     r8, [rcx+48h]                                                  ; +0x58, 0x140476a68\nmov     rcx, rax                                                       ; +0x5c, 0x140476a6c\ncall    r8                                                             ; +0x5f, 0x140476a6f\nmov     rcx, cs:qword_14090BFB0                                        ; +0x62, 0x140476a72\nmov     rdx, rbx                                                       ; +0x69, 0x140476a79\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x6c, 0x140476a7c\nmov     rbx, rax                                                       ; +0x71, 0x140476a81\ntest    rax, rax                                                       ; +0x74, 0x140476a84\njz      loc_140476C71                                                  ; +0x77, 0x140476a87\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x7d, 0x140476a8d\nmov     r15, rax                                                       ; +0x83, 0x140476a93\nxor     r12d, r12d                                                     ; +0x86, 0x140476a96\nmov     esi, r12d                                                      ; +0x89, 0x140476a99\nmov     rdi, [rbx+38h]                                                 ; +0x8c, 0x140476a9c\nmov     eax, [rdi]                                                     ; +0x90, 0x140476aa0\ntest    eax, eax                                                       ; +0x92, 0x140476aa2\njz      short loc_140476AEF                                            ; +0x94, 0x140476aa4\nmov     rdi, [rdi+10h]                                                 ; +0x96, 0x140476aa6\nlea     r14, [rax-1]                                                   ; +0x9a, 0x140476aaa\nlea     r14, [rdi+r14*8]                                               ; +0x9e, 0x140476aae\ncmp     rdi, r14                                                       ; +0xa2, 0x140476ab2\nja      short loc_140476AEF                                            ; +0xa5, 0x140476ab5\nmov     rbx, [rdi]                                                     ; +0xa7, 0x140476ab7\ntest    rbx, rbx                                                       ; +0xaa, 0x140476aba\njz      short loc_140476AEF                                            ; +0xad, 0x140476abd\ncmp     [rbx+1D2h], r12b                                               ; +0xaf, 0x140476abf\njz      short loc_140476AE6                                            ; +0xb6, 0x140476ac6\nmov     rdx, rbx                                                       ; +0xb8, 0x140476ac8\nmov     rcx, r15                                                       ; +0xbb, 0x140476acb\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0xbe, 0x140476ace\ncmp     [rbx+1D0h], r12b                                               ; +0xc4, 0x140476ad4\njnz     short loc_140476AE6                                            ; +0xcb, 0x140476adb\nmov     byte ptr [rbx+1D0h], 1                                         ; +0xcd, 0x140476add\ninc     esi                                                            ; +0xd4, 0x140476ae4\nadd     rdi, 8                                                         ; +0xd6, 0x140476ae6\ncmp     rdi, r14                                                       ; +0xda, 0x140476aea\njbe     short loc_140476AB7                                            ; +0xdd, 0x140476aed\nmov     rcx, r15                                                       ; +0xdf, 0x140476aef\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xe2, 0x140476af2\ntest    eax, eax                                                       ; +0xe8, 0x140476af8\njz      loc_140476C71                                                  ; +0xea, 0x140476afa\nlea     rbx, [rbp+2B0h]                                                ; +0xf0, 0x140476b00\ntest    rbp, rbp                                                       ; +0xf7, 0x140476b07\ncmovz   rbx, r12                                                       ; +0xfa, 0x140476b0a\nmov     rcx, cs:qword_14090BFB0                                        ; +0xfe, 0x140476b0e\ntest    rcx, rcx                                                       ; +0x105, 0x140476b15\njnz     short loc_140476B4C                                            ; +0x108, 0x140476b18\nmov     ecx, 690h; Size                                                ; +0x10a, 0x140476b1a\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x10f, 0x140476b1f\nmov     [rsp+68h+arg_0], rax                                           ; +0x114, 0x140476b24\nmov     rcx, rax                                                       ; +0x119, 0x140476b29\ncall    GameLevelManager__GameLevelManager                             ; +0x11c, 0x140476b2c\nnop                                                                    ; +0x121, 0x140476b31\nmov     cs:qword_14090BFB0, rax                                        ; +0x122, 0x140476b32\nmov     rcx, [rax]                                                     ; +0x129, 0x140476b39\nmov     rdx, [rcx+48h]                                                 ; +0x12c, 0x140476b3c\nmov     rcx, rax                                                       ; +0x130, 0x140476b40\ncall    rdx                                                            ; +0x133, 0x140476b43\nmov     rcx, cs:qword_14090BFB0                                        ; +0x135, 0x140476b45\nmov     [rcx+5E8h], rbx                                                ; +0x13c, 0x140476b4c\nlea     rax, [rbp+2A0h]                                                ; +0x143, 0x140476b53\ntest    rbp, rbp                                                       ; +0x14a, 0x140476b5a\ncmovz   rax, r12                                                       ; +0x14d, 0x140476b5d\nmov     [rcx+5D0h], rax                                                ; +0x151, 0x140476b61\nmovzx   r9d, byte ptr [rbp+2B8h]                                       ; +0x158, 0x140476b68\nmov     r8, r15                                                        ; +0x160, 0x140476b70\nxor     edx, edx                                                       ; +0x163, 0x140476b73\ncall    GameLevelManager__deleteUserMessages                           ; +0x165, 0x140476b75\ntest    al, al                                                         ; +0x16a, 0x140476b7a\njz      short loc_140476BEF                                            ; +0x16c, 0x140476b7c\nxorps   xmm0, xmm0                                                     ; +0x16e, 0x140476b7e\nmovups  [rsp+68h+var_48], xmm0                                         ; +0x171, 0x140476b81\nmov     [rsp+68h+var_38], r12                                          ; +0x176, 0x140476b86\nmov     [rsp+68h+var_30], r12                                          ; +0x17b, 0x140476b8b\nmov     ecx, 20h ; ' '                                                 ; +0x180, 0x140476b90\ncall    sub_14003D460                                                  ; +0x185, 0x140476b95\nmov     qword ptr [rsp+68h+var_48], rax                                ; +0x18a, 0x140476b9a\nmov     [rsp+68h+var_38], 14h                                          ; +0x18f, 0x140476b9f\nmov     [rsp+68h+var_30], 1Fh                                          ; +0x198, 0x140476ba8\nmovups  xmm0, cs:xmmword_1407B4938                                     ; +0x1a1, 0x140476bb1\nmovups  xmmword ptr [rax], xmm0                                        ; +0x1a8, 0x140476bb8\nmov     ecx, cs:dword_1407B4948                                        ; +0x1ab, 0x140476bbb\nmov     [rax+10h], ecx                                                 ; +0x1b1, 0x140476bc1\nmov     byte ptr [rax+14h], 0                                          ; +0x1b4, 0x140476bc4\nlea     rcx, [rbp+2A8h]                                                ; +0x1b8, 0x140476bc8\nlea     rdx, [rsp+68h+var_48]                                          ; +0x1bf, 0x140476bcf\ncall    UploadActionPopup__create                                      ; +0x1c4, 0x140476bd4\nmov     [rbp+300h], rax                                                ; +0x1c9, 0x140476bd9\nmov     rcx, [rax]                                                     ; +0x1d0, 0x140476be0\nmov     rdx, [rcx+428h]                                                ; +0x1d3, 0x140476be3\nmov     rcx, rax                                                       ; +0x1da, 0x140476bea\ncall    rdx                                                            ; +0x1dd, 0x140476bed\ntest    esi, esi                                                       ; +0x1df, 0x140476bef\njle     short loc_140476C69                                            ; +0x1e1, 0x140476bf1\ncall    GJAccountManager__sharedState                                  ; +0x1e3, 0x140476bf3\nmov     ebx, [rax+168h]                                                ; +0x1e8, 0x140476bf8\nsub     ebx, [rax+16Ch]                                                ; +0x1ee, 0x140476bfe\nmov     rcx, cs:qword_14090BFB0                                        ; +0x1f4, 0x140476c04\ntest    rcx, rcx                                                       ; +0x1fb, 0x140476c0b\njnz     short loc_140476C42                                            ; +0x1fe, 0x140476c0e\nmov     ecx, 690h; Size                                                ; +0x200, 0x140476c10\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x205, 0x140476c15\nmov     [rsp+68h+arg_0], rax                                           ; +0x20a, 0x140476c1a\nmov     rcx, rax                                                       ; +0x20f, 0x140476c1f\ncall    GameLevelManager__GameLevelManager                             ; +0x212, 0x140476c22\nnop                                                                    ; +0x217, 0x140476c27\nmov     cs:qword_14090BFB0, rax                                        ; +0x218, 0x140476c28\nmov     rcx, [rax]                                                     ; +0x21f, 0x140476c2f\nmov     rdx, [rcx+48h]                                                 ; +0x222, 0x140476c32\nmov     rcx, rax                                                       ; +0x226, 0x140476c36\ncall    rdx                                                            ; +0x229, 0x140476c39\nmov     rcx, cs:qword_14090BFB0                                        ; +0x22b, 0x140476c3b\nmovsxd  rdx, ebx                                                       ; +0x232, 0x140476c42\nmov     rcx, [rcx+4D0h]                                                ; +0x235, 0x140476c45\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x23c, 0x140476c4c\ntest    rax, rax                                                       ; +0x242, 0x140476c52\njz      short loc_140476C69                                            ; +0x245, 0x140476c55\nmov     ecx, [rax+2FCh]                                                ; +0x247, 0x140476c57\nsub     ecx, esi                                                       ; +0x24d, 0x140476c5d\ncmovs   ecx, r12d                                                      ; +0x24f, 0x140476c5f\nmov     [rax+2FCh], ecx                                                ; +0x253, 0x140476c63\nmov     rcx, rbp                                                       ; +0x259, 0x140476c69\ncall    MessagesProfilePage__updateSelectUI                            ; +0x25c, 0x140476c6c\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x261, 0x140476c71\nmov     rbp, [rsp+68h+arg_10]                                          ; +0x266, 0x140476c76\nadd     rsp, 40h                                                       ; +0x26e, 0x140476c7e\npop     r15                                                            ; +0x272, 0x140476c82\npop     r14                                                            ; +0x274, 0x140476c84\npop     r12                                                            ; +0x276, 0x140476c86\npop     rdi                                                            ; +0x278, 0x140476c88\npop     rsi                                                            ; +0x279, 0x140476c89\nretn                                                                   ; +0x27a, 0x140476c8a", "xrefs": ["MessagesProfilePage::FLAlert_Clicked @ 0x140476cb2", "<???> @ 0x140928400"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}