{"type": "func", "start": 5370164128, "end": 5370164563, "name": "GameLevelManager::friendRequestWasRemoved", "pseudocode": "// \n// GameLevelManager::friendRequestWasRemoved from 0x1401633a0 to 0x140163553 (435 bytes)\n// \n// 4 xrefs:\n// > GameLevelManager::onDeleteFriendRequestCompleted @ 0x140161135\n// > GameLevelManager::onAcceptFriendRequestCompleted @ 0x14016163b\n// > GameLevelManager::onBlockUserCompleted @ 0x1401623ac\n// > <???> @ 0x1406cac38\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 GameLevelManager::friendRequestWasRemoved(GameLevelManager *a1, int a2, bool a3)\n{\n  char v5; // si\n  int v6; // r12d\n  BOOL v7; // eax\n  cocos2d::CCString *v8; // rax\n  const char *CString; // rbp\n  char v10; // r14\n  cocos2d::CCArray *StoredOnlineLevels; // rax\n  cocos2d::CCArray *v12; // rdi\n  unsigned int v13; // ebx\n  FriendRequestDelegate *m_friendRequestDelegate; // rcx\n  size_t v15; // r8\n  void *v16; // rcx\n  BOOL i; // [rsp+20h] [rbp-68h]\n  __int128 v18; // [rsp+28h] [rbp-60h] BYREF\n  __int64 v19; // [rsp+38h] [rbp-50h]\n  unsigned __int64 v20; // [rsp+40h] [rbp-48h]\n\n  v5 = 1;\n  v6 = 0;\n  v7 = a3;\n  for ( i = a3; ; v7 = i )\n  {\n    v8 = cocos2d::CCString::createWithFormat(\"fReq_%i_%i\", v7, v6);\n    CString = cocos2d::CCString::getCString(v8);\n    v10 = 0;\n    StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(a1, CString);\n    v12 = StoredOnlineLevels;\n    if ( !StoredOnlineLevels )\n      break;\n    v13 = 0;\n    if ( cocos2d::CCArray::count(StoredOnlineLevels) )\n    {\n      while ( LODWORD(cocos2d::CCArray::objectAtIndex(v12, v13)[7].__vftable) != a2 )\n      {\n        if ( ++v13 >= cocos2d::CCArray::count(v12) )\n          goto LABEL_8;\n      }\n      v10 = 1;\n      v5 = 0;\n      cocos2d::CCArray::removeObjectAtIndex(v12, v13, 1);\n    }\nLABEL_8:\n    ++v6;\n    if ( v10 )\n    {\n      m_friendRequestDelegate = a1->m_friendRequestDelegate;\n      if ( m_friendRequestDelegate )\n      {\n        m_friendRequestDelegate->loadFRequestsFinished(m_friendRequestDelegate, v12, CString);\n        if ( !cocos2d::CCArray::count(v12) )\n        {\n          v18 = 0;\n          v19 = 0;\n          v20 = 0;\n          v15 = -1;\n          do\n            ++v15;\n          while ( CString[v15] );\n          sub_14003A930(&v18, CString, v15);\n          cocos2d::CCDictionary::removeObjectForKey(a1->m_storedLevels, &v18);\n          if ( v20 > 0xF )\n          {\n            v16 = (void *)v18;\n            if ( v20 + 1 >= 0x1000 )\n            {\n              v16 = *(void **)(v18 - 8);\n              if ( (unsigned __int64)(v18 - (_QWORD)v16 - 8) > 0x1F )\n                invalid_parameter_noinfo_noreturn();\n            }\n            j_j_free(v16);\n          }\n        }\n      }\n    }\n    if ( !v5 )\n      break;\n  }\n}", "assembly": "; \n; GameLevelManager::friendRequestWasRemoved from 0x1401633a0 to 0x140163553 (435 bytes)\n; \n; 4 xrefs:\n; > GameLevelManager::onDeleteFriendRequestCompleted @ 0x140161135\n; > GameLevelManager::onAcceptFriendRequestCompleted @ 0x14016163b\n; > GameLevelManager::onBlockUserCompleted @ 0x1401623ac\n; > <???> @ 0x1406cac38\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\nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1401633a0\npush    rbp                                                            ; +0x5, 0x1401633a5\npush    rsi                                                            ; +0x6, 0x1401633a6\npush    rdi                                                            ; +0x7, 0x1401633a7\npush    r12                                                            ; +0x8, 0x1401633a8\npush    r13                                                            ; +0xa, 0x1401633aa\npush    r14                                                            ; +0xc, 0x1401633ac\npush    r15                                                            ; +0xe, 0x1401633ae\nsub     rsp, 50h                                                       ; +0x10, 0x1401633b0\nmov     rax, cs:__security_cookie                                      ; +0x14, 0x1401633b4\nxor     rax, rsp                                                       ; +0x1b, 0x1401633bb\nmov     [rsp+88h+var_40], rax                                          ; +0x1e, 0x1401633be\nmov     r15d, edx                                                      ; +0x23, 0x1401633c3\nmov     r13, rcx                                                       ; +0x26, 0x1401633c6\nmov     sil, 1                                                         ; +0x29, 0x1401633c9\nxor     r12d, r12d                                                     ; +0x2c, 0x1401633cc\nmovzx   eax, r8b                                                       ; +0x2f, 0x1401633cf\nmov     [rsp+88h+var_68], eax                                          ; +0x33, 0x1401633d3\nnop     word ptr [rax+rax+00000000h]                                   ; +0x37, 0x1401633d7\nmov     r8d, r12d                                                      ; +0x40, 0x1401633e0\nmov     edx, eax                                                       ; +0x43, 0x1401633e3\nlea     rcx, aFreqII; \"fReq_%i_%i\"                                     ; +0x45, 0x1401633e5\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x4c, 0x1401633ec\nmov     rcx, rax                                                       ; +0x52, 0x1401633f2\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x55, 0x1401633f5\nmov     rbp, rax                                                       ; +0x5b, 0x1401633fb\nxor     r14b, r14b                                                     ; +0x5e, 0x1401633fe\nmov     rdx, rax                                                       ; +0x61, 0x140163401\nmov     rcx, r13                                                       ; +0x64, 0x140163404\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x67, 0x140163407\nmov     rdi, rax                                                       ; +0x6c, 0x14016340c\ntest    rax, rax                                                       ; +0x6f, 0x14016340f\njz      loc_14016352E                                                  ; +0x72, 0x140163412\nxor     ebx, ebx                                                       ; +0x78, 0x140163418\nmov     rcx, rax                                                       ; +0x7a, 0x14016341a\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7d, 0x14016341d\ntest    eax, eax                                                       ; +0x83, 0x140163423\njz      short loc_140163467                                            ; +0x85, 0x140163425\nnop     word ptr [rax+rax+00000000h]                                   ; +0x87, 0x140163427\nmov     edx, ebx                                                       ; +0x90, 0x140163430\nmov     rcx, rdi                                                       ; +0x92, 0x140163432\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x95, 0x140163435\nmov     rcx, rdi                                                       ; +0x9b, 0x14016343b\ncmp     [rax+188h], r15d                                               ; +0x9e, 0x14016343e\njz      short loc_140163455                                            ; +0xa5, 0x140163445\ninc     ebx                                                            ; +0xa7, 0x140163447\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa9, 0x140163449\ncmp     ebx, eax                                                       ; +0xaf, 0x14016344f\njb      short loc_140163430                                            ; +0xb1, 0x140163451\njmp     short loc_140163467                                            ; +0xb3, 0x140163453\nmov     r14b, 1                                                        ; +0xb5, 0x140163455\nxor     sil, sil                                                       ; +0xb8, 0x140163458\nmovzx   r8d, r14b                                                      ; +0xbb, 0x14016345b\nmov     edx, ebx                                                       ; +0xbf, 0x14016345f\ncall    cs:?removeObjectAtIndex@CCArray@cocos2d@@QEAAXI_N@Z; cocos2d::CCArray::removeObjectAtIndex(uint,bool) ; +0xc1, 0x140163461\ninc     r12d                                                           ; +0xc7, 0x140163467\ntest    r14b, r14b                                                     ; +0xca, 0x14016346a\njz      loc_140163519                                                  ; +0xcd, 0x14016346d\nmov     rcx, [r13+338h]                                                ; +0xd3, 0x140163473\ntest    rcx, rcx                                                       ; +0xda, 0x14016347a\njz      loc_140163519                                                  ; +0xdd, 0x14016347d\nmov     rax, [rcx]                                                     ; +0xe3, 0x140163483\nmov     r8, rbp                                                        ; +0xe6, 0x140163486\nmov     rdx, rdi                                                       ; +0xe9, 0x140163489\ncall    qword ptr [rax]                                                ; +0xec, 0x14016348c\nmov     rcx, rdi                                                       ; +0xee, 0x14016348e\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xf1, 0x140163491\ntest    eax, eax                                                       ; +0xf7, 0x140163497\njnz     short loc_140163519                                            ; +0xf9, 0x140163499\nxorps   xmm0, xmm0                                                     ; +0xfb, 0x14016349b\nmovups  [rsp+88h+var_60], xmm0                                         ; +0xfe, 0x14016349e\nxor     eax, eax                                                       ; +0x103, 0x1401634a3\nmov     [rsp+88h+var_50], rax                                          ; +0x105, 0x1401634a5\nmov     [rsp+88h+var_48], rax                                          ; +0x10a, 0x1401634aa\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x10f, 0x1401634af\ninc     r8                                                             ; +0x116, 0x1401634b6\ncmp     [r8+rbp], al                                                   ; +0x119, 0x1401634b9\njnz     short loc_1401634B6                                            ; +0x11d, 0x1401634bd\nmov     rdx, rbp                                                       ; +0x11f, 0x1401634bf\nlea     rcx, [rsp+88h+var_60]                                          ; +0x122, 0x1401634c2\ncall    sub_14003A930                                                  ; +0x127, 0x1401634c7\nnop                                                                    ; +0x12c, 0x1401634cc\nlea     rdx, [rsp+88h+var_60]                                          ; +0x12d, 0x1401634cd\nmov     rcx, [r13+220h]                                                ; +0x132, 0x1401634d2\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 &) ; +0x139, 0x1401634d9\nnop                                                                    ; +0x13f, 0x1401634df\nmov     rdx, [rsp+88h+var_48]                                          ; +0x140, 0x1401634e0\ncmp     rdx, 0Fh                                                       ; +0x145, 0x1401634e5\njbe     short loc_140163519                                            ; +0x149, 0x1401634e9\ninc     rdx                                                            ; +0x14b, 0x1401634eb\nmov     rcx, qword ptr [rsp+88h+var_60]                                ; +0x14e, 0x1401634ee\nmov     rax, rcx                                                       ; +0x153, 0x1401634f3\ncmp     rdx, 1000h                                                     ; +0x156, 0x1401634f6\njb      short loc_140163514                                            ; +0x15d, 0x1401634fd\nadd     rdx, 27h ; '''                                                 ; +0x15f, 0x1401634ff\nmov     rcx, [rcx-8]; Block                                            ; +0x163, 0x140163503\nsub     rax, rcx                                                       ; +0x167, 0x140163507\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x16a, 0x14016350a\ncmp     rax, 1Fh                                                       ; +0x16e, 0x14016350e\nja      short loc_140163527                                            ; +0x172, 0x140163512\ncall    j_j_free                                                       ; +0x174, 0x140163514\ntest    sil, sil                                                       ; +0x179, 0x140163519\njz      short loc_14016352E                                            ; +0x17c, 0x14016351c\nmov     eax, [rsp+88h+var_68]                                          ; +0x17e, 0x14016351e\njmp     loc_1401633E0                                                  ; +0x182, 0x140163522\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x187, 0x140163527\nalign 2                                                                ; +0x18d, 0x14016352d\nmov     rcx, [rsp+88h+var_40]                                          ; +0x18e, 0x14016352e\nxor     rcx, rsp; StackCookie                                          ; +0x193, 0x140163533\ncall    __security_check_cookie                                        ; +0x196, 0x140163536\nmov     rbx, [rsp+88h+arg_8]                                           ; +0x19b, 0x14016353b\nadd     rsp, 50h                                                       ; +0x1a3, 0x140163543\npop     r15                                                            ; +0x1a7, 0x140163547\npop     r14                                                            ; +0x1a9, 0x140163549\npop     r13                                                            ; +0x1ab, 0x14016354b\npop     r12                                                            ; +0x1ad, 0x14016354d\npop     rdi                                                            ; +0x1af, 0x14016354f\npop     rsi                                                            ; +0x1b0, 0x140163550\npop     rbp                                                            ; +0x1b1, 0x140163551\nretn                                                                   ; +0x1b2, 0x140163552", "xrefs": ["GameLevelManager::onDeleteFriendRequestCompleted @ 0x140161135", "GameLevelManager::onAcceptFriendRequestCompleted @ 0x14016163b", "GameLevelManager::onBlockUserCompleted @ 0x1401623ac", "<???> @ 0x1406cac38"], "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"}