{"type": "func", "start": 5372081056, "end": 5372081805, "name": "MessagesProfilePage::onDeleteSelected", "pseudocode": "// \n// MessagesProfilePage::onDeleteSelected from 0x1403373a0 to 0x14033768d (749 bytes)\n// \n// 2 xrefs:\n// > MessagesProfilePage::init @ 0x140336c10\n// > <???> @ 0x1406d5270\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 MessagesProfilePage::onDeleteSelected(MessagesProfilePage *a1, cocos2d::CCObject *a2)\n{\n  std::string *p_m_messageKey; // rbx\n  GameLevelManager *v4; // rcx\n  cocos2d::CCArray *StoredOnlineLevels; // rax\n  cocos2d::ccArray *data; // rcx\n  __int64 num; // rax\n  cocos2d::CCObject **arr; // rcx\n  cocos2d::CCObject **v9; // rdx\n  __int64 v10; // rax\n  FLAlertLayer *v11; // rbx\n  FLAlertLayerProtocol *v12; // r14\n  FLAlertLayer *v13; // rbx\n  __int64 v14; // rax\n  __int128 v15; // [rsp+50h] [rbp+7h] BYREF\n  __int64 v16; // [rsp+60h] [rbp+17h]\n  __int64 v17; // [rsp+68h] [rbp+1Fh]\n  _BYTE v18[32]; // [rsp+70h] [rbp+27h] BYREF\n  void *v19; // [rsp+B0h] [rbp+67h]\n  FLAlertLayer *v20; // [rsp+C0h] [rbp+77h]\n\n  p_m_messageKey = &a1->m_messageKey;\n  if ( a1->m_messageKey.m_data.m_capacity > 0xF )\n    p_m_messageKey = (std::string *)p_m_messageKey->m_data.m_bigStorage;\n  v4 = (GameLevelManager *)qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v19 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v19);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v4 = (GameLevelManager *)qword_1406C2EC0;\n  }\n  StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v4, p_m_messageKey->m_data.m_smallStorage._Elems);\n  if ( StoredOnlineLevels )\n  {\n    data = StoredOnlineLevels->data;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      arr = data->arr;\n      v9 = &arr[num - 1];\n      if ( arr <= v9 )\n      {\n        while ( *arr )\n        {\n          if ( BYTE2((*arr)[8].m_nTag) )\n          {\n            v12 = &a1->FLAlertLayerProtocol;\n            if ( !a1 )\n              v12 = nullptr;\n            v15 = 0;\n            *(_QWORD *)&v15 = sub_14003AA10(0x50u);\n            v16 = 70;\n            v17 = 79;\n            strcpy((char *)v15, \"Are you sure you want to <cr>delete</c> the selected <cg>messages</c>?\");\n            v20 = (FLAlertLayer *)operator new(0x278u);\n            v13 = FLAlertLayer::FLAlertLayer(v20);\n            if ( v13 )\n            {\n              v14 = sub_14003BDB0((__int64)v18, (__int64)&v15);\n              if ( FLAlertLayer::init((__int64)v13, (__int64)v12, \"Delete\", v14, \"Back\", \"Delete\", 380.0, 0, 0, 1.0) )\n              {\n                cocos2d::CCObject::autorelease(v13);\n              }\n              else\n              {\n                ((void (__fastcall *)(FLAlertLayer *, __int64))v13->~FLAlertLayer)(v13, 1);\n                v13 = nullptr;\n              }\n            }\n            sub_14003A830((__int64)&v15);\n            ButtonSprite::updateBGImage(v13->m_button2, \"GJ_button_06.png\");\n            v13->setTag(v13, 1);\n            v13->show(v13);\n            return;\n          }\n          if ( ++arr > v9 )\n            break;\n        }\n      }\n    }\n  }\n  v15 = 0;\n  v16 = 0;\n  v17 = 15;\n  *(_QWORD *)&v15 = sub_14003AA10(0x20u);\n  v16 = 21;\n  v17 = 31;\n  strcpy((char *)v15, \"No messages selected.\");\n  v10 = sub_14003BDB0((__int64)v18, (__int64)&v15);\n  v11 = FLAlertLayer::create(0, (int)\"Nothing here...\", v10, (__int64)\"OK\", 0, 1132068864, 0, 0, 1065353216);\n  sub_14003A830((__int64)&v15);\n  v11->show(v11);\n}", "assembly": "; \n; MessagesProfilePage::onDeleteSelected from 0x1403373a0 to 0x14033768d (749 bytes)\n; \n; 2 xrefs:\n; > MessagesProfilePage::init @ 0x140336c10\n; > <???> @ 0x1406d5270\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\nmov     [rsp-8+arg_8], rbx                                             ; +0x0, 0x1403373a0\nmov     [rsp-8+arg_18], rsi                                            ; +0x5, 0x1403373a5\npush    rbp                                                            ; +0xa, 0x1403373aa\npush    rdi                                                            ; +0xb, 0x1403373ab\npush    r14                                                            ; +0xc, 0x1403373ac\nlea     rbp, [rsp-47h]                                                 ; +0xe, 0x1403373ae\nsub     rsp, 90h                                                       ; +0x13, 0x1403373b3\nmov     rdi, rcx                                                       ; +0x1a, 0x1403373ba\nlea     rbx, [rcx+2A0h]                                                ; +0x1d, 0x1403373bd\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x24, 0x1403373c4\njbe     short loc_1403373CE                                            ; +0x29, 0x1403373c9\nmov     rbx, [rbx]                                                     ; +0x2b, 0x1403373cb\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x2e, 0x1403373ce\ntest    rcx, rcx                                                       ; +0x35, 0x1403373d5\njnz     short loc_140337409                                            ; +0x38, 0x1403373d8\nmov     ecx, 3D0h; Size                                                ; +0x3a, 0x1403373da\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3f, 0x1403373df\nmov     [rbp+57h+arg_0], rax                                           ; +0x44, 0x1403373e4\nmov     rcx, rax                                                       ; +0x48, 0x1403373e8\ncall    sub_140141280                                                  ; +0x4b, 0x1403373eb\nnop                                                                    ; +0x50, 0x1403373f0\nmov     cs:qword_1406C2EC0, rax                                        ; +0x51, 0x1403373f1\nmov     r8, [rax]                                                      ; +0x58, 0x1403373f8\nmov     rcx, rax                                                       ; +0x5b, 0x1403373fb\ncall    qword ptr [r8+48h]                                             ; +0x5e, 0x1403373fe\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x62, 0x140337402\nmov     rdx, rbx                                                       ; +0x69, 0x140337409\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x6c, 0x14033740c\ntest    rax, rax                                                       ; +0x71, 0x140337411\njz      short loc_14033744F                                            ; +0x74, 0x140337414\nmov     rcx, [rax+38h]                                                 ; +0x76, 0x140337416\nmov     eax, [rcx]                                                     ; +0x7a, 0x14033741a\ntest    eax, eax                                                       ; +0x7c, 0x14033741c\njz      short loc_14033744F                                            ; +0x7e, 0x14033741e\nmov     rcx, [rcx+10h]                                                 ; +0x80, 0x140337420\nlea     rdx, [rax-1]                                                   ; +0x84, 0x140337424\nlea     rdx, [rcx+rdx*8]                                               ; +0x88, 0x140337428\ncmp     rcx, rdx                                                       ; +0x8c, 0x14033742c\nja      short loc_14033744F                                            ; +0x8f, 0x14033742f\nmov     rax, [rcx]                                                     ; +0x91, 0x140337431\ntest    rax, rax                                                       ; +0x94, 0x140337434\njz      short loc_14033744F                                            ; +0x97, 0x140337437\ncmp     byte ptr [rax+1D2h], 0                                         ; +0x99, 0x140337439\njnz     loc_14033752D                                                  ; +0xa0, 0x140337440\nadd     rcx, 8                                                         ; +0xa6, 0x140337446\ncmp     rcx, rdx                                                       ; +0xaa, 0x14033744a\njbe     short loc_140337431                                            ; +0xad, 0x14033744d\nxorps   xmm0, xmm0                                                     ; +0xaf, 0x14033744f\nmovups  [rbp+57h+var_50], xmm0                                         ; +0xb2, 0x140337452\nxor     esi, esi                                                       ; +0xb6, 0x140337456\nmov     [rbp+57h+var_40], rsi                                          ; +0xb8, 0x140337458\nmov     [rbp+57h+var_38], 0Fh                                          ; +0xbc, 0x14033745c\nlea     ecx, [rsi+20h]                                                 ; +0xc4, 0x140337464\ncall    sub_14003AA10                                                  ; +0xc7, 0x140337467\nmov     qword ptr [rbp+57h+var_50], rax                                ; +0xcc, 0x14033746c\nmov     [rbp+57h+var_40], 15h                                          ; +0xd0, 0x140337470\nmov     [rbp+57h+var_38], 1Fh                                          ; +0xd8, 0x140337478\nmovups  xmm0, cs:xmmword_1405AB348                                     ; +0xe0, 0x140337480\nmovups  xmmword ptr [rax], xmm0                                        ; +0xe7, 0x140337487\nmov     ecx, cs:dword_1405AB358                                        ; +0xea, 0x14033748a\nmov     [rax+10h], ecx                                                 ; +0xf0, 0x140337490\nmovzx   ecx, cs:byte_1405AB35C                                         ; +0xf3, 0x140337493\nmov     [rax+14h], cl                                                  ; +0xfa, 0x14033749a\nmov     [rax+15h], sil                                                 ; +0xfd, 0x14033749d\nlea     rax, [rbp+57h+var_50]                                          ; +0x101, 0x1403374a1\nmov     [rbp+57h+arg_0], rax                                           ; +0x105, 0x1403374a5\nlea     rdx, [rbp+57h+var_50]                                          ; +0x109, 0x1403374a9\nlea     rcx, [rbp+57h+var_30]                                          ; +0x10d, 0x1403374ad\ncall    sub_14003BDB0                                                  ; +0x111, 0x1403374b1\nmovss   xmm0, cs:flt_140622C24                                         ; +0x116, 0x1403374b6\nmovss   [rsp+0A0h+var_60], xmm0                                        ; +0x11e, 0x1403374be\nxorps   xmm1, xmm1                                                     ; +0x124, 0x1403374c4\nmovss   [rsp+0A0h+var_68], xmm1                                        ; +0x127, 0x1403374c7\nmov     byte ptr [rsp+0A0h+var_70], sil                                ; +0x12d, 0x1403374cd\nmovss   xmm0, cs:dword_140623410                                       ; +0x132, 0x1403374d2\nmovss   dword ptr [rsp+0A0h+var_78], xmm0                              ; +0x13a, 0x1403374da\nmov     [rsp+0A0h+var_80], rsi                                         ; +0x140, 0x1403374e0\nlea     r9, aOk; \"OK\"                                                  ; +0x145, 0x1403374e5\nmov     r8, rax                                                        ; +0x14c, 0x1403374ec\nlea     rdx, aNothingHere; \"Nothing here...\"                           ; +0x14f, 0x1403374ef\nxor     ecx, ecx                                                       ; +0x156, 0x1403374f6\ncall    FLAlertLayer__create                                           ; +0x158, 0x1403374f8\nmov     rbx, rax                                                       ; +0x15d, 0x1403374fd\nlea     rcx, [rbp+57h+var_50]                                          ; +0x160, 0x140337500\ncall    sub_14003A830                                                  ; +0x164, 0x140337504\nmov     rdx, [rbx]                                                     ; +0x169, 0x140337509\nmov     rcx, rbx                                                       ; +0x16c, 0x14033750c\ncall    qword ptr [rdx+410h]                                           ; +0x16f, 0x14033750f\nlea     r11, [rsp+0A0h+var_10]                                         ; +0x175, 0x140337515\nmov     rbx, [r11+28h]                                                 ; +0x17d, 0x14033751d\nmov     rsi, [r11+38h]                                                 ; +0x181, 0x140337521\nmov     rsp, r11                                                       ; +0x185, 0x140337525\npop     r14                                                            ; +0x188, 0x140337528\npop     rdi                                                            ; +0x18a, 0x14033752a\npop     rbp                                                            ; +0x18b, 0x14033752b\nretn                                                                   ; +0x18c, 0x14033752c\nlea     r14, [rdi+278h]                                                ; +0x18d, 0x14033752d\nxor     esi, esi                                                       ; +0x194, 0x140337534\ntest    rdi, rdi                                                       ; +0x196, 0x140337536\ncmovz   r14, rsi                                                       ; +0x199, 0x140337539\nxorps   xmm0, xmm0                                                     ; +0x19d, 0x14033753d\nmovups  [rbp+57h+var_50], xmm0                                         ; +0x1a0, 0x140337540\nmov     [rbp+57h+var_40], rsi                                          ; +0x1a4, 0x140337544\nmov     [rbp+57h+var_38], 0Fh                                          ; +0x1a8, 0x140337548\nlea     ecx, [rsi+50h]                                                 ; +0x1b0, 0x140337550\ncall    sub_14003AA10                                                  ; +0x1b3, 0x140337553\nmov     rcx, rax                                                       ; +0x1b8, 0x140337558\nmov     qword ptr [rbp+57h+var_50], rax                                ; +0x1bb, 0x14033755b\nmov     [rbp+57h+var_40], 46h ; 'F'                                    ; +0x1bf, 0x14033755f\nmov     [rbp+57h+var_38], 4Fh ; 'O'                                    ; +0x1c7, 0x140337567\nmovaps  xmm0, cs:xmmword_1405AB360                                     ; +0x1cf, 0x14033756f\nmovups  xmmword ptr [rax], xmm0                                        ; +0x1d6, 0x140337576\nmovaps  xmm1, cs:xmmword_1405AB370                                     ; +0x1d9, 0x140337579\nmovups  xmmword ptr [rax+10h], xmm1                                    ; +0x1e0, 0x140337580\nmovaps  xmm0, cs:xmmword_1405AB380                                     ; +0x1e4, 0x140337584\nmovups  xmmword ptr [rax+20h], xmm0                                    ; +0x1eb, 0x14033758b\nmovaps  xmm1, cs:xmmword_1405AB390                                     ; +0x1ef, 0x14033758f\nmovups  xmmword ptr [rax+30h], xmm1                                    ; +0x1f6, 0x140337596\nmov     eax, cs:dword_1405AB3A0                                        ; +0x1fa, 0x14033759a\nmov     [rcx+40h], eax                                                 ; +0x200, 0x1403375a0\nmovzx   eax, cs:word_1405AB3A4                                         ; +0x203, 0x1403375a3\nmov     [rcx+44h], ax                                                  ; +0x20a, 0x1403375aa\nmov     [rcx+46h], sil                                                 ; +0x20e, 0x1403375ae\nlea     rax, [rbp+57h+var_50]                                          ; +0x212, 0x1403375b2\nmov     [rbp+57h+arg_0], rax                                           ; +0x216, 0x1403375b6\nmov     ecx, 278h; Size                                                ; +0x21a, 0x1403375ba\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x21f, 0x1403375bf\nmov     [rbp+57h+arg_10], rax                                          ; +0x224, 0x1403375c4\nmov     rcx, rax                                                       ; +0x228, 0x1403375c8\ncall    FLAlertLayer__FLAlertLayer                                     ; +0x22b, 0x1403375cb\nmov     rbx, rax                                                       ; +0x230, 0x1403375d0\ntest    rax, rax                                                       ; +0x233, 0x1403375d3\njz      short loc_140337652                                            ; +0x236, 0x1403375d6\nlea     rdx, [rbp+57h+var_50]                                          ; +0x238, 0x1403375d8\nlea     rcx, [rbp+57h+var_30]                                          ; +0x23c, 0x1403375dc\ncall    sub_14003BDB0                                                  ; +0x240, 0x1403375e0\nmovss   xmm0, cs:flt_140622C24                                         ; +0x245, 0x1403375e5\nmovss   [rsp+0A0h+var_58], xmm0                                        ; +0x24d, 0x1403375ed\nxorps   xmm1, xmm1                                                     ; +0x253, 0x1403375f3\nmovss   [rsp+0A0h+var_60], xmm1                                        ; +0x256, 0x1403375f6\nmov     byte ptr [rsp+0A0h+var_68], sil                                ; +0x25c, 0x1403375fc\nmovss   xmm0, cs:dword_140623478                                       ; +0x261, 0x140337601\nmovss   [rsp+0A0h+var_70], xmm0                                        ; +0x269, 0x140337609\nlea     r8, aDelete_0; \"Delete\"                                        ; +0x26f, 0x14033760f\nmov     [rsp+0A0h+var_78], r8                                          ; +0x276, 0x140337616\nlea     rcx, aBack; \"Back\"                                             ; +0x27b, 0x14033761b\nmov     [rsp+0A0h+var_80], rcx                                         ; +0x282, 0x140337622\nmov     r9, rax                                                        ; +0x287, 0x140337627\nmov     rdx, r14                                                       ; +0x28a, 0x14033762a\nmov     rcx, rbx                                                       ; +0x28d, 0x14033762d\ncall    FLAlertLayer__init                                             ; +0x290, 0x140337630\nmov     rcx, rbx                                                       ; +0x295, 0x140337635\ntest    al, al                                                         ; +0x298, 0x140337638\njz      short loc_140337644                                            ; +0x29a, 0x14033763a\ncall    cs:?autorelease@CCObject@cocos2d@@QEAAPEAV12@XZ; cocos2d::CCObject::autorelease(void) ; +0x29c, 0x14033763c\njmp     short loc_140337652                                            ; +0x2a2, 0x140337642\nmov     rax, [rbx]                                                     ; +0x2a4, 0x140337644\nmov     edx, 1                                                         ; +0x2a7, 0x140337647\ncall    qword ptr [rax+8]                                              ; +0x2ac, 0x14033764c\nmov     rbx, rsi                                                       ; +0x2af, 0x14033764f\nlea     rcx, [rbp+57h+var_50]                                          ; +0x2b2, 0x140337652\ncall    sub_14003A830                                                  ; +0x2b6, 0x140337656\nlea     rdx, aGjButton06Png; \"GJ_button_06.png\"                        ; +0x2bb, 0x14033765b\nmov     rcx, [rbx+258h]                                                ; +0x2c2, 0x140337662\ncall    ButtonSprite__updateBGImage                                    ; +0x2c9, 0x140337669\nmov     rax, [rbx]                                                     ; +0x2ce, 0x14033766e\nmov     edx, 1                                                         ; +0x2d1, 0x140337671\nmov     rcx, rbx                                                       ; +0x2d6, 0x140337676\ncall    qword ptr [rax+40h]                                            ; +0x2d9, 0x140337679\nmov     rax, [rbx]                                                     ; +0x2dc, 0x14033767c\nmov     rcx, rbx                                                       ; +0x2df, 0x14033767f\ncall    qword ptr [rax+410h]                                           ; +0x2e2, 0x140337682\njmp     loc_140337515                                                  ; +0x2e8, 0x140337688", "xrefs": ["MessagesProfilePage::init @ 0x140336c10", "<???> @ 0x1406d5270"], "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"}