{"type": "func", "start": 5371005552, "end": 5371006145, "name": "GameLevelManager::updateSavedLevelList", "pseudocode": "// \n// GameLevelManager::updateSavedLevelList from 0x140230a70 to 0x140230cc1 (593 bytes)\n// \n// 3 xrefs:\n// > LevelListCell::onClick @ 0x14015f9ba\n// > GameLevelManager::onGetLevelListsCompleted @ 0x14022e088\n// > <???> @ 0x14091bed8\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 11:28:30 +0000\n// \n\n// Hidden C++ exception states: #wind=2\nvoid __fastcall GameLevelManager::updateSavedLevelList(__int64 a1, _QWORD *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  void *v9; // rdx\n  void *v10; // rdx\n  void *v11; // rdx\n  __int64 v12; // rax\n  void *v13; // [rsp+30h] [rbp-58h]\n  _BYTE v14[32]; // [rsp+38h] [rbp-50h] BYREF\n  void *Block[2]; // [rsp+58h] [rbp-30h] BYREF\n  __int64 v16; // [rsp+68h] [rbp-20h]\n  unsigned __int64 v17; // [rsp+70h] [rbp-18h]\n\n  v3 = *(_QWORD *)&qword_14090BFB0;\n  if ( !*(_QWORD *)&qword_14090BFB0 )\n  {\n    v13 = operator new(0x690u);\n    *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v13);\n    (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    v3 = *(_QWORD *)&qword_14090BFB0;\n  }\n  v4 = cocos2d::CCString::createWithFormat((const char *)&word_1406ED6F8, *((unsigned int *)a2 + 86));\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_14003D230(Block, CString, v6);\n  v7 = cocos2d::CCDictionary::objectForKey(*(_QWORD *)(v3 + 880), 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        invoke_watson(nullptr, nullptr, nullptr, 0, 0);\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) = *((_DWORD *)a2 + 87);\n    *(_DWORD *)(v7 + 352) = *((_DWORD *)a2 + 88);\n    *(_DWORD *)(v7 + 356) = *((_DWORD *)a2 + 89);\n    *(_DWORD *)(v7 + 360) = *((_DWORD *)a2 + 90);\n    *(_DWORD *)(v7 + 364) = *((_DWORD *)a2 + 91);\n    *(_BYTE *)(v7 + 397) = *((_BYTE *)a2 + 397);\n    if ( (_QWORD *)(v7 + 408) != a2 + 51 )\n    {\n      v9 = a2 + 51;\n      if ( a2[54] > 0xFu )\n        v9 = (void *)a2[51];\n      sub_1400405A0((void **)(v7 + 408), v9, a2[53]);\n    }\n    if ( (_QWORD *)(v7 + 440) != a2 + 55 )\n    {\n      v10 = a2 + 55;\n      if ( a2[58] > 0xFu )\n        v10 = (void *)a2[55];\n      sub_1400405A0((void **)(v7 + 440), v10, a2[57]);\n    }\n    if ( (_QWORD *)(v7 + 536) != a2 + 67 )\n    {\n      v11 = a2 + 67;\n      if ( a2[70] > 0xFu )\n        v11 = (void *)a2[67];\n      sub_1400405A0((void **)(v7 + 536), v11, a2[69]);\n    }\n    *(_DWORD *)(v7 + 568) = *((_DWORD *)a2 + 142);\n    *(_DWORD *)(v7 + 572) = *((_DWORD *)a2 + 143);\n    v12 = sub_14003F4F0((__int64)v14, (__int64)(a2 + 63));\n    GJLevelList::parseListLevels(v7, v12);\n  }\n}", "assembly": "; \n; GameLevelManager::updateSavedLevelList from 0x140230a70 to 0x140230cc1 (593 bytes)\n; \n; 3 xrefs:\n; > LevelListCell::onClick @ 0x14015f9ba\n; > GameLevelManager::onGetLevelListsCompleted @ 0x14022e088\n; > <???> @ 0x14091bed8\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 11:28:30 +0000\n; \nmov     [rsp+arg_0], rbx                                               ; +0x0, 0x140230a70\nmov     [rsp+arg_10], rsi                                              ; +0x5, 0x140230a75\npush    rdi                                                            ; +0xa, 0x140230a7a\nsub     rsp, 80h                                                       ; +0xb, 0x140230a7b\nmov     rax, cs:__security_cookie                                      ; +0x12, 0x140230a82\nxor     rax, rsp                                                       ; +0x19, 0x140230a89\nmov     [rsp+88h+var_10], rax                                          ; +0x1c, 0x140230a8c\nmov     rdi, rdx                                                       ; +0x21, 0x140230a91\nmov     rbx, cs:qword_14090BFB0                                        ; +0x24, 0x140230a94\ntest    rbx, rbx                                                       ; +0x2b, 0x140230a9b\njnz     short loc_140230AD2                                            ; +0x2e, 0x140230a9e\nmov     ecx, 690h; Size                                                ; +0x30, 0x140230aa0\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x35, 0x140230aa5\nmov     [rsp+88h+var_58], rax                                          ; +0x3a, 0x140230aaa\nmov     rcx, rax                                                       ; +0x3f, 0x140230aaf\ncall    GameLevelManager__GameLevelManager                             ; +0x42, 0x140230ab2\nnop                                                                    ; +0x47, 0x140230ab7\nmov     cs:qword_14090BFB0, rax                                        ; +0x48, 0x140230ab8\nmov     rcx, [rax]                                                     ; +0x4f, 0x140230abf\nmov     rdx, [rcx+48h]                                                 ; +0x52, 0x140230ac2\nmov     rcx, rax                                                       ; +0x56, 0x140230ac6\ncall    rdx                                                            ; +0x59, 0x140230ac9\nmov     rbx, cs:qword_14090BFB0                                        ; +0x5b, 0x140230acb\nmov     edx, [rdi+158h]                                                ; +0x62, 0x140230ad2\nlea     rcx, word_1406ED6F8                                            ; +0x68, 0x140230ad8\ncall    cs:?createWithFormat@CCString@cocos2d@@SAPEAV12@PEBDZZ; cocos2d::CCString::createWithFormat(char const *,...) ; +0x6f, 0x140230adf\nmov     rcx, rax                                                       ; +0x75, 0x140230ae5\ncall    cs:?getCString@CCString@cocos2d@@QEBAPEBDXZ; cocos2d::CCString::getCString(void) ; +0x78, 0x140230ae8\nxorps   xmm0, xmm0                                                     ; +0x7e, 0x140230aee\nmovups  xmmword ptr [rsp+88h+Block], xmm0                              ; +0x81, 0x140230af1\nxor     esi, esi                                                       ; +0x86, 0x140230af6\nmov     [rsp+88h+var_20], rsi                                          ; +0x88, 0x140230af8\nmov     [rsp+88h+var_18], rsi                                          ; +0x8d, 0x140230afd\nmov     r8, 0FFFFFFFFFFFFFFFFh                                         ; +0x92, 0x140230b02\nnop     dword ptr [rax+00000000h]                                      ; +0x99, 0x140230b09\ninc     r8                                                             ; +0xa0, 0x140230b10\ncmp     [rax+r8], sil                                                  ; +0xa3, 0x140230b13\njnz     short loc_140230B10                                            ; +0xa7, 0x140230b17\nmov     rdx, rax                                                       ; +0xa9, 0x140230b19\nlea     rcx, [rsp+88h+Block]                                           ; +0xac, 0x140230b1c\ncall    sub_14003D230                                                  ; +0xb1, 0x140230b21\nnop                                                                    ; +0xb6, 0x140230b26\nlea     rdx, [rsp+88h+Block]                                           ; +0xb7, 0x140230b27\nmov     rcx, [rbx+370h]                                                ; +0xbc, 0x140230b2c\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 &) ; +0xc3, 0x140230b33\nmov     rbx, rax                                                       ; +0xc9, 0x140230b39\nmov     rdx, [rsp+88h+var_18]                                          ; +0xcc, 0x140230b3c\ncmp     rdx, 0Fh                                                       ; +0xd1, 0x140230b41\njbe     short loc_140230B8B                                            ; +0xd5, 0x140230b45\ninc     rdx                                                            ; +0xd7, 0x140230b47\nmov     rcx, [rsp+88h+Block]; Block                                    ; +0xda, 0x140230b4a\nmov     rax, rcx                                                       ; +0xdf, 0x140230b4f\ncmp     rdx, 1000h                                                     ; +0xe2, 0x140230b52\njb      short loc_140230B86                                            ; +0xe9, 0x140230b59\nadd     rdx, 27h ; '''                                                 ; +0xeb, 0x140230b5b\nmov     rcx, [rcx-8]                                                   ; +0xef, 0x140230b5f\nsub     rax, rcx                                                       ; +0xf3, 0x140230b63\nsub     rax, 8                                                         ; +0xf6, 0x140230b66\ncmp     rax, 1Fh                                                       ; +0xfa, 0x140230b6a\njbe     short loc_140230B86                                            ; +0xfe, 0x140230b6e\nmov     [rsp+88h+Reserved], rsi; Reserved                              ; +0x100, 0x140230b70\nxor     r9d, r9d; LineNo                                               ; +0x105, 0x140230b75\nxor     r8d, r8d; FileName                                             ; +0x108, 0x140230b78\nxor     edx, edx; FunctionName                                         ; +0x10b, 0x140230b7b\nxor     ecx, ecx; Expression                                           ; +0x10d, 0x140230b7d\ncall    cs:_invoke_watson                                              ; +0x10f, 0x140230b7f\nalign 2                                                                ; +0x115, 0x140230b85\ncall    j_j_free                                                       ; +0x116, 0x140230b86\nmov     [rsp+88h+var_20], rsi                                          ; +0x11b, 0x140230b8b\nmov     [rsp+88h+var_18], 0Fh                                          ; +0x120, 0x140230b90\nmov     byte ptr [rsp+88h+Block], 0                                    ; +0x129, 0x140230b99\ntest    rbx, rbx                                                       ; +0x12e, 0x140230b9e\njz      loc_140230C9F                                                  ; +0x131, 0x140230ba1\nmov     eax, [rdi+15Ch]                                                ; +0x137, 0x140230ba7\nmov     [rbx+15Ch], eax                                                ; +0x13d, 0x140230bad\nmov     eax, [rdi+160h]                                                ; +0x143, 0x140230bb3\nmov     [rbx+160h], eax                                                ; +0x149, 0x140230bb9\nmov     eax, [rdi+164h]                                                ; +0x14f, 0x140230bbf\nmov     [rbx+164h], eax                                                ; +0x155, 0x140230bc5\nmov     eax, [rdi+168h]                                                ; +0x15b, 0x140230bcb\nmov     [rbx+168h], eax                                                ; +0x161, 0x140230bd1\nmov     eax, [rdi+16Ch]                                                ; +0x167, 0x140230bd7\nmov     [rbx+16Ch], eax                                                ; +0x16d, 0x140230bdd\nmovzx   eax, byte ptr [rdi+18Dh]                                       ; +0x173, 0x140230be3\nmov     [rbx+18Dh], al                                                 ; +0x17a, 0x140230bea\nlea     r8, [rdi+198h]                                                 ; +0x180, 0x140230bf0\nlea     rcx, [rbx+198h]; void *                                        ; +0x187, 0x140230bf7\ncmp     rcx, r8                                                        ; +0x18e, 0x140230bfe\njz      short loc_140230C19                                            ; +0x191, 0x140230c01\nmov     rdx, r8                                                        ; +0x193, 0x140230c03\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x196, 0x140230c06\njbe     short loc_140230C10                                            ; +0x19b, 0x140230c0b\nmov     rdx, [r8]; Src                                                 ; +0x19d, 0x140230c0d\nmov     r8, [r8+10h]; Size                                             ; +0x1a0, 0x140230c10\ncall    sub_1400405A0                                                  ; +0x1a4, 0x140230c14\nlea     r8, [rdi+1B8h]                                                 ; +0x1a9, 0x140230c19\nlea     rcx, [rbx+1B8h]; void *                                        ; +0x1b0, 0x140230c20\ncmp     rcx, r8                                                        ; +0x1b7, 0x140230c27\njz      short loc_140230C42                                            ; +0x1ba, 0x140230c2a\nmov     rdx, r8                                                        ; +0x1bc, 0x140230c2c\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x1bf, 0x140230c2f\njbe     short loc_140230C39                                            ; +0x1c4, 0x140230c34\nmov     rdx, [r8]; Src                                                 ; +0x1c6, 0x140230c36\nmov     r8, [r8+10h]; Size                                             ; +0x1c9, 0x140230c39\ncall    sub_1400405A0                                                  ; +0x1cd, 0x140230c3d\nlea     r8, [rdi+218h]                                                 ; +0x1d2, 0x140230c42\nlea     rcx, [rbx+218h]; void *                                        ; +0x1d9, 0x140230c49\ncmp     rcx, r8                                                        ; +0x1e0, 0x140230c50\njz      short loc_140230C6B                                            ; +0x1e3, 0x140230c53\nmov     rdx, r8                                                        ; +0x1e5, 0x140230c55\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x1e8, 0x140230c58\njbe     short loc_140230C62                                            ; +0x1ed, 0x140230c5d\nmov     rdx, [r8]; Src                                                 ; +0x1ef, 0x140230c5f\nmov     r8, [r8+10h]; Size                                             ; +0x1f2, 0x140230c62\ncall    sub_1400405A0                                                  ; +0x1f6, 0x140230c66\nmov     eax, [rdi+238h]                                                ; +0x1fb, 0x140230c6b\nmov     [rbx+238h], eax                                                ; +0x201, 0x140230c71\nmov     eax, [rdi+23Ch]                                                ; +0x207, 0x140230c77\nmov     [rbx+23Ch], eax                                                ; +0x20d, 0x140230c7d\nlea     rdx, [rdi+1F8h]                                                ; +0x213, 0x140230c83\nlea     rcx, [rsp+88h+var_50]                                          ; +0x21a, 0x140230c8a\ncall    sub_14003F4F0                                                  ; +0x21f, 0x140230c8f\nmov     rdx, rax                                                       ; +0x224, 0x140230c94\nmov     rcx, rbx                                                       ; +0x227, 0x140230c97\ncall    GJLevelList__parseListLevels                                   ; +0x22a, 0x140230c9a\nmov     rcx, [rsp+88h+var_10]                                          ; +0x22f, 0x140230c9f\nxor     rcx, rsp; StackCookie                                          ; +0x234, 0x140230ca4\ncall    __security_check_cookie                                        ; +0x237, 0x140230ca7\nlea     r11, [rsp+88h+var_8]                                           ; +0x23c, 0x140230cac\nmov     rbx, [r11+10h]                                                 ; +0x244, 0x140230cb4\nmov     rsi, [r11+20h]                                                 ; +0x248, 0x140230cb8\nmov     rsp, r11                                                       ; +0x24c, 0x140230cbc\npop     rdi                                                            ; +0x24f, 0x140230cbf\nretn                                                                   ; +0x250, 0x140230cc0", "xrefs": ["LevelListCell::onClick @ 0x14015f9ba", "GameLevelManager::onGetLevelListsCompleted @ 0x14022e088", "<???> @ 0x14091bed8"], "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"}