{"type": "func", "start": 4297423632, "end": 4297424032, "name": "GJRequestCell::FLAlert_Clicked", "pseudocode": "// \n// GJRequestCell::FLAlert_Clicked from 0x100257b10 to 0x100257ca0 (400 bytes)\n// \n// 2 xrefs:\n// > sub_100257CC0 @ 0x100257ccc\n// > <???> @ 0x1008e8698\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 __fastcall GJRequestCell::FLAlert_Clicked(GJRequestCell *a1, FLAlertLayer *a2, bool a3)\n{\n  GameLevelManager *v3; // rax\n  GJFriendRequest *v4; // rax\n  GJFriendRequest *v5; // r14\n  __int64 v6; // rax\n  GameLevelManager *v7; // r15\n  GJAccountManager *v8; // rax\n  GJUserScore *v9; // rax\n  int m_friendReqCount; // edx\n  GameLevelManager *v11; // rax\n  UploadActionPopup *m_popup; // rax\n  _QWORD v13[2]; // [rsp+0h] [rbp-30h] BYREF\n  void *__p; // [rsp+10h] [rbp-20h]\n\n  if ( a3 && ((unsigned int (__fastcall *)(FLAlertLayer *))a2->getTag)(a2) == 1 )\n  {\n    if ( a1->m_score )\n    {\n      v3 = GameLevelManager::sharedState();\n      v4 = GameLevelManager::friendRequestFromAccountID(v3, a1->m_score->m_accountID);\n      if ( v4 )\n      {\n        v5 = v4;\n        if ( a1->m_score->m_newFriendRequest )\n        {\n          v6 = ((__int64 (__fastcall *)(cocos2d::CCLayer *, __int64))a1->m_mainLayer->getChildByTag)(\n                 a1->m_mainLayer,\n                 100);\n          if ( v6 )\n            (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)v6 + 328LL))(v6, 0);\n          a1->m_score->m_newFriendRequest = 0;\n          v7 = GameLevelManager::sharedState();\n          v8 = GJAccountManager::sharedState();\n          v9 = GameLevelManager::userInfoForAccountID(v7, v8->m_accountID - v8->m_unkInt1);\n          if ( v9 )\n          {\n            m_friendReqCount = 1;\n            if ( v9->m_friendReqCount >= 2 )\n              m_friendReqCount = v9->m_friendReqCount;\n            v9->m_friendReqCount = m_friendReqCount - 1;\n          }\n        }\n        GameLevelManager::sharedState()->m_uploadActionDelegate = &a1->UploadActionDelegate;\n        v11 = GameLevelManager::sharedState();\n        if ( GameLevelManager::deleteFriendRequests(v11, v5->m_accountID, nullptr, 0) )\n        {\n          __p = operator new(0x20u);\n          v13[0] = 33;\n          v13[1] = 26;\n          strcpy((char *)__p, \"Removing Friend Request...\");\n          m_popup = (UploadActionPopup *)UploadActionPopup::create(&a1->UploadPopupDelegate, v13);\n          a1->m_popup = m_popup;\n          if ( (v13[0] & 1) != 0 )\n          {\n            operator delete(__p);\n            m_popup = a1->m_popup;\n          }\n          ((void (__fastcall *)(UploadActionPopup *))m_popup->show)(m_popup);\n        }\n      }\n    }\n  }\n}", "assembly": "; \n; GJRequestCell::FLAlert_Clicked from 0x100257b10 to 0x100257ca0 (400 bytes)\n; \n; 2 xrefs:\n; > sub_100257CC0 @ 0x100257ccc\n; > <???> @ 0x1008e8698\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    rbp                                                            ; +0x0, 0x100257b10\nmov     rbp, rsp                                                       ; +0x1, 0x100257b11\npush    r15                                                            ; +0x4, 0x100257b14\npush    r14                                                            ; +0x6, 0x100257b16\npush    rbx                                                            ; +0x8, 0x100257b18\nsub     rsp, 18h                                                       ; +0x9, 0x100257b19\ntest    edx, edx                                                       ; +0xd, 0x100257b1d\njz      loc_100257C95                                                  ; +0xf, 0x100257b1f\nmov     rbx, rdi                                                       ; +0x15, 0x100257b25\nmov     rax, [rsi]                                                     ; +0x18, 0x100257b28\nmov     rdi, rsi                                                       ; +0x1b, 0x100257b2b\ncall    qword ptr [rax+40h]                                            ; +0x1e, 0x100257b2e\ncmp     eax, 1                                                         ; +0x21, 0x100257b31\njnz     loc_100257C95                                                  ; +0x24, 0x100257b34\ncmp     qword ptr [rbx+240h], 0                                        ; +0x2a, 0x100257b3a\njz      loc_100257C95                                                  ; +0x32, 0x100257b42\ncall    GameLevelManager__sharedState                                  ; +0x38, 0x100257b48\nmov     rcx, [rbx+240h]                                                ; +0x3d, 0x100257b4d\nmov     esi, [rcx+178h]                                                ; +0x44, 0x100257b54\nmov     rdi, rax                                                       ; +0x4a, 0x100257b5a\ncall    GameLevelManager__friendRequestFromAccountID                   ; +0x4d, 0x100257b5d\ntest    rax, rax                                                       ; +0x52, 0x100257b62\njz      loc_100257C95                                                  ; +0x55, 0x100257b65\nmov     r14, rax                                                       ; +0x5b, 0x100257b6b\nmov     rax, [rbx+240h]                                                ; +0x5e, 0x100257b6e\ncmp     byte ptr [rax+2B0h], 1                                         ; +0x65, 0x100257b75\njnz     short loc_100257BF3                                            ; +0x6c, 0x100257b7c\nmov     rdi, [rbx+218h]                                                ; +0x6e, 0x100257b7e\nmov     rax, [rdi]                                                     ; +0x75, 0x100257b85\nmov     esi, 64h ; 'd'                                                 ; +0x78, 0x100257b88\ncall    qword ptr [rax+1D0h]                                           ; +0x7d, 0x100257b8d\ntest    rax, rax                                                       ; +0x83, 0x100257b93\njz      short loc_100257BA6                                            ; +0x86, 0x100257b96\nmov     rcx, [rax]                                                     ; +0x88, 0x100257b98\nmov     rdi, rax                                                       ; +0x8b, 0x100257b9b\nxor     esi, esi                                                       ; +0x8e, 0x100257b9e\ncall    qword ptr [rcx+148h]                                           ; +0x90, 0x100257ba0\nmov     rax, [rbx+240h]                                                ; +0x96, 0x100257ba6\nmov     byte ptr [rax+2B0h], 0                                         ; +0x9d, 0x100257bad\ncall    GameLevelManager__sharedState                                  ; +0xa4, 0x100257bb4\nmov     r15, rax                                                       ; +0xa9, 0x100257bb9\ncall    GJAccountManager__sharedState                                  ; +0xac, 0x100257bbc\nmov     esi, [rax+160h]                                                ; +0xb1, 0x100257bc1\nsub     esi, [rax+164h]                                                ; +0xb7, 0x100257bc7\nmov     rdi, r15                                                       ; +0xbd, 0x100257bcd\ncall    GameLevelManager__userInfoForAccountID                         ; +0xc0, 0x100257bd0\ntest    rax, rax                                                       ; +0xc5, 0x100257bd5\njz      short loc_100257BF3                                            ; +0xc8, 0x100257bd8\nmov     ecx, [rax+2A8h]                                                ; +0xca, 0x100257bda\ncmp     ecx, 2                                                         ; +0xd0, 0x100257be0\nmov     edx, 1                                                         ; +0xd3, 0x100257be3\ncmovge  edx, ecx                                                       ; +0xd8, 0x100257be8\ndec     edx                                                            ; +0xdb, 0x100257beb\nmov     [rax+2A8h], edx                                                ; +0xdd, 0x100257bed\ncall    GameLevelManager__sharedState                                  ; +0xe3, 0x100257bf3\nlea     rcx, [rbx+238h]                                                ; +0xe8, 0x100257bf8\nmov     [rax+328h], rcx                                                ; +0xef, 0x100257bff\ncall    GameLevelManager__sharedState                                  ; +0xf6, 0x100257c06\nmov     esi, [r14+140h]                                                ; +0xfb, 0x100257c0b\nmov     rdi, rax                                                       ; +0x102, 0x100257c12\nxor     edx, edx                                                       ; +0x105, 0x100257c15\nxor     ecx, ecx                                                       ; +0x107, 0x100257c17\ncall    GameLevelManager__deleteFriendRequests                         ; +0x109, 0x100257c19\ntest    al, al                                                         ; +0x10e, 0x100257c1e\njz      short loc_100257C95                                            ; +0x110, 0x100257c20\nlea     r14, [rbx+230h]                                                ; +0x112, 0x100257c22\nmov     edi, 20h ; ' '; __sz                                           ; +0x119, 0x100257c29\ncall    __Znwm; operator new(ulong)                                    ; +0x11e, 0x100257c2e\nmov     [rbp+__p], rax                                                 ; +0x123, 0x100257c33\nmov     [rbp+var_30], 21h ; '!'                                        ; +0x127, 0x100257c37\nmov     [rbp+var_28], 1Ah                                              ; +0x12f, 0x100257c3f\nmovups  xmm0, xmmword ptr cs:aRemovingFriend_0+0Ah; \"riend Request...\" ; +0x137, 0x100257c47\nmovups  xmmword ptr [rax+0Ah], xmm0                                    ; +0x13e, 0x100257c4e\nmovups  xmm0, xmmword ptr cs:aRemovingFriend_0; \"Removing Friend Request...\" ; +0x142, 0x100257c52\nmovups  xmmword ptr [rax], xmm0                                        ; +0x149, 0x100257c59\nmov     byte ptr [rax+1Ah], 0                                          ; +0x14c, 0x100257c5c\nlea     rsi, [rbp+var_30]                                              ; +0x150, 0x100257c60\nmov     rdi, r14                                                       ; +0x154, 0x100257c64\ncall    UploadActionPopup__create                                      ; +0x157, 0x100257c67\nmov     [rbx+248h], rax                                                ; +0x15c, 0x100257c6c\ntest    byte ptr [rbp+var_30], 1                                       ; +0x163, 0x100257c73\njz      short loc_100257C89                                            ; +0x167, 0x100257c77\nmov     rdi, [rbp+__p]; __p                                            ; +0x169, 0x100257c79\ncall    __ZdlPv; operator delete(void *)                               ; +0x16d, 0x100257c7d\nmov     rax, [rbx+248h]                                                ; +0x172, 0x100257c82\nmov     rcx, [rax]                                                     ; +0x179, 0x100257c89\nmov     rdi, rax                                                       ; +0x17c, 0x100257c8c\ncall    qword ptr [rcx+508h]                                           ; +0x17f, 0x100257c8f\nadd     rsp, 18h                                                       ; +0x185, 0x100257c95\npop     rbx                                                            ; +0x189, 0x100257c99\npop     r14                                                            ; +0x18a, 0x100257c9a\npop     r15                                                            ; +0x18c, 0x100257c9c\npop     rbp                                                            ; +0x18e, 0x100257c9e\nretn                                                                   ; +0x18f, 0x100257c9f", "xrefs": ["sub_100257CC0 @ 0x100257ccc", "<???> @ 0x1008e8698"], "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"}