{"type": "func", "start": 5370089184, "end": 5370089401, "name": "GameLevelManager::saveLevelList", "pseudocode": "// \n// GameLevelManager::saveLevelList from 0x140150ee0 to 0x140150fb9 (217 bytes)\n// \n// 2 xrefs:\n// > LevelListLayer::onFavorite @ 0x1403077fa\n// > <???> @ 0x1406ca854\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::saveLevelList(GameLevelManager *a1, GJLevelList *a2)\n{\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rax\n  size_t v6; // r8\n  void *v7; // rcx\n  void *Block[2]; // [rsp+20h] [rbp-38h] BYREF\n  __int128 v9; // [rsp+30h] [rbp-28h]\n\n  v4 = cocos2d::CCString::createWithFormat(\"%i\", a2->m_listID);\n  CString = cocos2d::CCString::getCString(v4);\n  *(_OWORD *)Block = 0;\n  v9 = 0;\n  v6 = -1;\n  do\n    ++v6;\n  while ( CString[v6] );\n  sub_14003A930(Block, CString, v6);\n  cocos2d::CCDictionary::setObject(a1->m_favoriteLists, a2, Block);\n  if ( *((_QWORD *)&v9 + 1) > 0xFu )\n  {\n    v7 = Block[0];\n    if ( (unsigned __int64)(*((_QWORD *)&v9 + 1) + 1LL) >= 0x1000 )\n    {\n      v7 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v7 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v7);\n  }\n}", "assembly": "; \n; GameLevelManager::saveLevelList from 0x140150ee0 to 0x140150fb9 (217 bytes)\n; \n; 2 xrefs:\n; > LevelListLayer::onFavorite @ 0x1403077fa\n; > <???> @ 0x1406ca854\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_10], rbx                                              ; +0x0, 0x140150ee0\npush    rdi                                                            ; +0x5, 0x140150ee5\nsub     rsp, 50h                                                       ; +0x6, 0x140150ee6\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x140150eea\nxor     rax, rsp                                                       ; +0x11, 0x140150ef1\nmov     [rsp+58h+var_18], rax                                          ; +0x14, 0x140150ef4\nmov     rbx, rdx                                                       ; +0x19, 0x140150ef9\nmov     rdi, rcx                                                       ; +0x1c, 0x140150efc\nmov     edx, [rdx+158h]                                                ; +0x1f, 0x140150eff\nlea     rcx, aI_11; \"%i\"                                               ; +0x25, 0x140150f05\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x2c, 0x140150f0c\nmov     rcx, rax                                                       ; +0x32, 0x140150f12\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x35, 0x140150f15\nxorps   xmm0, xmm0                                                     ; +0x3b, 0x140150f1b\nmovups  xmmword ptr [rsp+58h+Block], xmm0                              ; +0x3e, 0x140150f1e\nxorps   xmm1, xmm1                                                     ; +0x43, 0x140150f23\nmovdqu  [rsp+58h+var_28], xmm1                                         ; +0x46, 0x140150f26\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x4c, 0x140150f2c\ninc     r8                                                             ; +0x53, 0x140150f33\ncmp     byte ptr [rax+r8], 0                                           ; +0x56, 0x140150f36\njnz     short loc_140150F33                                            ; +0x5b, 0x140150f3b\nmov     rdx, rax                                                       ; +0x5d, 0x140150f3d\nlea     rcx, [rsp+58h+Block]                                           ; +0x60, 0x140150f40\ncall    sub_14003A930                                                  ; +0x65, 0x140150f45\nnop                                                                    ; +0x6a, 0x140150f4a\nlea     r8, [rsp+58h+Block]                                            ; +0x6b, 0x140150f4b\nmov     rdx, rbx                                                       ; +0x70, 0x140150f50\nmov     rcx, [rdi+178h]                                                ; +0x73, 0x140150f53\ncall    cs:?setObject@CCDictionary@cocos2d@@QEAAXPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::setObject(cocos2d::CCObject *,std::string const &) ; +0x7a, 0x140150f5a\nnop                                                                    ; +0x80, 0x140150f60\nmov     rdx, qword ptr [rsp+58h+var_28+8]                              ; +0x81, 0x140150f61\ncmp     rdx, 0Fh                                                       ; +0x86, 0x140150f66\njbe     short loc_140150FA1                                            ; +0x8a, 0x140150f6a\ninc     rdx                                                            ; +0x8c, 0x140150f6c\nmov     rcx, [rsp+58h+Block]; Block                                    ; +0x8f, 0x140150f6f\nmov     rax, rcx                                                       ; +0x94, 0x140150f74\ncmp     rdx, 1000h                                                     ; +0x97, 0x140150f77\njb      short loc_140150F9C                                            ; +0x9e, 0x140150f7e\nadd     rdx, 27h ; '''                                                 ; +0xa0, 0x140150f80\nmov     rcx, [rcx-8]                                                   ; +0xa4, 0x140150f84\nsub     rax, rcx                                                       ; +0xa8, 0x140150f88\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xab, 0x140150f8b\ncmp     rax, 1Fh                                                       ; +0xaf, 0x140150f8f\njbe     short loc_140150F9C                                            ; +0xb3, 0x140150f93\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xb5, 0x140150f95\nalign 4                                                                ; +0xbb, 0x140150f9b\ncall    j_j_free                                                       ; +0xbc, 0x140150f9c\nmov     rcx, [rsp+58h+var_18]                                          ; +0xc1, 0x140150fa1\nxor     rcx, rsp; StackCookie                                          ; +0xc6, 0x140150fa6\ncall    __security_check_cookie                                        ; +0xc9, 0x140150fa9\nmov     rbx, [rsp+58h+arg_10]                                          ; +0xce, 0x140150fae\nadd     rsp, 50h                                                       ; +0xd3, 0x140150fb3\npop     rdi                                                            ; +0xd7, 0x140150fb7\nretn                                                                   ; +0xd8, 0x140150fb8", "xrefs": ["LevelListLayer::onFavorite @ 0x1403077fa", "<???> @ 0x1406ca854"], "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"}