{"type": "func", "start": 9221796, "end": 9222108, "name": "FriendRequestPopup::onAccept", "pseudocode": "// \n// FriendRequestPopup::onAccept from 0x8cb6a4 to 0x8cb7dc (312 bytes)\n// \n// 3 xrefs:\n// > <???> @ 0x70ad0\n// > FriendRequestPopup::loadFromGJFriendRequest @ 0x8cce84\n// > <???> @ 0x122bb68\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::onAccept(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::acceptFriendRequest(v3, a1->m_request->m_accountID, a1->m_request->m_requestID) )\n  {\n    sub_D153B8((int)&v8, \"Accepting 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::onAccept from 0x8cb6a4 to 0x8cb7dc (312 bytes)\n; \n; 3 xrefs:\n; > <???> @ 0x70ad0\n; > FriendRequestPopup::loadFromGJFriendRequest @ 0x8cce84\n; > <???> @ 0x122bb68\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, 0x8cb6a4\nMOV             X29, SP                                                ; +0x4, 0x8cb6a8\nSTP             X19, X20, [SP,#0x50+var_40]                            ; +0x8, 0x8cb6ac\nADRP            X19, #__stack_chk_guard_ptr@PAGE                       ; +0xc, 0x8cb6b0\nMOV             X20, X0                                                ; +0x10, 0x8cb6b4\nSTR             X21, [SP,#0x50+var_30]                                 ; +0x14, 0x8cb6b8\nLDR             X0, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x18, 0x8cb6bc\nLDR             X0, [X0]; this                                         ; +0x1c, 0x8cb6c0\nSTR             X0, [X29,#0x50+var_8]                                  ; +0x20, 0x8cb6c4\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x24, 0x8cb6c8\nLDR             X2, [X20,#0x298]                                       ; +0x28, 0x8cb6cc\nLDR             W1, [X2,#0x140]; int                                   ; +0x2c, 0x8cb6d0\nLDR             W2, [X2,#0x13C]; int                                   ; +0x30, 0x8cb6d4\nBL              _ZN16GameLevelManager19acceptFriendRequestEii; GameLevelManager::acceptFriendRequest(int,int) ; +0x34, 0x8cb6d8\nUXTB            W0, W0                                                 ; +0x38, 0x8cb6dc\nCBNZ            W0, loc_8CB708                                         ; +0x3c, 0x8cb6e0\nLDR             X19, [X19,#__stack_chk_guard_ptr@PAGEOFF]; __stack_chk_guard ; +0x40, 0x8cb6e4\nLDR             X1, [X29,#0x50+var_8]                                  ; +0x44, 0x8cb6e8\nLDR             X0, [X19]                                              ; +0x48, 0x8cb6ec\nCMP             X1, X0                                                 ; +0x4c, 0x8cb6f0\nB.NE            loc_8CB7AC                                             ; +0x50, 0x8cb6f4\nLDP             X19, X20, [SP,#0x50+var_40]                            ; +0x54, 0x8cb6f8\nLDR             X21, [SP,#0x50+var_30]                                 ; +0x58, 0x8cb6fc\nLDP             X29, X30, [SP+0x50+var_50],#0x50                       ; +0x5c, 0x8cb700\nRET                                                                    ; +0x60, 0x8cb704\nADD             X21, X29, #0x50+var_10                                 ; +0x64, 0x8cb708\nADRP            X1, #aAcceptingFrien@PAGE; \"Accepting Friend Request...\" ; +0x68, 0x8cb70c\nMOV             X0, X21; int                                           ; +0x6c, 0x8cb710\nADD             X1, X1, #aAcceptingFrien@PAGEOFF; \"Accepting Friend Request...\" ; +0x70, 0x8cb714\nADD             X2, X29, #0x50+var_20                                  ; +0x74, 0x8cb718\nBL              sub_D153B8                                             ; +0x78, 0x8cb71c\nADD             X0, X20, #0x280                                        ; +0x7c, 0x8cb720\nMOV             X1, X21                                                ; +0x80, 0x8cb724\nBL              _ZN17UploadActionPopup6createEP19UploadPopupDelegateSs; UploadActionPopup::create(UploadPopupDelegate *,std::string) ; +0x84, 0x8cb728\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x88, 0x8cb72c\nSTR             X0, [X20,#0x2B0]                                       ; +0x8c, 0x8cb730\nLDR             X2, [X29,#0x50+var_10]                                 ; +0x90, 0x8cb734\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x94, 0x8cb738\nSUB             X3, X2, #0x18                                          ; +0x98, 0x8cb73c\nCMP             X3, X1                                                 ; +0x9c, 0x8cb740\nB.NE            loc_8CB758                                             ; +0xa0, 0x8cb744\nLDR             X1, [X0]                                               ; +0xa4, 0x8cb748\nLDR             X1, [X1,#0x508]                                        ; +0xa8, 0x8cb74c\nBLR             X1                                                     ; +0xac, 0x8cb750\nB               loc_8CB6E4                                             ; +0xb0, 0x8cb754\nADRP            X0, #pthread_create_ptr_0@PAGE                         ; +0xb4, 0x8cb758\nLDR             X0, [X0,#pthread_create_ptr_0@PAGEOFF]; pthread_create ; +0xb8, 0x8cb75c\nCBZ             X0, loc_8CB79C                                         ; +0xbc, 0x8cb760\nSUB             X2, X2, #8                                             ; +0xc0, 0x8cb764\nLDAXR           W0, [X2]                                               ; +0xc4, 0x8cb768\nSUB             W1, W0, #1                                             ; +0xc8, 0x8cb76c\nSTLXR           W4, W1, [X2]                                           ; +0xcc, 0x8cb770\nCBNZ            W4, loc_8CB768                                         ; +0xd0, 0x8cb774\nCMP             W0, WZR                                                ; +0xd4, 0x8cb778\nB.LE            loc_8CB788                                             ; +0xd8, 0x8cb77c\nLDR             X0, [X20,#0x2B0]                                       ; +0xdc, 0x8cb780\nB               loc_8CB748                                             ; +0xe0, 0x8cb784\nMOV             X0, X3; p                                              ; +0xe4, 0x8cb788\nADD             X1, X29, #0x50+var_18                                  ; +0xe8, 0x8cb78c\nBL              j__ZdlPv; operator delete(void *)                      ; +0xec, 0x8cb790\nLDR             X0, [X20,#0x2B0]                                       ; +0xf0, 0x8cb794\nB               loc_8CB748                                             ; +0xf4, 0x8cb798\nLDUR            W0, [X2,#-8]                                           ; +0xf8, 0x8cb79c\nSUB             W1, W0, #1                                             ; +0xfc, 0x8cb7a0\nSTUR            W1, [X2,#-8]                                           ; +0x100, 0x8cb7a4\nB               loc_8CB778                                             ; +0x104, 0x8cb7a8\nBL              .__stack_chk_fail                                      ; +0x108, 0x8cb7ac\nADRP            X1, #off_122EFE8@PAGE                                  ; +0x10c, 0x8cb7b0\nMOV             X19, X0                                                ; +0x110, 0x8cb7b4\nLDR             X0, [X29,#0x50+var_10]                                 ; +0x114, 0x8cb7b8\nLDR             X1, [X1,#off_122EFE8@PAGEOFF]; qword_124B6B0           ; +0x118, 0x8cb7bc\nSUB             X0, X0, #0x18                                          ; +0x11c, 0x8cb7c0\nCMP             X0, X1                                                 ; +0x120, 0x8cb7c4\nB.EQ            loc_8CB7D4                                             ; +0x124, 0x8cb7c8\nADD             X1, X29, #0x50+var_18                                  ; +0x128, 0x8cb7cc\nBL              sub_4DC698                                             ; +0x12c, 0x8cb7d0\nMOV             X0, X19                                                ; +0x130, 0x8cb7d4\nBL              _Unwind_Resume                                         ; +0x134, 0x8cb7d8", "xrefs": ["<???> @ 0x70ad0", "FriendRequestPopup::loadFromGJFriendRequest @ 0x8cce84", "<???> @ 0x122bb68"], "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"}