{"type": "func", "start": 4989480, "end": 4989764, "name": "FRequestProfilePage::deleteSelected", "pseudocode": "// \n// FRequestProfilePage::deleteSelected from 0x4c2228 to 0x4c2344 (284 bytes)\n// \n// 1 xrefs:\n// > FRequestProfilePage::FLAlert_Clicked @ 0x4c2364\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 FRequestProfilePage::deleteSelected(FRequestProfilePage *a1)\n{\n  GameLevelManager *v2; // r0\n  cocos2d::CCArray *StoredOnlineLevels; // r0\n  cocos2d::CCArray *v4; // r4\n  cocos2d::CCArray *v5; // r0\n  cocos2d::ccArray *data; // r2\n  cocos2d::CCArray *v7; // r9\n  cocos2d::CCObject **arr; // r7\n  int v9; // r6\n  cocos2d::CCObject **v10; // r4\n  int v11; // r10\n  int v12; // t1\n  GameLevelManager *v13; // r0\n  GameLevelManager *v14; // r4\n  GJAccountManager *v15; // r0\n  GJUserScore *v16; // r0\n  char v17[4]; // [sp+8h] [bp-Ch] BYREF\n\n  v2 = GameLevelManager::sharedState();\n  StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(v2, (const char *)a1->m_key.m_data.m_data);\n  v4 = StoredOnlineLevels;\n  if ( StoredOnlineLevels )\n  {\n    v5 = (cocos2d::CCArray *)cocos2d::CCArray::create(StoredOnlineLevels);\n    data = v4->data;\n    v7 = v5;\n    if ( data->num )\n    {\n      arr = data->arr;\n      v9 = 0;\n      v10 = &arr[data->num] + 0x3FFFFFFF;\n      while ( arr <= v10 )\n      {\n        v12 = (int)*arr++;\n        v11 = v12;\n        if ( !v12 )\n          break;\n        if ( *(_BYTE *)(v11 + 453) )\n        {\n          cocos2d::CCArray::addObject(v7, (cocos2d::CCObject *)v11);\n          if ( *(_BYTE *)(v11 + 452) )\n          {\n            *(_BYTE *)(v11 + 452) = 0;\n            ++v9;\n          }\n        }\n      }\n    }\n    else\n    {\n      v9 = 0;\n    }\n    if ( cocos2d::CCArray::count(v7) )\n    {\n      GameLevelManager::sharedState()->m_friendRequestDelegate = &a1->FriendRequestDelegate;\n      GameLevelManager::sharedState()->m_uploadActionDelegate = &a1->UploadActionDelegate;\n      v13 = GameLevelManager::sharedState();\n      if ( GameLevelManager::deleteFriendRequests(v13, 0, v7, 0) )\n      {\n        sub_776584((int)v17, \"Deleting Requests...\");\n        a1->m_uploadPopup = (UploadActionPopup *)UploadActionPopup::create((char *)&a1->UploadPopupDelegate, v17);\n        sub_774008(v17);\n        a1->m_uploadPopup->show(a1->m_uploadPopup);\n      }\n      if ( v9 )\n      {\n        v14 = GameLevelManager::sharedState();\n        v15 = GJAccountManager::sharedState();\n        v16 = GameLevelManager::userInfoForAccountID(v14, v15->m_accountID - v15->m_unkInt1);\n        if ( v16 )\n          v16->m_friendReqCount = (v16->m_friendReqCount - v9) & ~((v16->m_friendReqCount - v9) >> 31);\n      }\n    }\n  }\n}", "assembly": "; \n; FRequestProfilePage::deleteSelected from 0x4c2228 to 0x4c2344 (284 bytes)\n; \n; 1 xrefs:\n; > FRequestProfilePage::FLAlert_Clicked @ 0x4c2364\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.W          {R4-R11,LR}                                            ; +0x0, 0x4c2228\nSUB             SP, SP, #0x14                                          ; +0x4, 0x4c222c\nLDR             R5, =(__stack_chk_guard_ptr - 0x4C2236)                ; +0x6, 0x4c222e\nMOV             R8, R0                                                 ; +0x8, 0x4c2230\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0xa, 0x4c2232\nLDR             R5, [R5]; __stack_chk_guard                            ; +0xc, 0x4c2234\nLDR             R3, [R5]                                               ; +0xe, 0x4c2236\nSTR             R3, [SP,#0x14+var_8]                                   ; +0x10, 0x4c2238\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x12, 0x4c223a\nLDR.W           R1, [R8,#0x204]; char *                                ; +0x16, 0x4c223e\nBL              _ZN16GameLevelManager21getStoredOnlineLevelsEPKc; GameLevelManager::getStoredOnlineLevels(char const*) ; +0x1a, 0x4c2242\nMOV             R4, R0                                                 ; +0x1e, 0x4c2246\nCMP             R0, #0                                                 ; +0x20, 0x4c2248\nBEQ             loc_4C2332                                             ; +0x22, 0x4c224a\nBL              _ZN7cocos2d7CCArray6createEv; cocos2d::CCArray::create(void) ; +0x24, 0x4c224c\nLDR             R2, [R4,#0x34]                                         ; +0x28, 0x4c2250\nLDR             R3, [R2]                                               ; +0x2a, 0x4c2252\nMOV             R9, R0                                                 ; +0x2c, 0x4c2254\nCBZ             R3, loc_4C2278                                         ; +0x2e, 0x4c2256\nADD.W           R3, R3, #0x40000000                                    ; +0x30, 0x4c2258\nLDR             R7, [R2,#0xC]                                          ; +0x34, 0x4c225c\nSUBS            R3, #1                                                 ; +0x36, 0x4c225e\nMOVS            R6, #0                                                 ; +0x38, 0x4c2260\nMOV             R11, R6                                                ; +0x3a, 0x4c2262\nADD.W           R4, R7, R3,LSL#2                                       ; +0x3c, 0x4c2264\nCMP             R7, R4                                                 ; +0x40, 0x4c2268\nBHI             loc_4C227A                                             ; +0x42, 0x4c226a\nLDR.W           R10, [R7],#4                                           ; +0x44, 0x4c226c\nCMP.W           R10, #0                                                ; +0x48, 0x4c2270\nBNE             loc_4C2312                                             ; +0x4c, 0x4c2274\nB               loc_4C227A                                             ; +0x4e, 0x4c2276\nMOV             R6, R3                                                 ; +0x50, 0x4c2278\nMOV             R0, R9; this                                           ; +0x52, 0x4c227a\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0x54, 0x4c227c\nCMP             R0, #0                                                 ; +0x58, 0x4c2280\nBEQ             loc_4C2332                                             ; +0x5a, 0x4c2282\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x5c, 0x4c2284\nADD.W           R3, R8, #0x1FC                                         ; +0x60, 0x4c2288\nSTR.W           R3, [R0,#0x220]                                        ; +0x64, 0x4c228c\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x68, 0x4c2290\nADD.W           R3, R8, #0x1F4                                         ; +0x6c, 0x4c2294\nSTR.W           R3, [R0,#0x218]                                        ; +0x70, 0x4c2298\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x74, 0x4c229c\nMOVS            R1, #0; int                                            ; +0x78, 0x4c22a0\nMOV             R2, R9; cocos2d::CCArray *                             ; +0x7a, 0x4c22a2\nMOV             R3, R1; bool                                           ; +0x7c, 0x4c22a4\nBL              _ZN16GameLevelManager20deleteFriendRequestsEiPN7cocos2d7CCArrayEb; GameLevelManager::deleteFriendRequests(int,cocos2d::CCArray *,bool) ; +0x7e, 0x4c22a6\nCBZ             R0, loc_4C22DA                                         ; +0x82, 0x4c22aa\nADD             R4, SP, #0x14+var_C                                    ; +0x84, 0x4c22ac\nLDR             R1, =(aDeletingReques - 0x4C22B6); \"Deleting Requests...\" ; +0x86, 0x4c22ae\nADD             R2, SP, #0x14+var_10                                   ; +0x88, 0x4c22b0\nADD             R1, PC; \"Deleting Requests...\"                         ; +0x8a, 0x4c22b2\nMOV             R0, R4; int                                            ; +0x8c, 0x4c22b4\nBL              sub_776584                                             ; +0x8e, 0x4c22b6\nADD.W           R0, R8, #0x1F8                                         ; +0x92, 0x4c22ba\nMOV             R1, R4                                                 ; +0x96, 0x4c22be\nBL              _ZN17UploadActionPopup6createEP19UploadPopupDelegateSs; UploadActionPopup::create(UploadPopupDelegate *,std::string) ; +0x98, 0x4c22c0\nSTR.W           R0, [R8,#0x218]                                        ; +0x9c, 0x4c22c4\nMOV             R0, R4                                                 ; +0xa0, 0x4c22c8\nBL              sub_774008                                             ; +0xa2, 0x4c22ca\nLDR.W           R0, [R8,#0x218]                                        ; +0xa6, 0x4c22ce\nLDR             R3, [R0]                                               ; +0xaa, 0x4c22d2\nLDR.W           R3, [R3,#0x284]                                        ; +0xac, 0x4c22d4\nBLX             R3                                                     ; +0xb0, 0x4c22d8\nCBZ             R6, loc_4C2332                                         ; +0xb2, 0x4c22da\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0xb4, 0x4c22dc\nMOV             R4, R0                                                 ; +0xb8, 0x4c22e0\nBL              _ZN16GJAccountManager11sharedStateEv; GJAccountManager::sharedState(void) ; +0xba, 0x4c22e2\nLDR.W           R1, [R0,#0x110]                                        ; +0xbe, 0x4c22e6\nLDR.W           R3, [R0,#0x114]                                        ; +0xc2, 0x4c22ea\nMOV             R0, R4; this                                           ; +0xc6, 0x4c22ee\nSUBS            R1, R1, R3; int                                        ; +0xc8, 0x4c22f0\nBL              _ZN16GameLevelManager20userInfoForAccountIDEi; GameLevelManager::userInfoForAccountID(int) ; +0xca, 0x4c22f2\nCBZ             R0, loc_4C2332                                         ; +0xce, 0x4c22f6\nLDR.W           R3, [R0,#0x1BC]                                        ; +0xd0, 0x4c22f8\nSUBS            R3, R3, R6                                             ; +0xd4, 0x4c22fc\nBIC.W           R3, R3, R3,ASR#31                                      ; +0xd6, 0x4c22fe\nSTR.W           R3, [R0,#0x1BC]                                        ; +0xda, 0x4c2302\nB               loc_4C2332                                             ; +0xde, 0x4c2306\nMOV             R0, R4                                                 ; +0xe0, 0x4c2308\nBL              sub_774008                                             ; +0xe2, 0x4c230a\nBL              __cxa_end_cleanup                                      ; +0xe6, 0x4c230e\nLDRB.W          R3, [R10,#0x1C5]                                       ; +0xea, 0x4c2312\nCMP             R3, #0                                                 ; +0xee, 0x4c2316\nBEQ             loc_4C2268                                             ; +0xf0, 0x4c2318\nMOV             R0, R9; this                                           ; +0xf2, 0x4c231a\nMOV             R1, R10; cocos2d::CCObject *                           ; +0xf4, 0x4c231c\nBL              _ZN7cocos2d7CCArray9addObjectEPNS_8CCObjectE; cocos2d::CCArray::addObject(cocos2d::CCObject *) ; +0xf6, 0x4c231e\nLDRB.W          R3, [R10,#0x1C4]                                       ; +0xfa, 0x4c2322\nCMP             R3, #0                                                 ; +0xfe, 0x4c2326\nBEQ             loc_4C2268                                             ; +0x100, 0x4c2328\nSTRB.W          R11, [R10,#0x1C4]                                      ; +0x102, 0x4c232a\nADDS            R6, #1                                                 ; +0x106, 0x4c232e\nB               loc_4C2268                                             ; +0x108, 0x4c2330\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x10a, 0x4c2332\nLDR             R3, [R5]                                               ; +0x10c, 0x4c2334\nCMP             R2, R3                                                 ; +0x10e, 0x4c2336\nBEQ             loc_4C233E                                             ; +0x110, 0x4c2338\nBLX             __stack_chk_fail                                       ; +0x112, 0x4c233a\nADD             SP, SP, #0x14                                          ; +0x116, 0x4c233e\nPOP.W           {R4-R11,PC}                                            ; +0x118, 0x4c2340", "xrefs": ["FRequestProfilePage::FLAlert_Clicked @ 0x4c2364"], "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"}