{"type": "func", "start": 5370154864, "end": 5370155368, "name": "GameLevelManager::onDeleteFriendRequestCompleted", "pseudocode": "// \n// GameLevelManager::onDeleteFriendRequestCompleted from 0x140160f70 to 0x140161168 (504 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::handleIt @ 0x140143691\n// > <???> @ 0x1406cab6c\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\n// Hidden C++ exception states: #wind=3\nvoid __fastcall GameLevelManager::onDeleteFriendRequestCompleted(GameLevelManager *a1, const void **a2, _QWORD *a3)\n{\n  _BYTE *v6; // rbx\n  size_t v7; // r8\n  GameLevelManager *v8; // rcx\n  void *v9; // rcx\n  __int64 SplitIntFromKey; // rsi\n  GameLevelManager *v11; // rcx\n  int v12; // ebp\n  const void *v13; // rcx\n  unsigned __int64 v14; // rbx\n  size_t v15; // r8\n  UploadActionDelegate *m_uploadActionDelegate; // rcx\n  struct cocos2d::CCObject *v17; // rax\n  UserInfoDelegate *m_userInfoDelegate; // rcx\n  UploadActionDelegate *v19; // rcx\n  void *Block[2]; // [rsp+30h] [rbp-68h] BYREF\n  __int128 v21; // [rsp+40h] [rbp-58h]\n\n  v6 = a3;\n  if ( a3[3] > 0xFu )\n    v6 = (_BYTE *)*a3;\n  *(_OWORD *)Block = 0;\n  v21 = 0;\n  v7 = -1;\n  do\n    ++v7;\n  while ( v6[v7] );\n  sub_14003A930(Block, v6, v7);\n  cocos2d::CCDictionary::removeObjectForKey(a1->m_friendReqAndUserBlocks, Block);\n  if ( *((_QWORD *)&v21 + 1) > 0xFu )\n  {\n    v9 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v21 + 1) + 1LL) >= 0x1000 )\n    {\n      v9 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v9 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v9);\n  }\n  SplitIntFromKey = GameLevelManager::getSplitIntFromKey(v8, v6, 1);\n  v12 = GameLevelManager::getSplitIntFromKey(v11, v6, 2);\n  *(_OWORD *)Block = 0;\n  *(_QWORD *)&v21 = 2;\n  *((_QWORD *)&v21 + 1) = 15;\n  strcpy((char *)Block, \"-1\");\n  v13 = a2;\n  if ( (unsigned __int64)a2[3] > 0xF )\n    v13 = *a2;\n  v14 = (unsigned __int64)a2[2];\n  v15 = v14;\n  if ( v14 > 2 )\n    v15 = 2;\n  if ( !memcmp(v13, Block, v15) && v14 == 2 )\n  {\n    m_uploadActionDelegate = a1->m_uploadActionDelegate;\n    if ( m_uploadActionDelegate )\n      m_uploadActionDelegate->uploadActionFailed(m_uploadActionDelegate, SplitIntFromKey, 30);\n  }\n  else\n  {\n    v17 = cocos2d::CCDictionary::objectForKey(a1->m_storedUserInfo, SplitIntFromKey);\n    if ( v17 )\n    {\n      v17[13].m_nTag = 0;\n      m_userInfoDelegate = a1->m_userInfoDelegate;\n      if ( m_userInfoDelegate )\n        m_userInfoDelegate->userInfoChanged(m_userInfoDelegate, (GJUserScore *)v17);\n    }\n    v19 = a1->m_uploadActionDelegate;\n    if ( v19 )\n      v19->uploadActionFinished(v19, SplitIntFromKey, 30);\n    if ( (_DWORD)SplitIntFromKey == -1 )\n      GameLevelManager::invalidateRequests(a1, v12 != 0, 1);\n    else\n      GameLevelManager::friendRequestWasRemoved(a1, SplitIntFromKey, v12 != 0);\n  }\n  sub_14003A830((__int64)a2);\n  sub_14003A830((__int64)a3);\n}", "assembly": "; \n; GameLevelManager::onDeleteFriendRequestCompleted from 0x140160f70 to 0x140161168 (504 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::handleIt @ 0x140143691\n; > <???> @ 0x1406cab6c\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    rbx                                                            ; +0x0, 0x140160f70\npush    rbp                                                            ; +0x2, 0x140160f72\npush    rsi                                                            ; +0x3, 0x140160f73\npush    rdi                                                            ; +0x4, 0x140160f74\npush    r12                                                            ; +0x5, 0x140160f75\npush    r14                                                            ; +0x7, 0x140160f77\npush    r15                                                            ; +0x9, 0x140160f79\nsub     rsp, 60h                                                       ; +0xb, 0x140160f7b\nmov     rax, cs:__security_cookie                                      ; +0xf, 0x140160f7f\nxor     rax, rsp                                                       ; +0x16, 0x140160f86\nmov     [rsp+98h+var_48], rax                                          ; +0x19, 0x140160f89\nmov     r14, r8                                                        ; +0x1e, 0x140160f8e\nmov     r15, rdx                                                       ; +0x21, 0x140160f91\nmov     rdi, rcx                                                       ; +0x24, 0x140160f94\nmov     [rsp+98h+var_78], rdx                                          ; +0x27, 0x140160f97\nmov     [rsp+98h+var_70], r8                                           ; +0x2c, 0x140160f9c\nmov     rbx, r8                                                        ; +0x31, 0x140160fa1\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x34, 0x140160fa4\njbe     short loc_140160FAE                                            ; +0x39, 0x140160fa9\nmov     rbx, [r8]                                                      ; +0x3b, 0x140160fab\nxorps   xmm0, xmm0                                                     ; +0x3e, 0x140160fae\nmovups  xmmword ptr [rsp+98h+Block], xmm0                              ; +0x41, 0x140160fb1\nxorps   xmm1, xmm1                                                     ; +0x46, 0x140160fb6\nmovdqu  [rsp+98h+var_58], xmm1                                         ; +0x49, 0x140160fb9\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x4f, 0x140160fbf\ninc     r8                                                             ; +0x56, 0x140160fc6\ncmp     byte ptr [rbx+r8], 0                                           ; +0x59, 0x140160fc9\njnz     short loc_140160FC6                                            ; +0x5e, 0x140160fce\nmov     rdx, rbx                                                       ; +0x60, 0x140160fd0\nlea     rcx, [rsp+98h+Block]                                           ; +0x63, 0x140160fd3\ncall    sub_14003A930                                                  ; +0x68, 0x140160fd8\nnop                                                                    ; +0x6d, 0x140160fdd\nlea     rdx, [rsp+98h+Block]                                           ; +0x6e, 0x140160fde\nmov     rcx, [rdi+250h]                                                ; +0x73, 0x140160fe3\ncall    cs:?removeObjectForKey@CCDictionary@cocos2d@@QEAAXAEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::removeObjectForKey(std::string const &) ; +0x7a, 0x140160fea\nnop                                                                    ; +0x80, 0x140160ff0\nmov     rdx, qword ptr [rsp+98h+var_58+8]                              ; +0x81, 0x140160ff1\ncmp     rdx, 0Fh                                                       ; +0x86, 0x140160ff6\njbe     short loc_140161031                                            ; +0x8a, 0x140160ffa\ninc     rdx                                                            ; +0x8c, 0x140160ffc\nmov     rcx, [rsp+98h+Block]; Block                                    ; +0x8f, 0x140160fff\nmov     rax, rcx                                                       ; +0x94, 0x140161004\ncmp     rdx, 1000h                                                     ; +0x97, 0x140161007\njb      short loc_14016102C                                            ; +0x9e, 0x14016100e\nadd     rdx, 27h ; '''                                                 ; +0xa0, 0x140161010\nmov     rcx, [rcx-8]                                                   ; +0xa4, 0x140161014\nsub     rax, rcx                                                       ; +0xa8, 0x140161018\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xab, 0x14016101b\ncmp     rax, 1Fh                                                       ; +0xaf, 0x14016101f\njbe     short loc_14016102C                                            ; +0xb3, 0x140161023\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xb5, 0x140161025\nalign 4                                                                ; +0xbb, 0x14016102b\ncall    j_j_free                                                       ; +0xbc, 0x14016102c\nmov     r8d, 1                                                         ; +0xc1, 0x140161031\nmov     rdx, rbx                                                       ; +0xc7, 0x140161037\ncall    GameLevelManager__getSplitIntFromKey                           ; +0xca, 0x14016103a\nmovsxd  rsi, eax                                                       ; +0xcf, 0x14016103f\nmov     r12d, 2                                                        ; +0xd2, 0x140161042\nmov     r8d, r12d                                                      ; +0xd8, 0x140161048\nmov     rdx, rbx                                                       ; +0xdb, 0x14016104b\ncall    GameLevelManager__getSplitIntFromKey                           ; +0xde, 0x14016104e\nmov     ebp, eax                                                       ; +0xe3, 0x140161053\nxorps   xmm0, xmm0                                                     ; +0xe5, 0x140161055\nmovups  xmmword ptr [rsp+98h+Block], xmm0                              ; +0xe8, 0x140161058\nmov     qword ptr [rsp+98h+var_58], r12                                ; +0xed, 0x14016105d\nmov     qword ptr [rsp+98h+var_58+8], 0Fh                              ; +0xf2, 0x140161062\nmov     eax, 312Dh                                                     ; +0xfb, 0x14016106b\nmov     word ptr [rsp+98h+Block], ax                                   ; +0x100, 0x140161070\nmov     byte ptr [rsp+98h+Block+2], 0                                  ; +0x105, 0x140161075\nmov     rcx, r15                                                       ; +0x10a, 0x14016107a\ncmp     qword ptr [r15+18h], 0Fh                                       ; +0x10d, 0x14016107d\njbe     short loc_140161087                                            ; +0x112, 0x140161082\nmov     rcx, [r15]; Buf1                                               ; +0x114, 0x140161084\nmov     rbx, [r15+10h]                                                 ; +0x117, 0x140161087\nmov     r8, rbx                                                        ; +0x11b, 0x14016108b\ncmp     rbx, r12                                                       ; +0x11e, 0x14016108e\ncmova   r8, r12; Size                                                  ; +0x121, 0x140161091\nlea     rdx, [rsp+98h+Block]; Buf2                                     ; +0x125, 0x140161095\ncall    memcmp                                                         ; +0x12a, 0x14016109a\ntest    eax, eax                                                       ; +0x12f, 0x14016109f\njnz     short loc_1401610C8                                            ; +0x131, 0x1401610a1\ncmp     rbx, r12                                                       ; +0x133, 0x1401610a3\njnz     short loc_1401610C8                                            ; +0x136, 0x1401610a6\nmov     rcx, [rdi+328h]                                                ; +0x138, 0x1401610a8\ntest    rcx, rcx                                                       ; +0x13f, 0x1401610af\njz      loc_14016113B                                                  ; +0x142, 0x1401610b2\nmov     rax, [rcx]                                                     ; +0x148, 0x1401610b8\nmov     r8d, 1Eh                                                       ; +0x14b, 0x1401610bb\nmov     edx, esi                                                       ; +0x151, 0x1401610c1\ncall    qword ptr [rax+8]                                              ; +0x153, 0x1401610c3\njmp     short loc_14016113B                                            ; +0x156, 0x1401610c6\nmov     rdx, rsi                                                       ; +0x158, 0x1401610c8\nmov     rcx, [rdi+258h]                                                ; +0x15b, 0x1401610cb\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@_J@Z; cocos2d::CCDictionary::objectForKey(__int64) ; +0x162, 0x1401610d2\ntest    rax, rax                                                       ; +0x168, 0x1401610d8\njz      short loc_1401610FD                                            ; +0x16b, 0x1401610db\nmov     dword ptr [rax+2E8h], 0                                        ; +0x16d, 0x1401610dd\nmov     rcx, [rdi+320h]                                                ; +0x177, 0x1401610e7\ntest    rcx, rcx                                                       ; +0x17e, 0x1401610ee\njz      short loc_1401610FD                                            ; +0x181, 0x1401610f1\nmov     r8, [rcx]                                                      ; +0x183, 0x1401610f3\nmov     rdx, rax                                                       ; +0x186, 0x1401610f6\ncall    qword ptr [r8+10h]                                             ; +0x189, 0x1401610f9\nmov     rcx, [rdi+328h]                                                ; +0x18d, 0x1401610fd\ntest    rcx, rcx                                                       ; +0x194, 0x140161104\njz      short loc_140161116                                            ; +0x197, 0x140161107\nmov     rax, [rcx]                                                     ; +0x199, 0x140161109\nmov     r8d, 1Eh                                                       ; +0x19c, 0x14016110c\nmov     edx, esi                                                       ; +0x1a2, 0x140161112\ncall    qword ptr [rax]                                                ; +0x1a4, 0x140161114\nmov     rcx, rdi                                                       ; +0x1a6, 0x140161116\ncmp     esi, 0FFFFFFFFh                                                ; +0x1a9, 0x140161119\njnz     short loc_14016112D                                            ; +0x1ac, 0x14016111c\ntest    ebp, ebp                                                       ; +0x1ae, 0x14016111e\nsetnz   dl                                                             ; +0x1b0, 0x140161120\nmov     r8b, 1                                                         ; +0x1b3, 0x140161123\ncall    GameLevelManager__invalidateRequests                           ; +0x1b6, 0x140161126\njmp     short loc_14016113B                                            ; +0x1bb, 0x14016112b\ntest    ebp, ebp                                                       ; +0x1bd, 0x14016112d\nsetnz   r8b                                                            ; +0x1bf, 0x14016112f\nmov     edx, esi                                                       ; +0x1c3, 0x140161133\ncall    GameLevelManager__friendRequestWasRemoved                      ; +0x1c5, 0x140161135\nnop                                                                    ; +0x1ca, 0x14016113a\nmov     rcx, r15                                                       ; +0x1cb, 0x14016113b\ncall    sub_14003A830                                                  ; +0x1ce, 0x14016113e\nnop                                                                    ; +0x1d3, 0x140161143\nmov     rcx, r14                                                       ; +0x1d4, 0x140161144\ncall    sub_14003A830                                                  ; +0x1d7, 0x140161147\nmov     rcx, [rsp+98h+var_48]                                          ; +0x1dc, 0x14016114c\nxor     rcx, rsp; StackCookie                                          ; +0x1e1, 0x140161151\ncall    __security_check_cookie                                        ; +0x1e4, 0x140161154\nadd     rsp, 60h                                                       ; +0x1e9, 0x140161159\npop     r15                                                            ; +0x1ed, 0x14016115d\npop     r14                                                            ; +0x1ef, 0x14016115f\npop     r12                                                            ; +0x1f1, 0x140161161\npop     rdi                                                            ; +0x1f3, 0x140161163\npop     rsi                                                            ; +0x1f4, 0x140161164\npop     rbp                                                            ; +0x1f5, 0x140161165\npop     rbx                                                            ; +0x1f6, 0x140161166\nretn                                                                   ; +0x1f7, 0x140161167", "xrefs": ["GameLevelManager::handleIt @ 0x140143691", "<???> @ 0x1406cab6c"], "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"}