{"type": "func", "start": 5370133232, "end": 5370133667, "name": "GameLevelManager::messageWasRemoved", "pseudocode": "// \n// GameLevelManager::messageWasRemoved from 0x14015baf0 to 0x14015bca3 (435 bytes)\n// \n// 2 xrefs:\n// > GameLevelManager::onDeleteUserMessagesCompleted @ 0x14015ba92\n// > <???> @ 0x1406caa4c\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=1\nvoid GameLevelManager::messageWasRemoved(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  MessageListDelegate *m_messageListDelegate; // 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(\"messages_%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 ( cocos2d::CCArray::objectAtIndex(v12, v13)[5].m_unknown2 != 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_messageListDelegate = a1->m_messageListDelegate;\n      if ( m_messageListDelegate )\n      {\n        m_messageListDelegate->loadMessagesFinished(m_messageListDelegate, 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::messageWasRemoved from 0x14015baf0 to 0x14015bca3 (435 bytes)\n; \n; 2 xrefs:\n; > GameLevelManager::onDeleteUserMessagesCompleted @ 0x14015ba92\n; > <???> @ 0x1406caa4c\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, 0x14015baf0\npush    rbp                                                            ; +0x5, 0x14015baf5\npush    rsi                                                            ; +0x6, 0x14015baf6\npush    rdi                                                            ; +0x7, 0x14015baf7\npush    r12                                                            ; +0x8, 0x14015baf8\npush    r13                                                            ; +0xa, 0x14015bafa\npush    r14                                                            ; +0xc, 0x14015bafc\npush    r15                                                            ; +0xe, 0x14015bafe\nsub     rsp, 50h                                                       ; +0x10, 0x14015bb00\nmov     rax, cs:__security_cookie                                      ; +0x14, 0x14015bb04\nxor     rax, rsp                                                       ; +0x1b, 0x14015bb0b\nmov     [rsp+88h+var_40], rax                                          ; +0x1e, 0x14015bb0e\nmov     r15d, edx                                                      ; +0x23, 0x14015bb13\nmov     r13, rcx                                                       ; +0x26, 0x14015bb16\nmov     sil, 1                                                         ; +0x29, 0x14015bb19\nxor     r12d, r12d                                                     ; +0x2c, 0x14015bb1c\nmovzx   eax, r8b                                                       ; +0x2f, 0x14015bb1f\nmov     [rsp+88h+var_68], eax                                          ; +0x33, 0x14015bb23\nnop     word ptr [rax+rax+00000000h]                                   ; +0x37, 0x14015bb27\nmov     r8d, r12d                                                      ; +0x40, 0x14015bb30\nmov     edx, eax                                                       ; +0x43, 0x14015bb33\nlea     rcx, aMessagesII; \"messages_%i_%i\"                             ; +0x45, 0x14015bb35\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x4c, 0x14015bb3c\nmov     rcx, rax                                                       ; +0x52, 0x14015bb42\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x55, 0x14015bb45\nmov     rbp, rax                                                       ; +0x5b, 0x14015bb4b\nxor     r14b, r14b                                                     ; +0x5e, 0x14015bb4e\nmov     rdx, rax                                                       ; +0x61, 0x14015bb51\nmov     rcx, r13                                                       ; +0x64, 0x14015bb54\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0x67, 0x14015bb57\nmov     rdi, rax                                                       ; +0x6c, 0x14015bb5c\ntest    rax, rax                                                       ; +0x6f, 0x14015bb5f\njz      loc_14015BC7E                                                  ; +0x72, 0x14015bb62\nxor     ebx, ebx                                                       ; +0x78, 0x14015bb68\nmov     rcx, rax                                                       ; +0x7a, 0x14015bb6a\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x7d, 0x14015bb6d\ntest    eax, eax                                                       ; +0x83, 0x14015bb73\njz      short loc_14015BBB7                                            ; +0x85, 0x14015bb75\nnop     word ptr [rax+rax+00000000h]                                   ; +0x87, 0x14015bb77\nmov     edx, ebx                                                       ; +0x90, 0x14015bb80\nmov     rcx, rdi                                                       ; +0x92, 0x14015bb82\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x95, 0x14015bb85\nmov     rcx, rdi                                                       ; +0x9b, 0x14015bb8b\ncmp     [rax+140h], r15d                                               ; +0x9e, 0x14015bb8e\njz      short loc_14015BBA5                                            ; +0xa5, 0x14015bb95\ninc     ebx                                                            ; +0xa7, 0x14015bb97\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xa9, 0x14015bb99\ncmp     ebx, eax                                                       ; +0xaf, 0x14015bb9f\njb      short loc_14015BB80                                            ; +0xb1, 0x14015bba1\njmp     short loc_14015BBB7                                            ; +0xb3, 0x14015bba3\nmov     r14b, 1                                                        ; +0xb5, 0x14015bba5\nxor     sil, sil                                                       ; +0xb8, 0x14015bba8\nmovzx   r8d, r14b                                                      ; +0xbb, 0x14015bbab\nmov     edx, ebx                                                       ; +0xbf, 0x14015bbaf\ncall    cs:?removeObjectAtIndex@CCArray@cocos2d@@QEAAXI_N@Z; cocos2d::CCArray::removeObjectAtIndex(uint,bool) ; +0xc1, 0x14015bbb1\ninc     r12d                                                           ; +0xc7, 0x14015bbb7\ntest    r14b, r14b                                                     ; +0xca, 0x14015bbba\njz      loc_14015BC69                                                  ; +0xcd, 0x14015bbbd\nmov     rcx, [r13+340h]                                                ; +0xd3, 0x14015bbc3\ntest    rcx, rcx                                                       ; +0xda, 0x14015bbca\njz      loc_14015BC69                                                  ; +0xdd, 0x14015bbcd\nmov     rax, [rcx]                                                     ; +0xe3, 0x14015bbd3\nmov     r8, rbp                                                        ; +0xe6, 0x14015bbd6\nmov     rdx, rdi                                                       ; +0xe9, 0x14015bbd9\ncall    qword ptr [rax]                                                ; +0xec, 0x14015bbdc\nmov     rcx, rdi                                                       ; +0xee, 0x14015bbde\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0xf1, 0x14015bbe1\ntest    eax, eax                                                       ; +0xf7, 0x14015bbe7\njnz     short loc_14015BC69                                            ; +0xf9, 0x14015bbe9\nxorps   xmm0, xmm0                                                     ; +0xfb, 0x14015bbeb\nmovups  [rsp+88h+var_60], xmm0                                         ; +0xfe, 0x14015bbee\nxor     eax, eax                                                       ; +0x103, 0x14015bbf3\nmov     [rsp+88h+var_50], rax                                          ; +0x105, 0x14015bbf5\nmov     [rsp+88h+var_48], rax                                          ; +0x10a, 0x14015bbfa\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x10f, 0x14015bbff\ninc     r8                                                             ; +0x116, 0x14015bc06\ncmp     [r8+rbp], al                                                   ; +0x119, 0x14015bc09\njnz     short loc_14015BC06                                            ; +0x11d, 0x14015bc0d\nmov     rdx, rbp                                                       ; +0x11f, 0x14015bc0f\nlea     rcx, [rsp+88h+var_60]                                          ; +0x122, 0x14015bc12\ncall    sub_14003A930                                                  ; +0x127, 0x14015bc17\nnop                                                                    ; +0x12c, 0x14015bc1c\nlea     rdx, [rsp+88h+var_60]                                          ; +0x12d, 0x14015bc1d\nmov     rcx, [r13+220h]                                                ; +0x132, 0x14015bc22\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, 0x14015bc29\nnop                                                                    ; +0x13f, 0x14015bc2f\nmov     rdx, [rsp+88h+var_48]                                          ; +0x140, 0x14015bc30\ncmp     rdx, 0Fh                                                       ; +0x145, 0x14015bc35\njbe     short loc_14015BC69                                            ; +0x149, 0x14015bc39\ninc     rdx                                                            ; +0x14b, 0x14015bc3b\nmov     rcx, qword ptr [rsp+88h+var_60]                                ; +0x14e, 0x14015bc3e\nmov     rax, rcx                                                       ; +0x153, 0x14015bc43\ncmp     rdx, 1000h                                                     ; +0x156, 0x14015bc46\njb      short loc_14015BC64                                            ; +0x15d, 0x14015bc4d\nadd     rdx, 27h ; '''                                                 ; +0x15f, 0x14015bc4f\nmov     rcx, [rcx-8]; Block                                            ; +0x163, 0x14015bc53\nsub     rax, rcx                                                       ; +0x167, 0x14015bc57\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x16a, 0x14015bc5a\ncmp     rax, 1Fh                                                       ; +0x16e, 0x14015bc5e\nja      short loc_14015BC77                                            ; +0x172, 0x14015bc62\ncall    j_j_free                                                       ; +0x174, 0x14015bc64\ntest    sil, sil                                                       ; +0x179, 0x14015bc69\njz      short loc_14015BC7E                                            ; +0x17c, 0x14015bc6c\nmov     eax, [rsp+88h+var_68]                                          ; +0x17e, 0x14015bc6e\njmp     loc_14015BB30                                                  ; +0x182, 0x14015bc72\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0x187, 0x14015bc77\nalign 2                                                                ; +0x18d, 0x14015bc7d\nmov     rcx, [rsp+88h+var_40]                                          ; +0x18e, 0x14015bc7e\nxor     rcx, rsp; StackCookie                                          ; +0x193, 0x14015bc83\ncall    __security_check_cookie                                        ; +0x196, 0x14015bc86\nmov     rbx, [rsp+88h+arg_8]                                           ; +0x19b, 0x14015bc8b\nadd     rsp, 50h                                                       ; +0x1a3, 0x14015bc93\npop     r15                                                            ; +0x1a7, 0x14015bc97\npop     r14                                                            ; +0x1a9, 0x14015bc99\npop     r13                                                            ; +0x1ab, 0x14015bc9b\npop     r12                                                            ; +0x1ad, 0x14015bc9d\npop     rdi                                                            ; +0x1af, 0x14015bc9f\npop     rsi                                                            ; +0x1b0, 0x14015bca0\npop     rbp                                                            ; +0x1b1, 0x14015bca1\nretn                                                                   ; +0x1b2, 0x14015bca2", "xrefs": ["GameLevelManager::onDeleteUserMessagesCompleted @ 0x14015ba92", "<???> @ 0x1406caa4c"], "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"}