{"type": "func", "start": 5370089408, "end": 5370089972, "name": "GameLevelManager::updateSavedLevelList", "pseudocode": "// \n// GameLevelManager::updateSavedLevelList from 0x140150fc0 to 0x1401511f4 (564 bytes)\n// \n// 3 xrefs:\n// > LevelListCell::onClick @ 0x1400c01a4\n// > GameLevelManager::onGetLevelListsCompleted @ 0x140150cd8\n// > <???> @ 0x1406ca860\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=2\nvoid GameLevelManager::updateSavedLevelList(GameLevelManager *a1, GJLevelList *a2)\n{\n  __int64 v3; // rbx\n  cocos2d::CCString *v4; // rax\n  const char *CString; // rax\n  size_t v6; // r8\n  __int64 v7; // rbx\n  void *v8; // rcx\n  std::string *p_m_creatorName; // rdx\n  std::string *p_m_listName; // rdx\n  std::string *p_m_listDesc; // rdx\n  __int64 v12; // rax\n  void *v13; // [rsp+20h] [rbp-58h]\n  _BYTE v14[32]; // [rsp+28h] [rbp-50h] BYREF\n  void *Block[2]; // [rsp+48h] [rbp-30h] BYREF\n  __int64 v16; // [rsp+58h] [rbp-20h]\n  unsigned __int64 v17; // [rsp+60h] [rbp-18h]\n\n  v3 = qword_1406C2EC0;\n  if ( !qword_1406C2EC0 )\n  {\n    v13 = operator new(0x3D0u);\n    qword_1406C2EC0 = sub_140141280((__int64)v13);\n    (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_1406C2EC0 + 72LL))(qword_1406C2EC0);\n    v3 = qword_1406C2EC0;\n  }\n  v4 = cocos2d::CCString::createWithFormat(\"%i\", a2->m_listID);\n  CString = cocos2d::CCString::getCString(v4);\n  *(_OWORD *)Block = 0;\n  v16 = 0;\n  v17 = 0;\n  v6 = -1;\n  do\n    ++v6;\n  while ( CString[v6] );\n  sub_14003A930(Block, CString, v6);\n  v7 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(v3 + 376), Block);\n  if ( v17 > 0xF )\n  {\n    v8 = Block[0];\n    if ( v17 + 1 >= 0x1000 )\n    {\n      v8 = *((void **)Block[0] - 1);\n      if ( (unsigned __int64)((char *)Block[0] - (char *)v8 - 8) > 0x1F )\n        invalid_parameter_noinfo_noreturn();\n    }\n    j_j_free(v8);\n  }\n  v16 = 0;\n  v17 = 15;\n  LOBYTE(Block[0]) = 0;\n  if ( v7 )\n  {\n    *(_DWORD *)(v7 + 348) = a2->m_listVersion;\n    *(_DWORD *)(v7 + 352) = a2->m_downloads;\n    *(_DWORD *)(v7 + 356) = a2->m_likes;\n    *(_DWORD *)(v7 + 360) = a2->m_difficulty;\n    *(_DWORD *)(v7 + 364) = a2->m_accountID;\n    *(_BYTE *)(v7 + 397) = a2->m_featured;\n    if ( (std::string *)(v7 + 400) != &a2->m_creatorName )\n    {\n      p_m_creatorName = &a2->m_creatorName;\n      if ( a2->m_creatorName.m_data.m_capacity > 0xF )\n        p_m_creatorName = (std::string *)a2->m_creatorName.m_data.m_bigStorage;\n      sub_14003CCE0((void **)(v7 + 400), p_m_creatorName, a2->m_creatorName.m_data.m_size);\n    }\n    if ( (std::string *)(v7 + 432) != &a2->m_listName )\n    {\n      p_m_listName = &a2->m_listName;\n      if ( a2->m_listName.m_data.m_capacity > 0xF )\n        p_m_listName = (std::string *)a2->m_listName.m_data.m_bigStorage;\n      sub_14003CCE0((void **)(v7 + 432), p_m_listName, a2->m_listName.m_data.m_size);\n    }\n    if ( (std::string *)(v7 + 528) != &a2->m_listDesc )\n    {\n      p_m_listDesc = &a2->m_listDesc;\n      if ( a2->m_listDesc.m_data.m_capacity > 0xF )\n        p_m_listDesc = (std::string *)a2->m_listDesc.m_data.m_bigStorage;\n      sub_14003CCE0((void **)(v7 + 528), p_m_listDesc, a2->m_listDesc.m_data.m_size);\n    }\n    *(_DWORD *)(v7 + 560) = a2->m_uploadDate;\n    *(_DWORD *)(v7 + 564) = a2->m_updateDate;\n    v12 = sub_14003BDB0((__int64)v14, (__int64)&a2->m_levelsString);\n    GJLevelList::parseListLevels(v7, v12);\n  }\n}", "assembly": "; \n; GameLevelManager::updateSavedLevelList from 0x140150fc0 to 0x1401511f4 (564 bytes)\n; \n; 3 xrefs:\n; > LevelListCell::onClick @ 0x1400c01a4\n; > GameLevelManager::onGetLevelListsCompleted @ 0x140150cd8\n; > <???> @ 0x1406ca860\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_0], rbx                                               ; +0x0, 0x140150fc0\npush    rdi                                                            ; +0x5, 0x140150fc5\nsub     rsp, 70h                                                       ; +0x6, 0x140150fc6\nmov     rax, cs:__security_cookie                                      ; +0xa, 0x140150fca\nxor     rax, rsp                                                       ; +0x11, 0x140150fd1\nmov     [rsp+78h+var_10], rax                                          ; +0x14, 0x140150fd4\nmov     rdi, rdx                                                       ; +0x19, 0x140150fd9\nmov     rbx, cs:qword_1406C2EC0                                        ; +0x1c, 0x140150fdc\ntest    rbx, rbx                                                       ; +0x23, 0x140150fe3\njnz     short loc_140151017                                            ; +0x26, 0x140150fe6\nmov     ecx, 3D0h; Size                                                ; +0x28, 0x140150fe8\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x2d, 0x140150fed\nmov     [rsp+78h+var_58], rax                                          ; +0x32, 0x140150ff2\nmov     rcx, rax                                                       ; +0x37, 0x140150ff7\ncall    sub_140141280                                                  ; +0x3a, 0x140150ffa\nnop                                                                    ; +0x3f, 0x140150fff\nmov     cs:qword_1406C2EC0, rax                                        ; +0x40, 0x140151000\nmov     rdx, [rax]                                                     ; +0x47, 0x140151007\nmov     rcx, rax                                                       ; +0x4a, 0x14015100a\ncall    qword ptr [rdx+48h]                                            ; +0x4d, 0x14015100d\nmov     rbx, cs:qword_1406C2EC0                                        ; +0x50, 0x140151010\nmov     edx, [rdi+158h]                                                ; +0x57, 0x140151017\nlea     rcx, aI_11; \"%i\"                                               ; +0x5d, 0x14015101d\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x64, 0x140151024\nmov     rcx, rax                                                       ; +0x6a, 0x14015102a\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x6d, 0x14015102d\nxorps   xmm0, xmm0                                                     ; +0x73, 0x140151033\nmovups  xmmword ptr [rsp+78h+Block], xmm0                              ; +0x76, 0x140151036\nmov     [rsp+78h+var_20], 0                                            ; +0x7b, 0x14015103b\nmov     [rsp+78h+var_18], 0                                            ; +0x84, 0x140151044\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x8d, 0x14015104d\ninc     r8                                                             ; +0x94, 0x140151054\ncmp     byte ptr [rax+r8], 0                                           ; +0x97, 0x140151057\njnz     short loc_140151054                                            ; +0x9c, 0x14015105c\nmov     rdx, rax                                                       ; +0x9e, 0x14015105e\nlea     rcx, [rsp+78h+Block]                                           ; +0xa1, 0x140151061\ncall    sub_14003A930                                                  ; +0xa6, 0x140151066\nnop                                                                    ; +0xab, 0x14015106b\nlea     rdx, [rsp+78h+Block]                                           ; +0xac, 0x14015106c\nmov     rcx, [rbx+178h]                                                ; +0xb1, 0x140151071\ncall    cs:?objectForKey@CCDictionary@cocos2d@@QEAAPEAVCCObject@2@AEBV?$basic_string@DU?$char_traits@D@std@@V?$allocator@D@2@@std@@@Z; cocos2d::CCDictionary::objectForKey(std::string const &) ; +0xb8, 0x140151078\nmov     rbx, rax                                                       ; +0xbe, 0x14015107e\nmov     rdx, [rsp+78h+var_18]                                          ; +0xc1, 0x140151081\ncmp     rdx, 0Fh                                                       ; +0xc6, 0x140151086\njbe     short loc_1401510C1                                            ; +0xca, 0x14015108a\ninc     rdx                                                            ; +0xcc, 0x14015108c\nmov     rcx, [rsp+78h+Block]; Block                                    ; +0xcf, 0x14015108f\nmov     rax, rcx                                                       ; +0xd4, 0x140151094\ncmp     rdx, 1000h                                                     ; +0xd7, 0x140151097\njb      short loc_1401510BC                                            ; +0xde, 0x14015109e\nadd     rdx, 27h ; '''                                                 ; +0xe0, 0x1401510a0\nmov     rcx, [rcx-8]                                                   ; +0xe4, 0x1401510a4\nsub     rax, rcx                                                       ; +0xe8, 0x1401510a8\nadd     rax, 0FFFFFFFFFFFFFFF8h                                        ; +0xeb, 0x1401510ab\ncmp     rax, 1Fh                                                       ; +0xef, 0x1401510af\njbe     short loc_1401510BC                                            ; +0xf3, 0x1401510b3\ncall    cs:_invalid_parameter_noinfo_noreturn                          ; +0xf5, 0x1401510b5\nalign 4                                                                ; +0xfb, 0x1401510bb\ncall    j_j_free                                                       ; +0xfc, 0x1401510bc\nmov     [rsp+78h+var_20], 0                                            ; +0x101, 0x1401510c1\nmov     [rsp+78h+var_18], 0Fh                                          ; +0x10a, 0x1401510ca\nmov     byte ptr [rsp+78h+Block], 0                                    ; +0x113, 0x1401510d3\ntest    rbx, rbx                                                       ; +0x118, 0x1401510d8\njz      loc_1401511D9                                                  ; +0x11b, 0x1401510db\nmov     eax, [rdi+15Ch]                                                ; +0x121, 0x1401510e1\nmov     [rbx+15Ch], eax                                                ; +0x127, 0x1401510e7\nmov     eax, [rdi+160h]                                                ; +0x12d, 0x1401510ed\nmov     [rbx+160h], eax                                                ; +0x133, 0x1401510f3\nmov     eax, [rdi+164h]                                                ; +0x139, 0x1401510f9\nmov     [rbx+164h], eax                                                ; +0x13f, 0x1401510ff\nmov     eax, [rdi+168h]                                                ; +0x145, 0x140151105\nmov     [rbx+168h], eax                                                ; +0x14b, 0x14015110b\nmov     eax, [rdi+16Ch]                                                ; +0x151, 0x140151111\nmov     [rbx+16Ch], eax                                                ; +0x157, 0x140151117\nmovzx   eax, byte ptr [rdi+18Dh]                                       ; +0x15d, 0x14015111d\nmov     [rbx+18Dh], al                                                 ; +0x164, 0x140151124\nlea     r8, [rdi+190h]                                                 ; +0x16a, 0x14015112a\nlea     rcx, [rbx+190h]; void *                                        ; +0x171, 0x140151131\ncmp     rcx, r8                                                        ; +0x178, 0x140151138\njz      short loc_140151153                                            ; +0x17b, 0x14015113b\nmov     rdx, r8                                                        ; +0x17d, 0x14015113d\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x180, 0x140151140\njbe     short loc_14015114A                                            ; +0x185, 0x140151145\nmov     rdx, [r8]; Src                                                 ; +0x187, 0x140151147\nmov     r8, [r8+10h]; Size                                             ; +0x18a, 0x14015114a\ncall    sub_14003CCE0                                                  ; +0x18e, 0x14015114e\nlea     r8, [rdi+1B0h]                                                 ; +0x193, 0x140151153\nlea     rcx, [rbx+1B0h]; void *                                        ; +0x19a, 0x14015115a\ncmp     rcx, r8                                                        ; +0x1a1, 0x140151161\njz      short loc_14015117C                                            ; +0x1a4, 0x140151164\nmov     rdx, r8                                                        ; +0x1a6, 0x140151166\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x1a9, 0x140151169\njbe     short loc_140151173                                            ; +0x1ae, 0x14015116e\nmov     rdx, [r8]; Src                                                 ; +0x1b0, 0x140151170\nmov     r8, [r8+10h]; Size                                             ; +0x1b3, 0x140151173\ncall    sub_14003CCE0                                                  ; +0x1b7, 0x140151177\nlea     r8, [rdi+210h]                                                 ; +0x1bc, 0x14015117c\nlea     rcx, [rbx+210h]; void *                                        ; +0x1c3, 0x140151183\ncmp     rcx, r8                                                        ; +0x1ca, 0x14015118a\njz      short loc_1401511A5                                            ; +0x1cd, 0x14015118d\nmov     rdx, r8                                                        ; +0x1cf, 0x14015118f\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x1d2, 0x140151192\njbe     short loc_14015119C                                            ; +0x1d7, 0x140151197\nmov     rdx, [r8]; Src                                                 ; +0x1d9, 0x140151199\nmov     r8, [r8+10h]; Size                                             ; +0x1dc, 0x14015119c\ncall    sub_14003CCE0                                                  ; +0x1e0, 0x1401511a0\nmov     eax, [rdi+230h]                                                ; +0x1e5, 0x1401511a5\nmov     [rbx+230h], eax                                                ; +0x1eb, 0x1401511ab\nmov     eax, [rdi+234h]                                                ; +0x1f1, 0x1401511b1\nmov     [rbx+234h], eax                                                ; +0x1f7, 0x1401511b7\nlea     rdx, [rdi+1F0h]                                                ; +0x1fd, 0x1401511bd\nlea     rcx, [rsp+78h+var_50]                                          ; +0x204, 0x1401511c4\ncall    sub_14003BDB0                                                  ; +0x209, 0x1401511c9\nmov     rdx, rax                                                       ; +0x20e, 0x1401511ce\nmov     rcx, rbx                                                       ; +0x211, 0x1401511d1\ncall    GJLevelList__parseListLevels                                   ; +0x214, 0x1401511d4\nmov     rcx, [rsp+78h+var_10]                                          ; +0x219, 0x1401511d9\nxor     rcx, rsp; StackCookie                                          ; +0x21e, 0x1401511de\ncall    __security_check_cookie                                        ; +0x221, 0x1401511e1\nmov     rbx, [rsp+78h+arg_0]                                           ; +0x226, 0x1401511e6\nadd     rsp, 70h                                                       ; +0x22e, 0x1401511ee\npop     rdi                                                            ; +0x232, 0x1401511f2\nretn                                                                   ; +0x233, 0x1401511f3", "xrefs": ["LevelListCell::onClick @ 0x1400c01a4", "GameLevelManager::onGetLevelListsCompleted @ 0x140150cd8", "<???> @ 0x1406ca860"], "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"}