{"type": "func", "start": 4300414896, "end": 4300415128, "name": "GameLevelManager::saveLevelList", "pseudocode": "// \n// GameLevelManager::saveLevelList from 0x100531fb0 to 0x100532098 (232 bytes)\n// \n// 2 xrefs:\n// > LevelListLayer::onFavorite @ 0x10035dbff\n// > GameLevelManager::saveFetchedLevelLists @ 0x100531f81\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::saveLevelList(GameLevelManager *a1, GJLevelList *a2)\n{\n  double v2; // xmm0_8\n  cocos2d::CCDictionary *m_favoriteLists; // r14\n  cocos2d::CCString *v4; // rax\n  const char *CString; // r12\n  size_t v6; // rax\n  size_t v7; // r15\n  char *v8; // r13\n  size_t v9; // r14\n  char v10; // [rsp+0h] [rbp-50h]\n  cocos2d::CCDictionary *v11; // [rsp+8h] [rbp-48h]\n  _QWORD __dst[2]; // [rsp+10h] [rbp-40h] BYREF\n  void *__p; // [rsp+20h] [rbp-30h]\n\n  m_favoriteLists = a1->m_favoriteLists;\n  v4 = (cocos2d::CCString *)sub_1007AB580(\"%i\", v10);\n  CString = cocos2d::CCString::getCString(v4);\n  v6 = strlen(CString);\n  if ( v6 >= 0xFFFFFFFFFFFFFFF8LL )\n    sub_100006BF0(v2);\n  v7 = v6;\n  if ( v6 >= 0x17 )\n  {\n    v11 = m_favoriteLists;\n    v9 = 26;\n    if ( (v6 | 7) != 0x17 )\n      v9 = (v6 | 7) + 1;\n    v8 = (char *)operator new(v9);\n    __p = v8;\n    __dst[0] = v9 + 1;\n    m_favoriteLists = v11;\n    __dst[1] = v7;\n    goto LABEL_8;\n  }\n  LOBYTE(__dst[0]) = 2 * v6;\n  v8 = (char *)__dst + 1;\n  if ( v6 )\nLABEL_8:\n    memmove(v8, CString, v7);\n  v8[v7] = 0;\n  cocos2d::CCDictionary::setObject_1((__int64)m_favoriteLists, a2, (char *)__dst);\n  if ( (__dst[0] & 1) != 0 )\n    operator delete(__p);\n}", "assembly": "; \n; GameLevelManager::saveLevelList from 0x100531fb0 to 0x100532098 (232 bytes)\n; \n; 2 xrefs:\n; > LevelListLayer::onFavorite @ 0x10035dbff\n; > GameLevelManager::saveFetchedLevelLists @ 0x100531f81\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, 0x100531fb0\nmov     rbp, rsp                                                       ; +0x1, 0x100531fb1\npush    r15                                                            ; +0x4, 0x100531fb4\npush    r14                                                            ; +0x6, 0x100531fb6\npush    r13                                                            ; +0x8, 0x100531fb8\npush    r12                                                            ; +0xa, 0x100531fba\npush    rbx                                                            ; +0xc, 0x100531fbc\nsub     rsp, 28h                                                       ; +0xd, 0x100531fbd\nmov     rbx, rsi                                                       ; +0x11, 0x100531fc1\nmov     r14, [rdi+180h]                                                ; +0x14, 0x100531fc4\nmov     esi, [rsi+158h]                                                ; +0x1b, 0x100531fcb\nlea     rdi, aI; \"%i\"                                                  ; +0x21, 0x100531fd1\nxor     eax, eax                                                       ; +0x28, 0x100531fd8\ncall    sub_1007AB580                                                  ; +0x2a, 0x100531fda\nmov     rdi, rax                                                       ; +0x2f, 0x100531fdf\ncall    cocos2d__CCString__getCString                                  ; +0x32, 0x100531fe2\nmov     r12, rax                                                       ; +0x37, 0x100531fe7\nmov     rdi, rax; __s                                                  ; +0x3a, 0x100531fea\ncall    _strlen                                                        ; +0x3d, 0x100531fed\ncmp     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0x42, 0x100531ff2\njnb     loc_100532093                                                  ; +0x46, 0x100531ff6\nmov     r15, rax                                                       ; +0x4c, 0x100531ffc\ncmp     rax, 17h                                                       ; +0x4f, 0x100531fff\njnb     short loc_100532017                                            ; +0x53, 0x100532003\nlea     eax, [r15+r15]                                                 ; +0x55, 0x100532005\nmov     byte ptr [rbp+__dst], al                                       ; +0x59, 0x100532009\nlea     r13, [rbp+__dst+1]                                             ; +0x5c, 0x10053200c\ntest    r15, r15                                                       ; +0x60, 0x100532010\njnz     short loc_100532052                                            ; +0x63, 0x100532013\njmp     short loc_100532060                                            ; +0x65, 0x100532015\nmov     rax, r15                                                       ; +0x67, 0x100532017\nor      rax, 7                                                         ; +0x6a, 0x10053201a\nlea     rcx, [rax+1]                                                   ; +0x6e, 0x10053201e\ncmp     rax, 17h                                                       ; +0x72, 0x100532022\nmov     [rbp+var_48], r14                                              ; +0x76, 0x100532026\nmov     r14d, 1Ah                                                      ; +0x7a, 0x10053202a\ncmovnz  r14, rcx                                                       ; +0x80, 0x100532030\nmov     rdi, r14; __sz                                                 ; +0x84, 0x100532034\ncall    __Znwm; operator new(ulong)                                    ; +0x87, 0x100532037\nmov     r13, rax                                                       ; +0x8c, 0x10053203c\nmov     [rbp+__p], rax                                                 ; +0x8f, 0x10053203f\ninc     r14                                                            ; +0x93, 0x100532043\nmov     [rbp+__dst], r14                                               ; +0x96, 0x100532046\nmov     r14, [rbp+var_48]                                              ; +0x9a, 0x10053204a\nmov     [rbp+var_38], r15                                              ; +0x9e, 0x10053204e\nmov     rdi, r13; __dst                                                ; +0xa2, 0x100532052\nmov     rsi, r12; __src                                                ; +0xa5, 0x100532055\nmov     rdx, r15; __len                                                ; +0xa8, 0x100532058\ncall    _memmove                                                       ; +0xab, 0x10053205b\nmov     byte ptr [r13+r15+0], 0                                        ; +0xb0, 0x100532060\nlea     rdx, [rbp+__dst]                                               ; +0xb6, 0x100532066\nmov     rdi, r14                                                       ; +0xba, 0x10053206a\nmov     rsi, rbx                                                       ; +0xbd, 0x10053206d\ncall    cocos2d__CCDictionary__setObject_1                             ; +0xc0, 0x100532070\ntest    byte ptr [rbp+__dst], 1                                        ; +0xc5, 0x100532075\njz      short loc_100532084                                            ; +0xc9, 0x100532079\nmov     rdi, [rbp+__p]; __p                                            ; +0xcb, 0x10053207b\ncall    __ZdlPv; operator delete(void *)                               ; +0xcf, 0x10053207f\nadd     rsp, 28h                                                       ; +0xd4, 0x100532084\npop     rbx                                                            ; +0xd8, 0x100532088\npop     r12                                                            ; +0xd9, 0x100532089\npop     r13                                                            ; +0xdb, 0x10053208b\npop     r14                                                            ; +0xdd, 0x10053208d\npop     r15                                                            ; +0xdf, 0x10053208f\npop     rbp                                                            ; +0xe1, 0x100532091\nretn                                                                   ; +0xe2, 0x100532092\ncall    sub_100006BF0                                                  ; +0xe3, 0x100532093", "xrefs": ["LevelListLayer::onFavorite @ 0x10035dbff", "GameLevelManager::saveFetchedLevelLists @ 0x100531f81"], "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"}