{"type": "func", "start": 9222108, "end": 9222424, "name": "FriendRequestPopup::onRemove", "pseudocode": "// \n// FriendRequestPopup::onRemove from 0x8cb7dc to 0x8cb918 (316 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x5cd48\n// > FriendRequestPopup::loadFromGJFriendRequest @ 0x8ccf30\n// > <???> @ 0x122b020\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 FriendRequestPopup::onRemove(FriendRequestPopup *a1, cocos2d::CCObject *a2)\n{\n  GameLevelManager *v3; // x0\n  UploadActionPopup *m_popup; // x0\n  void *v5; // x3\n  unsigned int *v6; // x2\n  int v7; // w0\n  __int64 v8; // [xsp+40h] [xbp+40h] BYREF\n\n  v3 = GameLevelManager::sharedState();\n  if ( GameLevelManager::deleteFriendRequests(v3, a1->m_request->m_accountID, nullptr, 0) )\n  {\n    sub_D153B8((int)&v8, \"Removing Friend Request...\");\n    m_popup = (UploadActionPopup *)UploadActionPopup::create((__int64)&a1->UploadPopupDelegate);\n    a1->m_popup = m_popup;\n    v5 = (void *)(v8 - 24);\n    if ( (__int64 *)(v8 - 24) != &qword_124B6B0 )\n    {\n      if ( &pthread_create )\n      {\n        v6 = (unsigned int *)(v8 - 8);\n        do\n          v7 = __ldaxr(v6);\n        while ( __stlxr(v7 - 1, v6) );\n      }\n      else\n      {\n        v7 = *(_DWORD *)(v8 - 8);\n        *(_DWORD *)(v8 - 8) = v7 - 1;\n      }\n      if ( v7 <= 0 )\n        operator delete(v5);\n      m_popup = a1->m_popup;\n    }\n    m_popup->show(m_popup);\n  }\n}", "assembly": "; \n; FriendRequestPopup::onRemove from 0x8cb7dc to 0x8cb918 (316 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x5cd48\n; > FriendRequestPopup::loadFromGJFriendRequest @ 0x8ccf30\n; > <???> @ 0x122b020\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\nSTP             X29, X30, [SP,#var_50]!                                ; +0x0, 0x8cb7dc\nMOV             X29, SP                                                ; +0x4, 0x8cb7e0\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x8cb7e4\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x8cb7e8\nMOV             X20, X0                                                ; +0x10, 0x8cb7ec\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x14, 0x8cb7f0\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x8cb7f4\nLDR             X0, [X0]; this                                         ; +0x1c, 0x8cb7f8\nSTR             X0, [X29,#0x50+var_8]                                  ; +0x20, 0x8cb7fc\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x24, 0x8cb800\nLDR             X1, [X20,#0x298]                                       ; +0x28, 0x8cb804\nMOV             X2, #0; cocos2d::CCArray *                             ; +0x2c, 0x8cb808\nMOV             W3, #0; bool                                           ; +0x30, 0x8cb80c\nLDR             W1, [X1,#0x140]; int                                   ; +0x34, 0x8cb810\nBL              _ZN16GameLevelManager20deleteFriendRequestsEiPN7cocos2d7CCArrayEb; GameLevelManager::deleteFriendRequests(int,cocos2d::CCArray *,bool) ; +0x38, 0x8cb814\nUXTB            W0, W0                                                 ; +0x3c, 0x8cb818\nCBNZ            W0, loc_8CB844                                         ; +0x40, 0x8cb81c\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x44, 0x8cb820\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x48, 0x8cb824\nLDR             X0, [X19]                                              ; +0x4c, 0x8cb828\nCMP             X1, X0                                                 ; +0x50, 0x8cb82c\nB.NE            loc_8CB8E8                                             ; +0x54, 0x8cb830\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x58, 0x8cb834\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x5c, 0x8cb838\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x60, 0x8cb83c\nRET                                                                    ; +0x64, 0x8cb840\nADD             X21, X29, #0x50+var_10                                 ; +0x68, 0x8cb844\nADRP            X1, #aRemovingFriend_0@PAGE; \"Removing Friend Request...\" ; +0x6c, 0x8cb848\nMOV             X0, X21; int                                           ; +0x70, 0x8cb84c\nADD             X1, X1, #aRemovingFriend_0@PAGEOFF; \"Removing Friend Request...\" ; +0x74, 0x8cb850\nADD             X2, X29, #0x50+var_20                                  ; +0x78, 0x8cb854\nBL              sub_D153B8                                             ; +0x7c, 0x8cb858\nADD             X0, X20, #0x280                                        ; +0x80, 0x8cb85c\nMOV             X1, X21                                                ; +0x84, 0x8cb860\nBL              _ZN17UploadActionPopup6createEP19UploadPopupDelegateSs; UploadActionPopup::create(UploadPopupDelegate *,std::string) ; +0x88, 0x8cb864\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x8c, 0x8cb868\nSTR             X0, [X20,#0x2B0]                                       ; +0x90, 0x8cb86c\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x94, 0x8cb870\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x98, 0x8cb874\nSUB             X3, X2, #0x18                                          ; +0x9c, 0x8cb878\nCMP             X3, X1                                                 ; +0xa0, 0x8cb87c\nB.NE            loc_8CB894                                             ; +0xa4, 0x8cb880\nLDR             X1, [X0]                                               ; +0xa8, 0x8cb884\nLDR             X1, [X1,#0x508]                                        ; +0xac, 0x8cb888\nBLR             X1                                                     ; +0xb0, 0x8cb88c\nB               loc_8CB820                                             ; +0xb4, 0x8cb890\nADRP            X0, #pthread_create_ptr_0@PAGE                         ; +0xb8, 0x8cb894\nLDR             X0, [X0,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xbc, 0x8cb898\nCBZ             X0, loc_8CB8D8                                         ; +0xc0, 0x8cb89c\nSUB             X2, X2, #8                                             ; +0xc4, 0x8cb8a0\nLDAXR           W0, [X2]                                               ; +0xc8, 0x8cb8a4\nSUB             W1, W0, #1                                             ; +0xcc, 0x8cb8a8\nSTLXR           W4, W1, [X2]                                           ; +0xd0, 0x8cb8ac\nCBNZ            W4, loc_8CB8A4                                         ; +0xd4, 0x8cb8b0\nCMP             W0, WZR                                                ; +0xd8, 0x8cb8b4\nB.LE            loc_8CB8C4                                             ; +0xdc, 0x8cb8b8\nLDR             X0, [X20,#0x2B0]                                       ; +0xe0, 0x8cb8bc\nB               loc_8CB884                                             ; +0xe4, 0x8cb8c0\nMOV             X0, X3; p                                              ; +0xe8, 0x8cb8c4\nADD             X1, X29, #0x50+var_18                                  ; +0xec, 0x8cb8c8\nBL              j__ZdlPv; operator delete(void *)                      ; +0xf0, 0x8cb8cc\nLDR             X0, [X20,#0x2B0]                                       ; +0xf4, 0x8cb8d0\nB               loc_8CB884                                             ; +0xf8, 0x8cb8d4\nLDUR            W0, [X2,#-8]                                           ; +0xfc, 0x8cb8d8\nSUB             W1, W0, #1                                             ; +0x100, 0x8cb8dc\nSTUR            W1, [X2,#-8]                                           ; +0x104, 0x8cb8e0\nB               loc_8CB8B4                                             ; +0x108, 0x8cb8e4\nBL              .__stack_chk_fail                                      ; +0x10c, 0x8cb8e8\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x110, 0x8cb8ec\nMOV             X19, X0                                                ; +0x114, 0x8cb8f0\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x118, 0x8cb8f4\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x11c, 0x8cb8f8\nSUB             X0, X0, #0x18                                          ; +0x120, 0x8cb8fc\nCMP             X0, X1                                                 ; +0x124, 0x8cb900\nB.EQ            loc_8CB910                                             ; +0x128, 0x8cb904\nADD             X1, X29, #0x50+var_18                                  ; +0x12c, 0x8cb908\nBL              sub_4DC698                                             ; +0x130, 0x8cb90c\nMOV             X0, X19                                                ; +0x134, 0x8cb910\nBL              _Unwind_Resume                                         ; +0x138, 0x8cb914", "xrefs": ["<???> @ 0x5cd48", "FriendRequestPopup::loadFromGJFriendRequest @ 0x8ccf30", "<???> @ 0x122b020"], "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"}