{"type": "func", "start": 5370014272, "end": 5370014893, "name": "FRequestProfilePage::deleteSelected", "pseudocode": "// \n// FRequestProfilePage::deleteSelected from 0x14013ea40 to 0x14013ecad (621 bytes)\n// \n// 2 xrefs:\n// > FRequestProfilePage::FLAlert_Clicked @ 0x14013ecd2\n// > <???> @ 0x1406ca1dc\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\n// Hidden C++ exception states: #wind=5\nvoid FRequestProfilePage::deleteSelected(FRequestProfilePage *a1)\n{\n  std::string *p_m_key; // rbx\n  GameLevelManager *v3; // rcx\n  __int64 v4; // rcx\n  cocos2d::CCArray *StoredOnlineLevels; // rbx\n  cocos2d::CCArray *v6; // r14\n  int v7; // esi\n  cocos2d::ccArray *data; // rdi\n  __int64 num; // rax\n  struct cocos2d::CCObject **arr; // rdi\n  struct cocos2d::CCObject **i; // rbp\n  struct cocos2d::CCObject *v12; // rbx\n  FriendRequestDelegate *v13; // rbx\n  GameLevelManager *v14; // rcx\n  UploadActionDelegate *v15; // rax\n  UploadPopupDelegate *v16; // rcx\n  UploadActionPopup *v17; // rax\n  GJAccountManager *v18; // rax\n  int v19; // ebx\n  __int64 v20; // rcx\n  struct cocos2d::CCObject *v21; // rax\n  int v22; // ecx\n  __int128 v23; // [rsp+20h] [rbp-48h] BYREF\n  __int64 v24; // [rsp+30h] [rbp-38h]\n  __int64 v25; // [rsp+38h] [rbp-30h]\n  void *v26; // [rsp+70h] [rbp+8h]\n  void *v27; // [rsp+70h] [rbp+8h]\n  void *v28; // [rsp+70h] [rbp+8h]\n\n  p_m_key = &a1->m_key;\n  if ( a1->m_key.m_data.m_capacity > 0xF )\n    p_m_key = (std::string *)p_m_key->m_data.m_bigStorage;\n  v3 = (GameLevelManager *)qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v26 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280(v26);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v3 = (GameLevelManager *)qword_1406C2EC0;\n  }\n  StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v3, p_m_key->m_data.m_smallStorage._Elems);\n  if ( StoredOnlineLevels )\n  {\n    v6 = (cocos2d::CCArray *)cocos2d::CCArray::create(v4);\n    v7 = 0;\n    data = StoredOnlineLevels->data;\n    num = data->num;\n    if ( (_DWORD)num )\n    {\n      arr = data->arr;\n      for ( i = &arr[num - 1]; arr <= i; ++arr )\n      {\n        v12 = *arr;\n        if ( !*arr )\n          break;\n        if ( BYTE1(v12[13].m_uIndexInArray) )\n        {\n          cocos2d::CCArray::addObject(v6, *arr);\n          if ( LOBYTE(v12[13].m_uIndexInArray) )\n          {\n            LOBYTE(v12[13].m_uIndexInArray) = 0;\n            ++v7;\n          }\n        }\n      }\n    }\n    if ( cocos2d::CCArray::count(v6) )\n    {\n      v13 = &a1->FriendRequestDelegate;\n      if ( !a1 )\n        v13 = nullptr;\n      v14 = (GameLevelManager *)qword_1406C2EC0;\n      if ( !qword_1406C2EC0 )\n      {\n        v27 = operator new(0x3D0u);\n        qword_1406C2EC0 = sub_140141280(v27);\n        (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n        v14 = (GameLevelManager *)qword_1406C2EC0;\n      }\n      v14->m_friendRequestDelegate = v13;\n      v15 = &a1->UploadActionDelegate;\n      if ( !a1 )\n        v15 = nullptr;\n      v14->m_uploadActionDelegate = v15;\n      if ( GameLevelManager::deleteFriendRequests(v14, 0, v6, 0) )\n      {\n        v23 = 0;\n        *(_QWORD *)&v23 = sub_14003AA10(0x20u);\n        v24 = 20;\n        v25 = 31;\n        strcpy((char *)v23, \"Deleting Requests...\");\n        v16 = &a1->UploadPopupDelegate;\n        if ( !a1 )\n          v16 = nullptr;\n        v17 = (UploadActionPopup *)UploadActionPopup::create(v16, &v23);\n        a1->m_uploadPopup = v17;\n        v17->show(v17);\n      }\n      if ( v7 > 0 )\n      {\n        v18 = GJAccountManager::sharedState();\n        v19 = v18->m_accountID - v18->m_unkInt1;\n        v20 = qword_1406C2EC0;\n        if ( !qword_1406C2EC0 )\n        {\n          v28 = operator new(0x3D0u);\n          qword_1406C2EC0 = sub_140141280(v28);\n          (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n          v20 = qword_1406C2EC0;\n        }\n        v21 = cocos2d::CCDictionary::objectForKey(*(cocos2d::CCDictionary **)(v20 + 600), v19);\n        if ( v21 )\n        {\n          v22 = v21[13].m_uAutoReleaseCount - v7;\n          if ( v22 < 0 )\n            v22 = 0;\n          v21[13].m_uAutoReleaseCount = v22;\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; FRequestProfilePage::deleteSelected from 0x14013ea40 to 0x14013ecad (621 bytes)\n; \n; 2 xrefs:\n; > FRequestProfilePage::FLAlert_Clicked @ 0x14013ecd2\n; > <???> @ 0x1406ca1dc\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+arg_8], rbx                                               ; +0x0, 0x14013ea40\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x14013ea45\npush    rsi                                                            ; +0xa, 0x14013ea4a\npush    rdi                                                            ; +0xb, 0x14013ea4b\npush    r12                                                            ; +0xc, 0x14013ea4c\npush    r14                                                            ; +0xe, 0x14013ea4e\npush    r15                                                            ; +0x10, 0x14013ea50\nsub     rsp, 40h                                                       ; +0x12, 0x14013ea52\nmov     r15, rcx                                                       ; +0x16, 0x14013ea56\nlea     rbx, [rcx+2A0h]                                                ; +0x19, 0x14013ea59\ncmp     qword ptr [rbx+18h], 0Fh                                       ; +0x20, 0x14013ea60\njbe     short loc_14013EA6A                                            ; +0x25, 0x14013ea65\nmov     rbx, [rbx]                                                     ; +0x27, 0x14013ea67\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x2a, 0x14013ea6a\ntest    rcx, rcx                                                       ; +0x31, 0x14013ea71\njnz     short loc_14013EAA6                                            ; +0x34, 0x14013ea74\nmov     ecx, 3D0h; Size                                                ; +0x36, 0x14013ea76\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x3b, 0x14013ea7b\nmov     [rsp+68h+arg_0], rax                                           ; +0x40, 0x14013ea80\nmov     rcx, rax                                                       ; +0x45, 0x14013ea85\ncall    sub_140141280                                                  ; +0x48, 0x14013ea88\nnop                                                                    ; +0x4d, 0x14013ea8d\nmov     cs:qword_1406C2EC0, rax                                        ; +0x4e, 0x14013ea8e\nmov     r8, [rax]                                                      ; +0x55, 0x14013ea95\nmov     rcx, rax                                                       ; +0x58, 0x14013ea98\ncall    qword ptr [r8+48h]                                             ; +0x5b, 0x14013ea9b\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x5f, 0x14013ea9f\nmov     rdx, rbx                                                       ; +0x66, 0x14013eaa6\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x69, 0x14013eaa9\nmov     rbx, rax                                                       ; +0x6e, 0x14013eaae\ntest    rax, rax                                                       ; +0x71, 0x14013eab1\njz      loc_14013EC93                                                  ; +0x74, 0x14013eab4\ncall    cs:?create@CCArray@cocos2d@@SAPEAV12@XZ; cocos2d::CCArray::create(void) ; +0x7a, 0x14013eaba\nmov     r14, rax                                                       ; +0x80, 0x14013eac0\nxor     r12d, r12d                                                     ; +0x83, 0x14013eac3\nmov     esi, r12d                                                      ; +0x86, 0x14013eac6\nmov     rdi, [rbx+38h]                                                 ; +0x89, 0x14013eac9\nmov     eax, [rdi]                                                     ; +0x8d, 0x14013eacd\ntest    eax, eax                                                       ; +0x8f, 0x14013eacf\njz      short loc_14013EB1C                                            ; +0x91, 0x14013ead1\nmov     rdi, [rdi+10h]                                                 ; +0x93, 0x14013ead3\nlea     rbp, [rax-1]                                                   ; +0x97, 0x14013ead7\nlea     rbp, [rdi+rbp*8]                                               ; +0x9b, 0x14013eadb\ncmp     rdi, rbp                                                       ; +0x9f, 0x14013eadf\nja      short loc_14013EB1C                                            ; +0xa2, 0x14013eae2\nmov     rbx, [rdi]                                                     ; +0xa4, 0x14013eae4\ntest    rbx, rbx                                                       ; +0xa7, 0x14013eae7\njz      short loc_14013EB1C                                            ; +0xaa, 0x14013eaea\ncmp     [rbx+2F9h], r12b                                               ; +0xac, 0x14013eaec\njz      short loc_14013EB13                                            ; +0xb3, 0x14013eaf3\nmov     rdx, rbx                                                       ; +0xb5, 0x14013eaf5\nmov     rcx, r14                                                       ; +0xb8, 0x14013eaf8\ncall    cs:?addObject@CCArray@cocos2d@@QEAAXPEAVCCObject@2@@Z; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0xbb, 0x14013eafb\ncmp     [rbx+2F8h], r12b                                               ; +0xc1, 0x14013eb01\njz      short loc_14013EB13                                            ; +0xc8, 0x14013eb08\nmov     [rbx+2F8h], r12b                                               ; +0xca, 0x14013eb0a\ninc     esi                                                            ; +0xd1, 0x14013eb11\nadd     rdi, 8                                                         ; +0xd3, 0x14013eb13\ncmp     rdi, rbp                                                       ; +0xd7, 0x14013eb17\njbe     short loc_14013EAE4                                            ; +0xda, 0x14013eb1a\nmov     rcx, r14                                                       ; +0xdc, 0x14013eb1c\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xdf, 0x14013eb1f\ntest    eax, eax                                                       ; +0xe5, 0x14013eb25\njz      loc_14013EC93                                                  ; +0xe7, 0x14013eb27\nlea     rbx, [r15+290h]                                                ; +0xed, 0x14013eb2d\ntest    r15, r15                                                       ; +0xf4, 0x14013eb34\ncmovz   rbx, r12                                                       ; +0xf7, 0x14013eb37\nmov     rcx, cs:qword_1406C2EC0                                        ; +0xfb, 0x14013eb3b\ntest    rcx, rcx                                                       ; +0x102, 0x14013eb42\njnz     short loc_14013EB76                                            ; +0x105, 0x14013eb45\nmov     ecx, 3D0h; Size                                                ; +0x107, 0x14013eb47\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x10c, 0x14013eb4c\nmov     [rsp+68h+arg_0], rax                                           ; +0x111, 0x14013eb51\nmov     rcx, rax                                                       ; +0x116, 0x14013eb56\ncall    sub_140141280                                                  ; +0x119, 0x14013eb59\nnop                                                                    ; +0x11e, 0x14013eb5e\nmov     cs:qword_1406C2EC0, rax                                        ; +0x11f, 0x14013eb5f\nmov     rdx, [rax]                                                     ; +0x126, 0x14013eb66\nmov     rcx, rax                                                       ; +0x129, 0x14013eb69\ncall    qword ptr [rdx+48h]                                            ; +0x12c, 0x14013eb6c\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x12f, 0x14013eb6f\nmov     [rcx+338h], rbx                                                ; +0x136, 0x14013eb76\nlea     rax, [r15+280h]                                                ; +0x13d, 0x14013eb7d\ntest    r15, r15                                                       ; +0x144, 0x14013eb84\ncmovz   rax, r12                                                       ; +0x147, 0x14013eb87\nmov     [rcx+328h], rax                                                ; +0x14b, 0x14013eb8b\nxor     r9d, r9d                                                       ; +0x152, 0x14013eb92\nmov     r8, r14                                                        ; +0x155, 0x14013eb95\nxor     edx, edx                                                       ; +0x158, 0x14013eb98\ncall    GameLevelManager__deleteFriendRequests                         ; +0x15a, 0x14013eb9a\ntest    al, al                                                         ; +0x15f, 0x14013eb9f\njz      short loc_14013EC1C                                            ; +0x161, 0x14013eba1\nxorps   xmm0, xmm0                                                     ; +0x163, 0x14013eba3\nmovups  [rsp+68h+var_48], xmm0                                         ; +0x166, 0x14013eba6\nmov     [rsp+68h+var_38], r12                                          ; +0x16b, 0x14013ebab\nmov     [rsp+68h+var_30], 0Fh                                          ; +0x170, 0x14013ebb0\nmov     ecx, 20h ; ' '                                                 ; +0x179, 0x14013ebb9\ncall    sub_14003AA10                                                  ; +0x17e, 0x14013ebbe\nmov     qword ptr [rsp+68h+var_48], rax                                ; +0x183, 0x14013ebc3\nmov     [rsp+68h+var_38], 14h                                          ; +0x188, 0x14013ebc8\nmov     [rsp+68h+var_30], 1Fh                                          ; +0x191, 0x14013ebd1\nmovups  xmm0, cs:xmmword_140557B28                                     ; +0x19a, 0x14013ebda\nmovups  xmmword ptr [rax], xmm0                                        ; +0x1a1, 0x14013ebe1\nmov     ecx, cs:dword_140557B38                                        ; +0x1a4, 0x14013ebe4\nmov     [rax+10h], ecx                                                 ; +0x1aa, 0x14013ebea\nmov     byte ptr [rax+14h], 0                                          ; +0x1ad, 0x14013ebed\nlea     rcx, [r15+288h]                                                ; +0x1b1, 0x14013ebf1\ntest    r15, r15                                                       ; +0x1b8, 0x14013ebf8\ncmovz   rcx, r12                                                       ; +0x1bb, 0x14013ebfb\nlea     rdx, [rsp+68h+var_48]                                          ; +0x1bf, 0x14013ebff\ncall    UploadActionPopup__create                                      ; +0x1c4, 0x14013ec04\nmov     [r15+2E0h], rax                                                ; +0x1c9, 0x14013ec09\nmov     rdx, [rax]                                                     ; +0x1d0, 0x14013ec10\nmov     rcx, rax                                                       ; +0x1d3, 0x14013ec13\ncall    qword ptr [rdx+410h]                                           ; +0x1d6, 0x14013ec16\ntest    esi, esi                                                       ; +0x1dc, 0x14013ec1c\njle     short loc_14013EC93                                            ; +0x1de, 0x14013ec1e\ncall    GJAccountManager__sharedState                                  ; +0x1e0, 0x14013ec20\nmov     ebx, [rax+168h]                                                ; +0x1e5, 0x14013ec25\nsub     ebx, [rax+16Ch]                                                ; +0x1eb, 0x14013ec2b\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x1f1, 0x14013ec31\ntest    rcx, rcx                                                       ; +0x1f8, 0x14013ec38\njnz     short loc_14013EC6C                                            ; +0x1fb, 0x14013ec3b\nmov     ecx, 3D0h; Size                                                ; +0x1fd, 0x14013ec3d\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x202, 0x14013ec42\nmov     [rsp+68h+arg_0], rax                                           ; +0x207, 0x14013ec47\nmov     rcx, rax                                                       ; +0x20c, 0x14013ec4c\ncall    sub_140141280                                                  ; +0x20f, 0x14013ec4f\nnop                                                                    ; +0x214, 0x14013ec54\nmov     cs:qword_1406C2EC0, rax                                        ; +0x215, 0x14013ec55\nmov     rdx, [rax]                                                     ; +0x21c, 0x14013ec5c\nmov     rcx, rax                                                       ; +0x21f, 0x14013ec5f\ncall    qword ptr [rdx+48h]                                            ; +0x222, 0x14013ec62\nmov     rcx, cs:qword_1406C2EC0                                        ; +0x225, 0x14013ec65\nmovsxd  rdx, ebx                                                       ; +0x22c, 0x14013ec6c\nmov     rcx, [rcx+258h]                                                ; +0x22f, 0x14013ec6f\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x236, 0x14013ec76\ntest    rax, rax                                                       ; +0x23c, 0x14013ec7c\njz      short loc_14013EC93                                            ; +0x23f, 0x14013ec7f\nmov     ecx, [rax+2F0h]                                                ; +0x241, 0x14013ec81\nsub     ecx, esi                                                       ; +0x247, 0x14013ec87\ncmovs   ecx, r12d                                                      ; +0x249, 0x14013ec89\nmov     [rax+2F0h], ecx                                                ; +0x24d, 0x14013ec8d\nmov     rbx, [rsp+68h+arg_8]                                           ; +0x253, 0x14013ec93\nmov     rbp, [rsp+68h+arg_10]                                          ; +0x258, 0x14013ec98\nadd     rsp, 40h                                                       ; +0x260, 0x14013eca0\npop     r15                                                            ; +0x264, 0x14013eca4\npop     r14                                                            ; +0x266, 0x14013eca6\npop     r12                                                            ; +0x268, 0x14013eca8\npop     rdi                                                            ; +0x26a, 0x14013ecaa\npop     rsi                                                            ; +0x26b, 0x14013ecab\nretn                                                                   ; +0x26c, 0x14013ecac", "xrefs": ["FRequestProfilePage::FLAlert_Clicked @ 0x14013ecd2", "<???> @ 0x1406ca1dc"], "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"}