{"type": "func", "start": 4300530144, "end": 4300530875, "name": "GameLevelManager::cleanupDailyLevels", "pseudocode": "// \n// GameLevelManager::cleanupDailyLevels from 0x10054e1e0 to 0x10054e4bb (731 bytes)\n// \n// 1 xrefs:\n// > GameLevelManager::encodeDataTo @ 0x10054f510\n// \n// This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:32:02 +0000\n// \n\n__int64 __fastcall GameLevelManager::cleanupDailyLevels(__int64 a1)\n{\n  __int64 v1; // r14\n  __int64 v2; // rbx\n  __int64 result; // rax\n  __int64 v4; // r15\n  unsigned int v5; // r12d\n  int v6; // eax\n  __int64 v7; // rax\n  const char *CString; // r12\n  __int64 v9; // r13\n  size_t v10; // rax\n  size_t v11; // r15\n  char *v12; // rbx\n  __int64 v13; // rax\n  size_t v14; // r14\n  __int64 v15; // r13\n  int v16; // eax\n  bool v17; // cc\n  unsigned int v18; // eax\n  __int64 v19; // rcx\n  unsigned int v20; // eax\n  int v21; // r15d\n  unsigned int v22; // r12d\n  __int64 v23; // r13\n  size_t v24; // rax\n  size_t v25; // r15\n  char *v26; // rbx\n  __int64 v27; // rax\n  size_t v28; // r14\n  signed int v29; // [rsp+Ch] [rbp-64h]\n  signed int v30; // [rsp+10h] [rbp-60h]\n  signed int v31; // [rsp+14h] [rbp-5Ch]\n  size_t __dst; // [rsp+18h] [rbp-58h] BYREF\n  size_t v33; // [rsp+20h] [rbp-50h]\n  void *__p; // [rsp+28h] [rbp-48h]\n  __int64 v35; // [rsp+30h] [rbp-40h]\n  __int64 v36; // [rsp+38h] [rbp-38h]\n  unsigned int v37; // [rsp+44h] [rbp-2Ch]\n\n  v1 = a1;\n  v2 = cocos2d::CCDictionary::allKeys(*(_QWORD *)(a1 + 848));\n  result = sub_1007FEF90(v2);\n  if ( (_DWORD)result )\n  {\n    v29 = 0;\n    v4 = 0xFFFFFFFFLL;\n    v30 = 0;\n    v5 = 0;\n    v31 = 0;\n    v36 = v2;\n    while ( 1 )\n    {\n      v37 = v5;\n      v6 = sub_1007FEF90(v2);\n      v35 = v4;\n      v7 = sub_1007FEFE0(v2, (unsigned int)(v6 + v4));\n      CString = (const char *)cocos2d::CCString::getCString(v7);\n      v9 = *(_QWORD *)(v1 + 848);\n      v10 = strlen(CString);\n      if ( v10 >= 0xFFFFFFFFFFFFFFF8LL )\nLABEL_47:\n        sub_100003630();\n      v11 = v10;\n      if ( v10 >= 0x17 )\n        break;\n      LOBYTE(__dst) = 2 * v10;\n      v12 = (char *)&__dst + 1;\n      if ( v10 )\n        goto LABEL_10;\nLABEL_11:\n      v12[v11] = 0;\n      v15 = cocos2d::CCDictionary::objectForKey(v9, (char *)&__dst);\n      if ( (__dst & 1) != 0 )\n        operator delete(__p);\n      v16 = *(_DWORD *)(v15 + 920);\n      v17 = v16 <= *(_DWORD *)(v15 + 924);\n      v18 = v16 - *(_DWORD *)(v15 + 924);\n      if ( v17 )\n      {\nLABEL_21:\n        if ( (int)v18 >= v29 )\n        {\n          v29 = v18;\n          goto LABEL_27;\n        }\n        goto LABEL_22;\n      }\n      v19 = 876;\n      if ( v18 < 0x186A1 )\n      {\n        v19 = 864;\n      }\n      else if ( v18 >= 0x30D41 )\n      {\n        if ( v18 != *(_DWORD *)(v1 + 888) )\n          goto LABEL_27;\n        goto LABEL_20;\n      }\n      if ( v18 != *(_DWORD *)(v1 + v19) )\n        goto LABEL_27;\nLABEL_20:\n      if ( v18 <= 0x186A0 )\n        goto LABEL_21;\n      if ( v18 > 0x30D40 )\n      {\n        if ( (int)v18 >= v31 )\n        {\n          v31 = v18;\n          goto LABEL_27;\n        }\n      }\n      else if ( (int)v18 >= v30 )\n      {\n        v30 = v18;\n        goto LABEL_27;\n      }\nLABEL_22:\n      *(_WORD *)(v15 + 1104) = 257;\n      if ( *(_DWORD *)(v15 + 864) <= *(_DWORD *)(v15 + 868) )\n      {\n        v20 = *(unsigned __int8 *)(v15 + 1472);\n        if ( (v20 & 1) != 0 )\n        {\n          if ( !*(_QWORD *)(v15 + 1480) )\n          {\nLABEL_34:\n            v23 = *(_QWORD *)(v1 + 848);\n            v24 = strlen(CString);\n            if ( v24 >= 0xFFFFFFFFFFFFFFF8LL )\n              goto LABEL_47;\n            v25 = v24;\n            if ( v24 >= 0x17 )\n            {\n              v27 = v24 | 7;\n              v28 = 26;\n              if ( (v25 | 7) != 0x17 )\n                v28 = v27 + 1;\n              v26 = (char *)operator new(v28);\n              __p = v26;\n              __dst = v28 + 1;\n              v33 = v25;\n              v1 = a1;\n            }\n            else\n            {\n              LOBYTE(__dst) = 2 * v24;\n              v26 = (char *)&__dst + 1;\n              if ( !v24 )\n              {\nLABEL_44:\n                v26[v25] = 0;\n                cocos2d::CCDictionary::removeObjectForKey(v23, (char *)&__dst);\n                v2 = v36;\n                v21 = v35;\n                v22 = v37;\n                if ( (__dst & 1) != 0 )\n                  operator delete(__p);\n                goto LABEL_28;\n              }\n            }\n            memmove(v26, CString, v25);\n            goto LABEL_44;\n          }\n        }\n        else if ( !(v20 >> 1) )\n        {\n          goto LABEL_34;\n        }\n      }\nLABEL_27:\n      v2 = v36;\n      v21 = v35;\n      v22 = v37;\nLABEL_28:\n      v5 = v22 + 1;\n      result = sub_1007FEF90(v2);\n      v4 = (unsigned int)(v21 - 1);\n      if ( v5 >= (unsigned int)result )\n        return result;\n    }\n    v13 = v10 | 7;\n    v14 = 26;\n    if ( (v11 | 7) != 0x17 )\n      v14 = v13 + 1;\n    v12 = (char *)operator new(v14);\n    __p = v12;\n    __dst = v14 + 1;\n    v33 = v11;\n    v1 = a1;\nLABEL_10:\n    memmove(v12, CString, v11);\n    goto LABEL_11;\n  }\n  return result;\n}", "assembly": "; \n; GameLevelManager::cleanupDailyLevels from 0x10054e1e0 to 0x10054e4bb (731 bytes)\n; \n; 1 xrefs:\n; > GameLevelManager::encodeDataTo @ 0x10054f510\n; \n; This function is hookable on this platform (idp: pc, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:32:02 +0000\n; \npush    rbp                                                            ; +0x0, 0x10054e1e0\nmov     rbp, rsp                                                       ; +0x1, 0x10054e1e1\npush    r15                                                            ; +0x4, 0x10054e1e4\npush    r14                                                            ; +0x6, 0x10054e1e6\npush    r13                                                            ; +0x8, 0x10054e1e8\npush    r12                                                            ; +0xa, 0x10054e1ea\npush    rbx                                                            ; +0xc, 0x10054e1ec\nsub     rsp, 48h                                                       ; +0xd, 0x10054e1ed\nmov     r14, rdi                                                       ; +0x11, 0x10054e1f1\nmov     rdi, [rdi+350h]                                                ; +0x14, 0x10054e1f4\ncall    cocos2d__CCDictionary__allKeys                                 ; +0x1b, 0x10054e1fb\nmov     rbx, rax                                                       ; +0x20, 0x10054e200\nmov     rdi, rax                                                       ; +0x23, 0x10054e203\ncall    sub_1007FEF90                                                  ; +0x26, 0x10054e206\ntest    eax, eax                                                       ; +0x2b, 0x10054e20b\njz      loc_10054E4A7                                                  ; +0x2d, 0x10054e20d\nmov     [rbp+var_64], 0                                                ; +0x33, 0x10054e213\nmov     r15d, 0FFFFFFFFh                                               ; +0x3a, 0x10054e21a\nmov     [rbp+var_60], 0                                                ; +0x40, 0x10054e220\nxor     r12d, r12d                                                     ; +0x47, 0x10054e227\nmov     [rbp+var_5C], 0                                                ; +0x4a, 0x10054e22a\nmov     [rbp+var_70], r14                                              ; +0x51, 0x10054e231\nmov     [rbp+var_38], rbx                                              ; +0x55, 0x10054e235\nnop     dword ptr [rax+00000000h]                                      ; +0x59, 0x10054e239\nmov     [rbp+var_2C], r12d                                             ; +0x60, 0x10054e240\nmov     rdi, rbx                                                       ; +0x64, 0x10054e244\ncall    sub_1007FEF90                                                  ; +0x67, 0x10054e247\nmov     [rbp+var_40], r15                                              ; +0x6c, 0x10054e24c\nlea     esi, [rax+r15]                                                 ; +0x70, 0x10054e250\nmov     rdi, rbx                                                       ; +0x74, 0x10054e254\ncall    sub_1007FEFE0                                                  ; +0x77, 0x10054e257\nmov     rdi, rax                                                       ; +0x7c, 0x10054e25c\ncall    cocos2d__CCString__getCString                                  ; +0x7f, 0x10054e25f\nmov     r12, rax                                                       ; +0x84, 0x10054e264\nmov     r13, [r14+350h]                                                ; +0x87, 0x10054e267\nmov     rdi, rax; __s                                                  ; +0x8e, 0x10054e26e\ncall    _strlen                                                        ; +0x91, 0x10054e271\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x96, 0x10054e276\njnb     loc_10054E4B6                                                  ; +0x9a, 0x10054e27a\nmov     r15, rax                                                       ; +0xa0, 0x10054e280\ncmp     rax, 17h                                                       ; +0xa3, 0x10054e283\njnb     short loc_10054E2A0                                            ; +0xa7, 0x10054e287\nlea     eax, [r15+r15]                                                 ; +0xa9, 0x10054e289\nmov     byte ptr [rbp+__dst], al                                       ; +0xad, 0x10054e28d\nlea     rbx, [rbp+__dst+1]                                             ; +0xb0, 0x10054e290\ntest    r15, r15                                                       ; +0xb4, 0x10054e294\njnz     short loc_10054E2D7                                            ; +0xb7, 0x10054e297\njmp     short loc_10054E2E5                                            ; +0xb9, 0x10054e299\nalign 20h                                                              ; +0xbb, 0x10054e29b\nmov     rax, r15                                                       ; +0xc0, 0x10054e2a0\nor      rax, 7                                                         ; +0xc3, 0x10054e2a3\nmov     r14d, 1Ah                                                      ; +0xc7, 0x10054e2a7\ncmp     rax, 17h                                                       ; +0xcd, 0x10054e2ad\njz      short loc_10054E2B9                                            ; +0xd1, 0x10054e2b1\ninc     rax                                                            ; +0xd3, 0x10054e2b3\nmov     r14, rax                                                       ; +0xd6, 0x10054e2b6\nmov     rdi, r14; __sz                                                 ; +0xd9, 0x10054e2b9\ncall    __Znwm; operator new(ulong)                                    ; +0xdc, 0x10054e2bc\nmov     rbx, rax                                                       ; +0xe1, 0x10054e2c1\nmov     [rbp+__p], rax                                                 ; +0xe4, 0x10054e2c4\ninc     r14                                                            ; +0xe8, 0x10054e2c8\nmov     [rbp+__dst], r14                                               ; +0xeb, 0x10054e2cb\nmov     [rbp+var_50], r15                                              ; +0xef, 0x10054e2cf\nmov     r14, [rbp+var_70]                                              ; +0xf3, 0x10054e2d3\nmov     rdi, rbx; __dst                                                ; +0xf7, 0x10054e2d7\nmov     rsi, r12; __src                                                ; +0xfa, 0x10054e2da\nmov     rdx, r15; __len                                                ; +0xfd, 0x10054e2dd\ncall    _memmove                                                       ; +0x100, 0x10054e2e0\nmov     byte ptr [rbx+r15], 0                                          ; +0x105, 0x10054e2e5\nmov     rdi, r13                                                       ; +0x10a, 0x10054e2ea\nlea     rsi, [rbp+__dst]                                               ; +0x10d, 0x10054e2ed\ncall    cocos2d__CCDictionary__objectForKey                            ; +0x111, 0x10054e2f1\nmov     r13, rax                                                       ; +0x116, 0x10054e2f6\ntest    byte ptr [rbp+__dst], 1                                        ; +0x119, 0x10054e2f9\njz      short loc_10054E308                                            ; +0x11d, 0x10054e2fd\nmov     rdi, [rbp+__p]; __p                                            ; +0x11f, 0x10054e2ff\ncall    __ZdlPv; operator delete(void *)                               ; +0x123, 0x10054e303\nmov     eax, [r13+398h]                                                ; +0x128, 0x10054e308\nsub     eax, [r13+39Ch]                                                ; +0x12f, 0x10054e30f\njle     short loc_10054E361                                            ; +0x136, 0x10054e316\nmov     ecx, 36Ch                                                      ; +0x138, 0x10054e318\ncmp     eax, 186A1h                                                    ; +0x13d, 0x10054e31d\njb      short loc_10054E340                                            ; +0x142, 0x10054e322\nmov     edx, 378h                                                      ; +0x144, 0x10054e324\ncmp     eax, 30D41h                                                    ; +0x149, 0x10054e329\njb      short loc_10054E351                                            ; +0x14e, 0x10054e32e\ncmp     eax, [r14+rdx]                                                 ; +0x150, 0x10054e330\njz      short loc_10054E35A                                            ; +0x154, 0x10054e334\njmp     short loc_10054E3A3                                            ; +0x156, 0x10054e336\nalign 20h                                                              ; +0x158, 0x10054e338\nmov     ecx, 360h                                                      ; +0x160, 0x10054e340\nmov     edx, 378h                                                      ; +0x165, 0x10054e345\ncmp     eax, 30D41h                                                    ; +0x16a, 0x10054e34a\njnb     short loc_10054E330                                            ; +0x16f, 0x10054e34f\nmov     rdx, rcx                                                       ; +0x171, 0x10054e351\ncmp     eax, [r14+rdx]                                                 ; +0x174, 0x10054e354\njnz     short loc_10054E3A3                                            ; +0x178, 0x10054e358\ncmp     eax, 186A0h                                                    ; +0x17a, 0x10054e35a\nja      short loc_10054E3CB                                            ; +0x17f, 0x10054e35f\ncmp     eax, [rbp+var_64]                                              ; +0x181, 0x10054e361\njge     short loc_10054E3A0                                            ; +0x184, 0x10054e364\nmov     word ptr [r13+450h], 101h                                      ; +0x186, 0x10054e366\nmov     eax, [r13+360h]                                                ; +0x190, 0x10054e370\ncmp     eax, [r13+364h]                                                ; +0x197, 0x10054e377\njg      short loc_10054E3A3                                            ; +0x19e, 0x10054e37e\nmovzx   eax, byte ptr [r13+5C0h]                                       ; +0x1a0, 0x10054e380\ntest    al, 1                                                          ; +0x1a8, 0x10054e388\njnz     short loc_10054E3DC                                            ; +0x1aa, 0x10054e38a\nshr     eax, 1                                                         ; +0x1ac, 0x10054e38c\ntest    rax, rax                                                       ; +0x1ae, 0x10054e38e\njnz     short loc_10054E3A3                                            ; +0x1b1, 0x10054e391\njmp     short loc_10054E3E8                                            ; +0x1b3, 0x10054e393\nalign 20h                                                              ; +0x1b5, 0x10054e395\nmov     [rbp+var_64], eax                                              ; +0x1c0, 0x10054e3a0\nmov     rbx, [rbp+var_38]                                              ; +0x1c3, 0x10054e3a3\nmov     r15, [rbp+var_40]                                              ; +0x1c7, 0x10054e3a7\nmov     r12d, [rbp+var_2C]                                             ; +0x1cb, 0x10054e3ab\ninc     r12d                                                           ; +0x1cf, 0x10054e3af\nmov     rdi, rbx                                                       ; +0x1d2, 0x10054e3b2\ncall    sub_1007FEF90                                                  ; +0x1d5, 0x10054e3b5\ndec     r15d                                                           ; +0x1da, 0x10054e3ba\ncmp     r12d, eax                                                      ; +0x1dd, 0x10054e3bd\njb      loc_10054E240                                                  ; +0x1e0, 0x10054e3c0\njmp     loc_10054E4A7                                                  ; +0x1e6, 0x10054e3c6\ncmp     eax, 30D40h                                                    ; +0x1eb, 0x10054e3cb\nja      short loc_10054E41C                                            ; +0x1f0, 0x10054e3d0\ncmp     eax, [rbp+var_60]                                              ; +0x1f2, 0x10054e3d2\njl      short loc_10054E366                                            ; +0x1f5, 0x10054e3d5\nmov     [rbp+var_60], eax                                              ; +0x1f7, 0x10054e3d7\njmp     short loc_10054E3A3                                            ; +0x1fa, 0x10054e3da\nmov     rax, [r13+5C8h]                                                ; +0x1fc, 0x10054e3dc\ntest    rax, rax                                                       ; +0x203, 0x10054e3e3\njnz     short loc_10054E3A3                                            ; +0x206, 0x10054e3e6\nmov     r13, [r14+350h]                                                ; +0x208, 0x10054e3e8\nmov     rdi, r12; __s                                                  ; +0x20f, 0x10054e3ef\ncall    _strlen                                                        ; +0x212, 0x10054e3f2\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x217, 0x10054e3f7\njnb     loc_10054E4B6                                                  ; +0x21b, 0x10054e3fb\nmov     r15, rax                                                       ; +0x221, 0x10054e401\ncmp     rax, 17h                                                       ; +0x224, 0x10054e404\njnb     short loc_10054E42D                                            ; +0x228, 0x10054e408\nlea     eax, [r15+r15]                                                 ; +0x22a, 0x10054e40a\nmov     byte ptr [rbp+__dst], al                                       ; +0x22e, 0x10054e40e\nlea     rbx, [rbp+__dst+1]                                             ; +0x231, 0x10054e411\ntest    r15, r15                                                       ; +0x235, 0x10054e415\njnz     short loc_10054E464                                            ; +0x238, 0x10054e418\njmp     short loc_10054E472                                            ; +0x23a, 0x10054e41a\ncmp     eax, [rbp+var_5C]                                              ; +0x23c, 0x10054e41c\njl      loc_10054E366                                                  ; +0x23f, 0x10054e41f\nmov     [rbp+var_5C], eax                                              ; +0x245, 0x10054e425\njmp     loc_10054E3A3                                                  ; +0x248, 0x10054e428\nmov     rax, r15                                                       ; +0x24d, 0x10054e42d\nor      rax, 7                                                         ; +0x250, 0x10054e430\nmov     r14d, 1Ah                                                      ; +0x254, 0x10054e434\ncmp     rax, 17h                                                       ; +0x25a, 0x10054e43a\njz      short loc_10054E446                                            ; +0x25e, 0x10054e43e\ninc     rax                                                            ; +0x260, 0x10054e440\nmov     r14, rax                                                       ; +0x263, 0x10054e443\nmov     rdi, r14; __sz                                                 ; +0x266, 0x10054e446\ncall    __Znwm; operator new(ulong)                                    ; +0x269, 0x10054e449\nmov     rbx, rax                                                       ; +0x26e, 0x10054e44e\nmov     [rbp+__p], rax                                                 ; +0x271, 0x10054e451\ninc     r14                                                            ; +0x275, 0x10054e455\nmov     [rbp+__dst], r14                                               ; +0x278, 0x10054e458\nmov     [rbp+var_50], r15                                              ; +0x27c, 0x10054e45c\nmov     r14, [rbp+var_70]                                              ; +0x280, 0x10054e460\nmov     rdi, rbx; __dst                                                ; +0x284, 0x10054e464\nmov     rsi, r12; __src                                                ; +0x287, 0x10054e467\nmov     rdx, r15; __len                                                ; +0x28a, 0x10054e46a\ncall    _memmove                                                       ; +0x28d, 0x10054e46d\nmov     byte ptr [rbx+r15], 0                                          ; +0x292, 0x10054e472\nmov     rdi, r13                                                       ; +0x297, 0x10054e477\nlea     rsi, [rbp+__dst]                                               ; +0x29a, 0x10054e47a\ncall    cocos2d__CCDictionary__removeObjectForKey                      ; +0x29e, 0x10054e47e\ntest    byte ptr [rbp+__dst], 1                                        ; +0x2a3, 0x10054e483\nmov     rbx, [rbp+var_38]                                              ; +0x2a7, 0x10054e487\nmov     r15, [rbp+var_40]                                              ; +0x2ab, 0x10054e48b\nmov     r12d, [rbp+var_2C]                                             ; +0x2af, 0x10054e48f\njz      loc_10054E3AF                                                  ; +0x2b3, 0x10054e493\nmov     rdi, [rbp+__p]; __p                                            ; +0x2b9, 0x10054e499\ncall    __ZdlPv; operator delete(void *)                               ; +0x2bd, 0x10054e49d\njmp     loc_10054E3AF                                                  ; +0x2c2, 0x10054e4a2\nadd     rsp, 48h                                                       ; +0x2c7, 0x10054e4a7\npop     rbx                                                            ; +0x2cb, 0x10054e4ab\npop     r12                                                            ; +0x2cc, 0x10054e4ac\npop     r13                                                            ; +0x2ce, 0x10054e4ae\npop     r14                                                            ; +0x2d0, 0x10054e4b0\npop     r15                                                            ; +0x2d2, 0x10054e4b2\npop     rbp                                                            ; +0x2d4, 0x10054e4b4\nretn                                                                   ; +0x2d5, 0x10054e4b5\ncall    sub_100003630                                                  ; +0x2d6, 0x10054e4b6", "xrefs": ["GameLevelManager::encodeDataTo @ 0x10054f510"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}