{"type": "func", "start": 4300486720, "end": 4300486952, "name": "GameLevelManager::saveLevelList", "pseudocode": "// \n// GameLevelManager::saveLevelList from 0x100543840 to 0x100543928 (232 bytes)\n// \n// 2 xrefs:\n// > LevelListLayer::onFavorite @ 0x1003491bf\n// > GameLevelManager::saveFetchedLevelLists @ 0x100543811\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:31:58 +0000\n// \n\nvoid __fastcall GameLevelManager::saveLevelList(__int64 a1, __int64 a2)\n{\n  __int64 v2; // r14\n  __int64 v3; // rax\n  const char *CString; // r12\n  size_t v5; // rax\n  size_t v6; // r15\n  char *v7; // r13\n  size_t v8; // r14\n  char v9; // [rsp+0h] [rbp-50h]\n  __int64 v10; // [rsp+8h] [rbp-48h]\n  _QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF\n  void *__p; // [rsp+20h] [rbp-30h]\n\n  v2 = *(_QWORD *)(a1 + 784);\n  v3 = sub_10088E820(\"%i\", v9);\n  CString = (const char *)cocos2d::CCString::getCString(v3);\n  v5 = strlen(CString);\n  if ( v5 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100003630();\n  v6 = v5;\n  if ( v5 >= 0x17 )\n  {\n    v10 = v2;\n    v8 = 26;\n    if ( (v5 | 7) != 0x17 )\n      v8 = (v5 | 7) + 1;\n    v7 = (char *)operator new(v8);\n    __p = v7;\n    __dst[0] = v8 + 1;\n    v2 = v10;\n    __dst[1] = v6;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst[0]) = 2 * v5;\n  v7 = (char *)__dst + 1;\n  if ( v5 )\nLABEL_8:\n    memmove(v7, CString, v6);\n  v7[v6] = 0;\n  cocos2d::CCDictionary::setObject(v2, a2, (char *)__dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n}", "assembly": "; \n; GameLevelManager::saveLevelList from 0x100543840 to 0x100543928 (232 bytes)\n; \n; 2 xrefs:\n; > LevelListLayer::onFavorite @ 0x1003491bf\n; > GameLevelManager::saveFetchedLevelLists @ 0x100543811\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:31:58 +0000\n; \npush    rbp                                                            ; +0x0, 0x100543840\nmov     rbp, rsp                                                       ; +0x1, 0x100543841\npush    r15                                                            ; +0x4, 0x100543844\npush    r14                                                            ; +0x6, 0x100543846\npush    r13                                                            ; +0x8, 0x100543848\npush    r12                                                            ; +0xa, 0x10054384a\npush    rbx                                                            ; +0xc, 0x10054384c\nsub     rsp, 28h                                                       ; +0xd, 0x10054384d\nmov     rbx, rsi                                                       ; +0x11, 0x100543851\nmov     r14, [rdi+310h]                                                ; +0x14, 0x100543854\nmov     esi, [rsi+158h]                                                ; +0x1b, 0x10054385b\nlea     rdi, aI_14; \"%i\"                                               ; +0x21, 0x100543861\nxor     eax, eax                                                       ; +0x28, 0x100543868\ncall    sub_10088E820                                                  ; +0x2a, 0x10054386a\nmov     rdi, rax                                                       ; +0x2f, 0x10054386f\ncall    cocos2d__CCString__getCString                                  ; +0x32, 0x100543872\nmov     r12, rax                                                       ; +0x37, 0x100543877\nmov     rdi, rax; __s                                                  ; +0x3a, 0x10054387a\ncall    _strlen                                                        ; +0x3d, 0x10054387d\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x42, 0x100543882\njnb     loc_100543923                                                  ; +0x46, 0x100543886\nmov     r15, rax                                                       ; +0x4c, 0x10054388c\ncmp     rax, 17h                                                       ; +0x4f, 0x10054388f\njnb     short loc_1005438A7                                            ; +0x53, 0x100543893\nlea     eax, [r15+r15]                                                 ; +0x55, 0x100543895\nmov     byte ptr [rbp+__dst], al                                       ; +0x59, 0x100543899\nlea     r13, [rbp+__dst+1]                                             ; +0x5c, 0x10054389c\ntest    r15, r15                                                       ; +0x60, 0x1005438a0\njnz     short loc_1005438E2                                            ; +0x63, 0x1005438a3\njmp     short loc_1005438F0                                            ; +0x65, 0x1005438a5\nmov     rax, r15                                                       ; +0x67, 0x1005438a7\nor      rax, 7                                                         ; +0x6a, 0x1005438aa\nlea     rcx, [rax+1]                                                   ; +0x6e, 0x1005438ae\ncmp     rax, 17h                                                       ; +0x72, 0x1005438b2\nmov     [rbp+var_48], r14                                              ; +0x76, 0x1005438b6\nmov     r14d, 1Ah                                                      ; +0x7a, 0x1005438ba\ncmovnz  r14, rcx                                                       ; +0x80, 0x1005438c0\nmov     rdi, r14; __sz                                                 ; +0x84, 0x1005438c4\ncall    __Znwm; operator new(ulong)                                    ; +0x87, 0x1005438c7\nmov     r13, rax                                                       ; +0x8c, 0x1005438cc\nmov     [rbp+__p], rax                                                 ; +0x8f, 0x1005438cf\ninc     r14                                                            ; +0x93, 0x1005438d3\nmov     [rbp+__dst], r14                                               ; +0x96, 0x1005438d6\nmov     r14, [rbp+var_48]                                              ; +0x9a, 0x1005438da\nmov     [rbp+var_38], r15                                              ; +0x9e, 0x1005438de\nmov     rdi, r13; __dst                                                ; +0xa2, 0x1005438e2\nmov     rsi, r12; __src                                                ; +0xa5, 0x1005438e5\nmov     rdx, r15; __len                                                ; +0xa8, 0x1005438e8\ncall    _memmove                                                       ; +0xab, 0x1005438eb\nmov     byte ptr [r13+r15+0], 0                                        ; +0xb0, 0x1005438f0\nlea     rdx, [rbp+__dst]                                               ; +0xb6, 0x1005438f6\nmov     rdi, r14                                                       ; +0xba, 0x1005438fa\nmov     rsi, rbx                                                       ; +0xbd, 0x1005438fd\ncall    cocos2d__CCDictionary__setObject                               ; +0xc0, 0x100543900\ntest    byte ptr [rbp+__dst], 1                                        ; +0xc5, 0x100543905\njz      short loc_100543914                                            ; +0xc9, 0x100543909\nmov     rdi, [rbp+__p]; __p                                            ; +0xcb, 0x10054390b\ncall    __ZdlPv; operator delete(void *)                               ; +0xcf, 0x10054390f\nadd     rsp, 28h                                                       ; +0xd4, 0x100543914\npop     rbx                                                            ; +0xd8, 0x100543918\npop     r12                                                            ; +0xd9, 0x100543919\npop     r13                                                            ; +0xdb, 0x10054391b\npop     r14                                                            ; +0xdd, 0x10054391d\npop     r15                                                            ; +0xdf, 0x10054391f\npop     rbp                                                            ; +0xe1, 0x100543921\nretn                                                                   ; +0xe2, 0x100543922\ncall    sub_100003630                                                  ; +0xe3, 0x100543923", "xrefs": ["LevelListLayer::onFavorite @ 0x1003491bf", "GameLevelManager::saveFetchedLevelLists @ 0x100543811"], "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"}