{"type": "func", "start": 4300534752, "end": 4300535121, "name": "GameLevelManager::invalidateMessages", "pseudocode": "// \n// GameLevelManager::invalidateMessages from 0x10054f3e0 to 0x10054f551 (369 bytes)\n// \n// 7 xrefs:\n// > MessagesProfilePage::onUpdate @ 0x10022e8e1\n// > GameLevelManager::onBlockUserCompleted @ 0x100523b3a\n// > GameLevelManager::onDeleteUserMessagesCompleted @ 0x10052562c\n// > ProfilePage::init @ 0x1007b8825\n// > ProfilePage::init @ 0x1007b8836\n// > ProfilePage::onUpdate @ 0x1007b980f\n// > ProfilePage::onUpdate @ 0x1007b9820\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 GameLevelManager::invalidateMessages(GameLevelManager *a1, bool a2, bool a3)\n{\n  double v3; // xmm0_8\n  bool v4; // r14\n  int v5; // r15d\n  cocos2d::CCString *i; // rax\n  const char *CString; // r12\n  size_t v8; // rax\n  size_t v9; // r13\n  char *v10; // rbx\n  const char *v11; // rsi\n  cocos2d::CCArray *StoredOnlineLevels; // r12\n  __int64 v13; // rax\n  size_t v14; // r14\n  MessageListDelegate *m_messageListDelegate; // rdi\n  char v16; // [rsp+0h] [rbp-50h]\n  char v17; // [rsp+4h] [rbp-4Ch]\n  _QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF\n  void *__p; // [rsp+20h] [rbp-30h]\n\n  v4 = a2;\n  v5 = 0;\n  for ( i = (cocos2d::CCString *)sub_1007AB580(\"messages_%i_%i\", a2);\n        ;\n        i = (cocos2d::CCString *)sub_1007AB580(\"messages_%i_%i\", v16) )\n  {\n    CString = cocos2d::CCString::getCString(i);\n    v8 = strlen(CString);\n    if ( v8 >= 0xFFFFFFFFFFFFFFF8LL )\n      sub_100006BF0(v3);\n    v9 = v8;\n    if ( v8 >= 0x17 )\n    {\n      v13 = v8 | 7;\n      v14 = 26;\n      if ( (v9 | 7) != 0x17 )\n        v14 = v13 + 1;\n      v10 = (char *)operator new(v14);\n      __p = v10;\n      __dst[0] = v14 + 1;\n      __dst[1] = v9;\n      v4 = v16;\n    }\n    else\n    {\n      LOBYTE(__dst[0]) = 2 * v8;\n      v10 = (char *)__dst + 1;\n      if ( !v8 )\n      {\n        BYTE1(__dst[0]) = 0;\n        v11 = (char *)__dst + 1;\n        if ( (__dst[0] & 1) == 0 )\n          goto LABEL_9;\nLABEL_8:\n        v11 = (const char *)__p;\n        goto LABEL_9;\n      }\n    }\n    memmove(v10, CString, v9);\n    v10[v9] = 0;\n    v11 = (char *)__dst + 1;\n    if ( (__dst[0] & 1) != 0 )\n      goto LABEL_8;\nLABEL_9:\n    StoredOnlineLevels = GameLevelManager::getStoredOnlineLevels(a1, v11);\n    if ( StoredOnlineLevels )\n      cocos2d::CCDictionary::removeObjectForKey_1((__int64)a1->m_storedLevels, (char *)__dst);\n    if ( (__dst[0] & 1) != 0 )\n      operator delete(__p);\n    ++v5;\n    if ( !StoredOnlineLevels )\n      break;\n  }\n  if ( v17 )\n  {\n    m_messageListDelegate = a1->m_messageListDelegate;\n    if ( m_messageListDelegate )\n      ((void (__fastcall *)(MessageListDelegate *, bool))m_messageListDelegate->forceReloadMessages)(\n        m_messageListDelegate,\n        v4);\n  }\n}", "assembly": "; \n; GameLevelManager::invalidateMessages from 0x10054f3e0 to 0x10054f551 (369 bytes)\n; \n; 7 xrefs:\n; > MessagesProfilePage::onUpdate @ 0x10022e8e1\n; > GameLevelManager::onBlockUserCompleted @ 0x100523b3a\n; > GameLevelManager::onDeleteUserMessagesCompleted @ 0x10052562c\n; > ProfilePage::init @ 0x1007b8825\n; > ProfilePage::init @ 0x1007b8836\n; > ProfilePage::onUpdate @ 0x1007b980f\n; > ProfilePage::onUpdate @ 0x1007b9820\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, 0x10054f3e0\nmov     rbp, rsp                                                       ; +0x1, 0x10054f3e1\npush    r15                                                            ; +0x4, 0x10054f3e4\npush    r14                                                            ; +0x6, 0x10054f3e6\npush    r13                                                            ; +0x8, 0x10054f3e8\npush    r12                                                            ; +0xa, 0x10054f3ea\npush    rbx                                                            ; +0xc, 0x10054f3ec\nsub     rsp, 28h                                                       ; +0xd, 0x10054f3ed\nmov     [rbp+var_4C], edx                                              ; +0x11, 0x10054f3f1\nmov     r14d, esi                                                      ; +0x14, 0x10054f3f4\nmov     [rbp+var_48], rdi                                              ; +0x17, 0x10054f3f7\nxor     r15d, r15d                                                     ; +0x1b, 0x10054f3fb\nmov     [rbp+var_50], esi                                              ; +0x1e, 0x10054f3fe\njmp     short loc_10054F41C                                            ; +0x21, 0x10054f401\nalign 10h                                                              ; +0x23, 0x10054f403\ninc     r15d                                                           ; +0x30, 0x10054f410\ntest    r12, r12                                                       ; +0x33, 0x10054f413\njz      loc_10054F51D                                                  ; +0x36, 0x10054f416\nlea     rdi, aMessagesII; \"messages_%i_%i\"                             ; +0x3c, 0x10054f41c\nmov     esi, r14d                                                      ; +0x43, 0x10054f423\nmov     edx, r15d                                                      ; +0x46, 0x10054f426\nxor     eax, eax                                                       ; +0x49, 0x10054f429\ncall    sub_1007AB580                                                  ; +0x4b, 0x10054f42b\nmov     rdi, rax                                                       ; +0x50, 0x10054f430\ncall    cocos2d__CCString__getCString                                  ; +0x53, 0x10054f433\nmov     r12, rax                                                       ; +0x58, 0x10054f438\nmov     rdi, rax; __s                                                  ; +0x5b, 0x10054f43b\ncall    _strlen                                                        ; +0x5e, 0x10054f43e\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x63, 0x10054f443\njnb     loc_10054F54C                                                  ; +0x67, 0x10054f447\nmov     r13, rax                                                       ; +0x6d, 0x10054f44d\ncmp     rax, 17h                                                       ; +0x70, 0x10054f450\njnb     short loc_10054F4C0                                            ; +0x74, 0x10054f454\nlea     eax, ds:0[r13*2]                                               ; +0x76, 0x10054f456\nmov     byte ptr [rbp+__dst], al                                       ; +0x7e, 0x10054f45e\nlea     rbx, [rbp+__dst+1]                                             ; +0x81, 0x10054f461\ntest    r13, r13                                                       ; +0x85, 0x10054f465\njnz     loc_10054F4F7                                                  ; +0x88, 0x10054f468\nxchg    ax, ax                                                         ; +0x8e, 0x10054f46e\nmov     byte ptr [rbx+r13], 0                                          ; +0x90, 0x10054f470\ntest    byte ptr [rbp+__dst], 1                                        ; +0x95, 0x10054f475\nlea     rsi, [rbp+__dst+1]                                             ; +0x99, 0x10054f479\njz      short loc_10054F483                                            ; +0x9d, 0x10054f47d\nmov     rsi, [rbp+__p]                                                 ; +0x9f, 0x10054f47f\nmov     rdi, [rbp+var_48]                                              ; +0xa3, 0x10054f483\ncall    GameLevelManager__getStoredOnlineLevels                        ; +0xa7, 0x10054f487\nmov     r12, rax                                                       ; +0xac, 0x10054f48c\ntest    rax, rax                                                       ; +0xaf, 0x10054f48f\njz      short loc_10054F4A8                                            ; +0xb2, 0x10054f492\nmov     rax, [rbp+var_48]                                              ; +0xb4, 0x10054f494\nmov     rdi, [rax+230h]                                                ; +0xb8, 0x10054f498\nlea     rsi, [rbp+__dst]                                               ; +0xbf, 0x10054f49f\ncall    cocos2d__CCDictionary__removeObjectForKey_1                    ; +0xc3, 0x10054f4a3\ntest    byte ptr [rbp+__dst], 1                                        ; +0xc8, 0x10054f4a8\njz      loc_10054F410                                                  ; +0xcc, 0x10054f4ac\nmov     rdi, [rbp+__p]; __p                                            ; +0xd2, 0x10054f4b2\ncall    __ZdlPv; operator delete(void *)                               ; +0xd6, 0x10054f4b6\njmp     loc_10054F410                                                  ; +0xdb, 0x10054f4bb\nmov     rax, r13                                                       ; +0xe0, 0x10054f4c0\nor      rax, 7                                                         ; +0xe3, 0x10054f4c3\nmov     r14d, 1Ah                                                      ; +0xe7, 0x10054f4c7\ncmp     rax, 17h                                                       ; +0xed, 0x10054f4cd\njz      short loc_10054F4D9                                            ; +0xf1, 0x10054f4d1\ninc     rax                                                            ; +0xf3, 0x10054f4d3\nmov     r14, rax                                                       ; +0xf6, 0x10054f4d6\nmov     rdi, r14; __sz                                                 ; +0xf9, 0x10054f4d9\ncall    __Znwm; operator new(ulong)                                    ; +0xfc, 0x10054f4dc\nmov     rbx, rax                                                       ; +0x101, 0x10054f4e1\nmov     [rbp+__p], rax                                                 ; +0x104, 0x10054f4e4\ninc     r14                                                            ; +0x108, 0x10054f4e8\nmov     [rbp+__dst], r14                                               ; +0x10b, 0x10054f4eb\nmov     [rbp+var_38], r13                                              ; +0x10f, 0x10054f4ef\nmov     r14d, [rbp+var_50]                                             ; +0x113, 0x10054f4f3\nmov     rdi, rbx; __dst                                                ; +0x117, 0x10054f4f7\nmov     rsi, r12; __src                                                ; +0x11a, 0x10054f4fa\nmov     rdx, r13; __len                                                ; +0x11d, 0x10054f4fd\ncall    _memmove                                                       ; +0x120, 0x10054f500\nmov     byte ptr [rbx+r13], 0                                          ; +0x125, 0x10054f505\ntest    byte ptr [rbp+__dst], 1                                        ; +0x12a, 0x10054f50a\nlea     rsi, [rbp+__dst+1]                                             ; +0x12e, 0x10054f50e\njnz     loc_10054F47F                                                  ; +0x132, 0x10054f512\njmp     loc_10054F483                                                  ; +0x138, 0x10054f518\ncmp     byte ptr [rbp+var_4C], 0                                       ; +0x13d, 0x10054f51d\njz      short loc_10054F53D                                            ; +0x141, 0x10054f521\nmov     rax, [rbp+var_48]                                              ; +0x143, 0x10054f523\nmov     rdi, [rax+340h]                                                ; +0x147, 0x10054f527\ntest    rdi, rdi                                                       ; +0x14e, 0x10054f52e\njz      short loc_10054F53D                                            ; +0x151, 0x10054f531\nmov     rax, [rdi]                                                     ; +0x153, 0x10054f533\nmovzx   esi, r14b                                                      ; +0x156, 0x10054f536\ncall    qword ptr [rax+10h]                                            ; +0x15a, 0x10054f53a\nadd     rsp, 28h                                                       ; +0x15d, 0x10054f53d\npop     rbx                                                            ; +0x161, 0x10054f541\npop     r12                                                            ; +0x162, 0x10054f542\npop     r13                                                            ; +0x164, 0x10054f544\npop     r14                                                            ; +0x166, 0x10054f546\npop     r15                                                            ; +0x168, 0x10054f548\npop     rbp                                                            ; +0x16a, 0x10054f54a\nretn                                                                   ; +0x16b, 0x10054f54b\ncall    sub_100006BF0                                                  ; +0x16c, 0x10054f54c", "xrefs": ["MessagesProfilePage::onUpdate @ 0x10022e8e1", "GameLevelManager::onBlockUserCompleted @ 0x100523b3a", "GameLevelManager::onDeleteUserMessagesCompleted @ 0x10052562c", "ProfilePage::init @ 0x1007b8825", "ProfilePage::init @ 0x1007b8836", "ProfilePage::onUpdate @ 0x1007b980f", "ProfilePage::onUpdate @ 0x1007b9820"], "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"}