{"type": "func", "start": 4297422704, "end": 4297422949, "name": "GJRequestCell::onViewFriendRequest", "pseudocode": "// \n// GJRequestCell::onViewFriendRequest from 0x100257770 to 0x100257865 (245 bytes)\n// \n// 1 xrefs:\n// > GJRequestCell::loadFromScore @ 0x10024c602\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::onViewFriendRequest(GJRequestCell *a1, cocos2d::CCObject *a2)\n{\n  GJUserScore *m_score; // rax\n  GameLevelManager *v3; // rax\n  GJFriendRequest *v4; // rax\n  GJFriendRequest *v5; // r14\n  __int64 v6; // rax\n  GameLevelManager *v7; // rbx\n  GJAccountManager *v8; // rax\n  GJUserScore *v9; // rcx\n  int m_friendReqCount; // esi\n  FriendRequestPopup *v11; // rax\n\n  m_score = a1->m_score;\n  if ( m_score )\n  {\n    if ( m_score->m_accountID > 0 )\n    {\n      v3 = GameLevelManager::sharedState();\n      v4 = GameLevelManager::friendRequestFromAccountID(v3, a1->m_score->m_accountID);\n      if ( v4 )\n      {\n        if ( a1->m_score->m_newFriendRequest )\n        {\n          v5 = v4;\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          v4 = v5;\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        v11 = FriendRequestPopup::create(v4);\n        ((void (__fastcall *)(FriendRequestPopup *))v11->show)(v11);\n      }\n    }\n  }\n}", "assembly": "; \n; GJRequestCell::onViewFriendRequest from 0x100257770 to 0x100257865 (245 bytes)\n; \n; 1 xrefs:\n; > GJRequestCell::loadFromScore @ 0x10024c602\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, 0x100257770\nmov     rbp, rsp                                                       ; +0x1, 0x100257771\npush    r14                                                            ; +0x4, 0x100257774\npush    rbx                                                            ; +0x6, 0x100257776\nmov     rax, [rdi+240h]                                                ; +0x7, 0x100257777\ntest    rax, rax                                                       ; +0xe, 0x10025777e\njz      loc_100257860                                                  ; +0x11, 0x100257781\ncmp     dword ptr [rax+178h], 0                                        ; +0x17, 0x100257787\njle     loc_100257860                                                  ; +0x1e, 0x10025778e\nmov     rbx, rdi                                                       ; +0x24, 0x100257794\ncall    GameLevelManager__sharedState                                  ; +0x27, 0x100257797\nmov     rcx, [rbx+240h]                                                ; +0x2c, 0x10025779c\nmov     esi, [rcx+178h]                                                ; +0x33, 0x1002577a3\nmov     rdi, rax                                                       ; +0x39, 0x1002577a9\ncall    GameLevelManager__friendRequestFromAccountID                   ; +0x3c, 0x1002577ac\ntest    rax, rax                                                       ; +0x41, 0x1002577b1\njz      loc_100257860                                                  ; +0x44, 0x1002577b4\nmov     rcx, [rbx+240h]                                                ; +0x4a, 0x1002577ba\ncmp     byte ptr [rcx+2B0h], 1                                         ; +0x51, 0x1002577c1\njnz     short loc_100257848                                            ; +0x58, 0x1002577c8\nmov     r14, rax                                                       ; +0x5a, 0x1002577ca\nmov     rdi, [rbx+218h]                                                ; +0x5d, 0x1002577cd\nmov     rax, [rdi]                                                     ; +0x64, 0x1002577d4\nmov     esi, 64h ; 'd'                                                 ; +0x67, 0x1002577d7\ncall    qword ptr [rax+1D0h]                                           ; +0x6c, 0x1002577dc\ntest    rax, rax                                                       ; +0x72, 0x1002577e2\njz      short loc_1002577F5                                            ; +0x75, 0x1002577e5\nmov     rcx, [rax]                                                     ; +0x77, 0x1002577e7\nmov     rdi, rax                                                       ; +0x7a, 0x1002577ea\nxor     esi, esi                                                       ; +0x7d, 0x1002577ed\ncall    qword ptr [rcx+148h]                                           ; +0x7f, 0x1002577ef\nmov     rax, [rbx+240h]                                                ; +0x85, 0x1002577f5\nmov     byte ptr [rax+2B0h], 0                                         ; +0x8c, 0x1002577fc\ncall    GameLevelManager__sharedState                                  ; +0x93, 0x100257803\nmov     rbx, rax                                                       ; +0x98, 0x100257808\ncall    GJAccountManager__sharedState                                  ; +0x9b, 0x10025780b\nmov     esi, [rax+160h]                                                ; +0xa0, 0x100257810\nsub     esi, [rax+164h]                                                ; +0xa6, 0x100257816\nmov     rdi, rbx                                                       ; +0xac, 0x10025781c\ncall    GameLevelManager__userInfoForAccountID                         ; +0xaf, 0x10025781f\nmov     rcx, rax                                                       ; +0xb4, 0x100257824\ntest    rax, rax                                                       ; +0xb7, 0x100257827\nmov     rax, r14                                                       ; +0xba, 0x10025782a\njz      short loc_100257848                                            ; +0xbd, 0x10025782d\nmov     edx, [rcx+2A8h]                                                ; +0xbf, 0x10025782f\ncmp     edx, 2                                                         ; +0xc5, 0x100257835\nmov     esi, 1                                                         ; +0xc8, 0x100257838\ncmovge  esi, edx                                                       ; +0xcd, 0x10025783d\ndec     esi                                                            ; +0xd0, 0x100257840\nmov     [rcx+2A8h], esi                                                ; +0xd2, 0x100257842\nmov     rdi, rax                                                       ; +0xd8, 0x100257848\ncall    FriendRequestPopup__create                                     ; +0xdb, 0x10025784b\nmov     rcx, [rax]                                                     ; +0xe0, 0x100257850\nmov     rdi, rax                                                       ; +0xe3, 0x100257853\npop     rbx                                                            ; +0xe6, 0x100257856\npop     r14                                                            ; +0xe7, 0x100257857\npop     rbp                                                            ; +0xe9, 0x100257859\njmp     qword ptr [rcx+508h]                                           ; +0xea, 0x10025785a\npop     rbx                                                            ; +0xf0, 0x100257860\npop     r14                                                            ; +0xf1, 0x100257861\npop     rbp                                                            ; +0xf3, 0x100257863\nretn                                                                   ; +0xf4, 0x100257864", "xrefs": ["GJRequestCell::loadFromScore @ 0x10024c602"], "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"}