{"type": "func", "start": 5373100208, "end": 5373100856, "name": "LevelListLayer::cloneList", "pseudocode": "// \n// LevelListLayer::cloneList from 0x1404300b0 to 0x140430338 (648 bytes)\n// \n// 2 xrefs:\n// > LevelListLayer::FLAlert_Clicked @ 0x14042f39c\n// > <???> @ 0x140926c3c\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:32:15 +0000\n// \n\n// Hidden C++ exception states: #wind=5\nvoid __fastcall LevelListLayer::cloneList(__int64 a1)\n{\n  unsigned int v2; // ebx\n  __int64 v3; // rax\n  struct cocos2d::CCObject *NewLevelList; // rbp\n  __int64 v5; // rax\n  void **v6; // r8\n  void *v7; // rdx\n  cocos2d::CCArray *ListLevelsArray; // rsi\n  struct cocos2d::CCObject *v9; // rax\n  __int64 v10; // rax\n  __int64 v11; // rbx\n  void *v12; // rdx\n  __int64 v13; // rdx\n  __int64 v14; // r8\n  __int64 v15; // r9\n  __int64 v16; // rcx\n  int v17; // eax\n  struct cocos2d::CCScene *v18; // rax\n  struct cocos2d::CCScene *v19; // rbx\n  __int64 v20; // rcx\n  cocos2d::CCDirector *v21; // rax\n  void *v22; // [rsp+20h] [rbp-58h]\n  void *v23; // [rsp+20h] [rbp-58h]\n  void *v24; // [rsp+20h] [rbp-58h]\n  _BYTE v25[32]; // [rsp+28h] [rbp-50h] BYREF\n  _QWORD Src[4]; // [rsp+48h] [rbp-30h] BYREF\n\n  v2 = 0;\n  if ( !*(_BYTE *)(a1 + 968) )\n  {\n    (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 992LL))(a1, 0);\n    *(_BYTE *)(a1 + 968) = 1;\n    v3 = qword_14090BFD0;\n    if ( !qword_14090BFD0 )\n    {\n      v22 = operator new(0x6E8u);\n      qword_14090BFD0 = GameManager::GameManager((__int64)v22);\n      (*(void (__fastcall **)(__int64))(*(_QWORD *)qword_14090BFD0 + 72LL))(qword_14090BFD0);\n      v3 = qword_14090BFD0;\n    }\n    *(_DWORD *)(v3 + 740) = 14;\n    if ( !*(_QWORD *)&qword_14090BFB0 )\n    {\n      v23 = operator new(0x690u);\n      *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v23);\n      (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n    }\n    NewLevelList = GameLevelManager::createNewLevelList();\n    v5 = *(_QWORD *)&qword_14090BFB0;\n    if ( !*(_QWORD *)&qword_14090BFB0 )\n    {\n      v24 = operator new(0x690u);\n      *(_QWORD *)&qword_14090BFB0 = GameLevelManager::GameLevelManager((__int64)v24);\n      (*(void (__fastcall **)(_QWORD))(**(_QWORD **)&qword_14090BFB0 + 72LL))(*(_QWORD *)&qword_14090BFB0);\n      v5 = *(_QWORD *)&qword_14090BFB0;\n    }\n    *(_BYTE *)(v5 + 1344) = 1;\n    *((_DWORD *)NewLevelList + 90) = *(_DWORD *)(*(_QWORD *)(a1 + 920) + 360LL);\n    v6 = (void **)(*(_QWORD *)(a1 + 920) + 536LL);\n    if ( (void **)((char *)NewLevelList + 536) != v6 )\n    {\n      v7 = (void *)(*(_QWORD *)(a1 + 920) + 536LL);\n      if ( *(_QWORD *)(*(_QWORD *)(a1 + 920) + 560LL) > 0xFu )\n        v7 = *v6;\n      sub_1400405A0((void **)NewLevelList + 67, v7, *(_QWORD *)(*(_QWORD *)(a1 + 920) + 552LL));\n    }\n    ListLevelsArray = GJLevelList::getListLevelsArray(*(_QWORD *)(a1 + 920), 0);\n    if ( cocos2d::CCArray::count(ListLevelsArray) )\n    {\n      do\n      {\n        v9 = cocos2d::CCArray::objectAtIndex(ListLevelsArray, v2);\n        GJLevelList::addLevelToList((__int64)NewLevelList, (__int64)v9);\n        ++v2;\n      }\n      while ( v2 < cocos2d::CCArray::count(ListLevelsArray) );\n    }\n    sub_14003F4F0((__int64)Src, *(_QWORD *)(a1 + 920) + 440LL);\n    if ( Src[2] <= 0x17u )\n      sub_140044D80(Src, \" 2\", 2u);\n    v10 = sub_14003F4F0((__int64)v25, (__int64)Src);\n    v11 = v10;\n    if ( (struct cocos2d::CCObject *)((char *)NewLevelList + 440) != (struct cocos2d::CCObject *)v10 )\n    {\n      v12 = (void *)v10;\n      if ( *(_QWORD *)(v10 + 24) > 0xFu )\n        v12 = *(void **)v10;\n      sub_1400405A0((void **)NewLevelList + 55, v12, *(_QWORD *)(v10 + 16));\n    }\n    sub_14003D310(v11);\n    v16 = *(_QWORD *)(a1 + 920);\n    v17 = *(_DWORD *)(v16 + 380);\n    if ( !v17 )\n      v17 = *(_DWORD *)(v16 + 344);\n    *((_DWORD *)NewLevelList + 95) = v17;\n    v18 = (struct cocos2d::CCScene *)LevelListLayer::scene((__int64)NewLevelList, v13, v14, v15);\n    v19 = cocos2d::CCTransitionFade::create(0.5, v18);\n    v21 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v20);\n    cocos2d::CCDirector::replaceScene(v21, v19);\n    sub_14003D310((__int64)Src);\n  }\n}", "assembly": "; \n; LevelListLayer::cloneList from 0x1404300b0 to 0x140430338 (648 bytes)\n; \n; 2 xrefs:\n; > LevelListLayer::FLAlert_Clicked @ 0x14042f39c\n; > <???> @ 0x140926c3c\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:32:15 +0000\n; \nmov     [rsp+arg_8], rbx                                               ; +0x0, 0x1404300b0\nmov     [rsp+arg_10], rbp                                              ; +0x5, 0x1404300b5\nmov     [rsp+arg_18], rsi                                              ; +0xa, 0x1404300ba\npush    rdi                                                            ; +0xf, 0x1404300bf\nsub     rsp, 70h                                                       ; +0x10, 0x1404300c0\nmov     rax, cs:__security_cookie                                      ; +0x14, 0x1404300c4\nxor     rax, rsp                                                       ; +0x1b, 0x1404300cb\nmov     [rsp+78h+var_10], rax                                          ; +0x1e, 0x1404300ce\nmov     rdi, rcx                                                       ; +0x23, 0x1404300d3\nxor     ebx, ebx                                                       ; +0x26, 0x1404300d6\ncmp     [rcx+3C8h], bl                                                 ; +0x28, 0x1404300d8\njnz     loc_140430315                                                  ; +0x2e, 0x1404300de\nmov     rax, [rcx]                                                     ; +0x34, 0x1404300e4\nxor     edx, edx                                                       ; +0x37, 0x1404300e7\ncall    qword ptr [rax+3E0h]                                           ; +0x39, 0x1404300e9\nmov     byte ptr [rdi+3C8h], 1                                         ; +0x3f, 0x1404300ef\nmov     rax, cs:qword_14090BFD0                                        ; +0x46, 0x1404300f6\ntest    rax, rax                                                       ; +0x4d, 0x1404300fd\njnz     short loc_140430134                                            ; +0x50, 0x140430100\nmov     ecx, 6E8h; Size                                                ; +0x52, 0x140430102\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x57, 0x140430107\nmov     [rsp+78h+var_58], rax                                          ; +0x5c, 0x14043010c\nmov     rcx, rax                                                       ; +0x61, 0x140430111\ncall    GameManager__GameManager                                       ; +0x64, 0x140430114\nnop                                                                    ; +0x69, 0x140430119\nmov     cs:qword_14090BFD0, rax                                        ; +0x6a, 0x14043011a\nmov     rcx, [rax]                                                     ; +0x71, 0x140430121\nmov     rdx, [rcx+48h]                                                 ; +0x74, 0x140430124\nmov     rcx, rax                                                       ; +0x78, 0x140430128\ncall    rdx                                                            ; +0x7b, 0x14043012b\nmov     rax, cs:qword_14090BFD0                                        ; +0x7d, 0x14043012d\nmov     dword ptr [rax+2E4h], 0Eh                                      ; +0x84, 0x140430134\ncmp     cs:qword_14090BFB0, 0                                          ; +0x8e, 0x14043013e\njnz     short loc_140430170                                            ; +0x96, 0x140430146\nmov     ecx, 690h; Size                                                ; +0x98, 0x140430148\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0x9d, 0x14043014d\nmov     [rsp+78h+var_58], rax                                          ; +0xa2, 0x140430152\nmov     rcx, rax                                                       ; +0xa7, 0x140430157\ncall    GameLevelManager__GameLevelManager                             ; +0xaa, 0x14043015a\nnop                                                                    ; +0xaf, 0x14043015f\nmov     cs:qword_14090BFB0, rax                                        ; +0xb0, 0x140430160\nmov     rdx, [rax]                                                     ; +0xb7, 0x140430167\nmov     rcx, rax                                                       ; +0xba, 0x14043016a\ncall    qword ptr [rdx+48h]                                            ; +0xbd, 0x14043016d\ncall    GameLevelManager__createNewLevelList                           ; +0xc0, 0x140430170\nmov     rbp, rax                                                       ; +0xc5, 0x140430175\nmov     rax, cs:qword_14090BFB0                                        ; +0xc8, 0x140430178\ntest    rax, rax                                                       ; +0xcf, 0x14043017f\njnz     short loc_1404301B6                                            ; +0xd2, 0x140430182\nmov     ecx, 690h; Size                                                ; +0xd4, 0x140430184\ncall    ??2@YAPEAX_K@Z; operator new(unsigned __int64)                 ; +0xd9, 0x140430189\nmov     [rsp+78h+var_58], rax                                          ; +0xde, 0x14043018e\nmov     rcx, rax                                                       ; +0xe3, 0x140430193\ncall    GameLevelManager__GameLevelManager                             ; +0xe6, 0x140430196\nnop                                                                    ; +0xeb, 0x14043019b\nmov     cs:qword_14090BFB0, rax                                        ; +0xec, 0x14043019c\nmov     rcx, [rax]                                                     ; +0xf3, 0x1404301a3\nmov     rdx, [rcx+48h]                                                 ; +0xf6, 0x1404301a6\nmov     rcx, rax                                                       ; +0xfa, 0x1404301aa\ncall    rdx                                                            ; +0xfd, 0x1404301ad\nmov     rax, cs:qword_14090BFB0                                        ; +0xff, 0x1404301af\nmov     byte ptr [rax+540h], 1                                         ; +0x106, 0x1404301b6\nmov     rax, [rdi+398h]                                                ; +0x10d, 0x1404301bd\nmov     ecx, [rax+168h]                                                ; +0x114, 0x1404301c4\nmov     [rbp+168h], ecx                                                ; +0x11a, 0x1404301ca\nmov     r8, [rdi+398h]                                                 ; +0x120, 0x1404301d0\nadd     r8, 218h                                                       ; +0x127, 0x1404301d7\nlea     rcx, [rbp+218h]; void *                                        ; +0x12e, 0x1404301de\ncmp     rcx, r8                                                        ; +0x135, 0x1404301e5\njz      short loc_140430200                                            ; +0x138, 0x1404301e8\nmov     rdx, r8                                                        ; +0x13a, 0x1404301ea\ncmp     qword ptr [r8+18h], 0Fh                                        ; +0x13d, 0x1404301ed\njbe     short loc_1404301F7                                            ; +0x142, 0x1404301f2\nmov     rdx, [r8]; Src                                                 ; +0x144, 0x1404301f4\nmov     r8, [r8+10h]; Size                                             ; +0x147, 0x1404301f7\ncall    sub_1400405A0                                                  ; +0x14b, 0x1404301fb\nxor     edx, edx                                                       ; +0x150, 0x140430200\nmov     rcx, [rdi+398h]                                                ; +0x152, 0x140430202\ncall    GJLevelList__getListLevelsArray                                ; +0x159, 0x140430209\nmov     rsi, rax                                                       ; +0x15e, 0x14043020e\nmov     rcx, rax                                                       ; +0x161, 0x140430211\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x164, 0x140430214\ntest    eax, eax                                                       ; +0x16a, 0x14043021a\njz      short loc_140430245                                            ; +0x16c, 0x14043021c\nxchg    ax, ax                                                         ; +0x16e, 0x14043021e\nmov     edx, ebx                                                       ; +0x170, 0x140430220\nmov     rcx, rsi                                                       ; +0x172, 0x140430222\ncall    cs:?objectAtIndex@CCArray@cocos2d@@QEAAPEAVCCObject@2@I@Z; cocos2d::CCArray::objectAtIndex(uint) ; +0x175, 0x140430225\nmov     rdx, rax                                                       ; +0x17b, 0x14043022b\nmov     rcx, rbp                                                       ; +0x17e, 0x14043022e\ncall    GJLevelList__addLevelToList                                    ; +0x181, 0x140430231\ninc     ebx                                                            ; +0x186, 0x140430236\nmov     rcx, rsi                                                       ; +0x188, 0x140430238\ncall    cs:?count@CCArray@cocos2d@@QEBAIXZ; cocos2d::CCArray::count(void) ; +0x18b, 0x14043023b\ncmp     ebx, eax                                                       ; +0x191, 0x140430241\njb      short loc_140430220                                            ; +0x193, 0x140430243\nmov     rdx, [rdi+398h]                                                ; +0x195, 0x140430245\nadd     rdx, 1B8h                                                      ; +0x19c, 0x14043024c\nlea     rcx, [rsp+78h+Src]                                             ; +0x1a3, 0x140430253\ncall    sub_14003F4F0                                                  ; +0x1a8, 0x140430258\nnop                                                                    ; +0x1ad, 0x14043025d\ncmp     [rsp+78h+var_20], 17h                                          ; +0x1ae, 0x14043025e\nja      short loc_14043027D                                            ; +0x1b4, 0x140430264\nmov     r8d, 2; Size                                                   ; +0x1b6, 0x140430266\nlea     rdx, a2; \" 2\"                                                  ; +0x1bc, 0x14043026c\nlea     rcx, [rsp+78h+Src]; Src                                        ; +0x1c3, 0x140430273\ncall    sub_140044D80                                                  ; +0x1c8, 0x140430278\nlea     rdx, [rsp+78h+Src]                                             ; +0x1cd, 0x14043027d\nlea     rcx, [rsp+78h+var_50]                                          ; +0x1d2, 0x140430282\ncall    sub_14003F4F0                                                  ; +0x1d7, 0x140430287\nmov     rbx, rax                                                       ; +0x1dc, 0x14043028c\nmov     [rsp+78h+var_58], rax                                          ; +0x1df, 0x14043028f\nlea     rcx, [rbp+1B8h]; void *                                        ; +0x1e4, 0x140430294\ncmp     rcx, rax                                                       ; +0x1eb, 0x14043029b\njz      short loc_1404302B7                                            ; +0x1ee, 0x14043029e\nmov     rdx, rax                                                       ; +0x1f0, 0x1404302a0\ncmp     qword ptr [rax+18h], 0Fh                                       ; +0x1f3, 0x1404302a3\njbe     short loc_1404302AD                                            ; +0x1f8, 0x1404302a8\nmov     rdx, [rax]; Src                                                ; +0x1fa, 0x1404302aa\nmov     r8, [rax+10h]; Size                                            ; +0x1fd, 0x1404302ad\ncall    sub_1400405A0                                                  ; +0x201, 0x1404302b1\nnop                                                                    ; +0x206, 0x1404302b6\nmov     rcx, rbx                                                       ; +0x207, 0x1404302b7\ncall    sub_14003D310                                                  ; +0x20a, 0x1404302ba\nmov     rcx, [rdi+398h]                                                ; +0x20f, 0x1404302bf\nmov     eax, [rcx+17Ch]                                                ; +0x216, 0x1404302c6\ntest    eax, eax                                                       ; +0x21c, 0x1404302cc\njnz     short loc_1404302D6                                            ; +0x21e, 0x1404302ce\nmov     eax, [rcx+158h]                                                ; +0x220, 0x1404302d0\nmov     [rbp+17Ch], eax                                                ; +0x226, 0x1404302d6\nmov     rcx, rbp                                                       ; +0x22c, 0x1404302dc\ncall    LevelListLayer__scene                                          ; +0x22f, 0x1404302df\nmov     rdx, rax                                                       ; +0x234, 0x1404302e4\nmovss   xmm0, cs:dword_140834F20                                       ; +0x237, 0x1404302e7\ncall    cs:?create@CCTransitionFade@cocos2d@@SAPEAV12@MPEAVCCScene@2@@Z; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x23f, 0x1404302ef\nmov     rbx, rax                                                       ; +0x245, 0x1404302f5\ncall    cs:?sharedDirector@CCDirector@cocos2d@@SAPEAV12@XZ; cocos2d::CCDirector::sharedDirector(void) ; +0x248, 0x1404302f8\nmov     rcx, rax                                                       ; +0x24e, 0x1404302fe\nmov     rdx, rbx                                                       ; +0x251, 0x140430301\ncall    cs:?replaceScene@CCDirector@cocos2d@@QEAA_NPEAVCCScene@2@@Z; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0x254, 0x140430304\nnop                                                                    ; +0x25a, 0x14043030a\nlea     rcx, [rsp+78h+Src]                                             ; +0x25b, 0x14043030b\ncall    sub_14003D310                                                  ; +0x260, 0x140430310\nmov     rcx, [rsp+78h+var_10]                                          ; +0x265, 0x140430315\nxor     rcx, rsp; StackCookie                                          ; +0x26a, 0x14043031a\ncall    __security_check_cookie                                        ; +0x26d, 0x14043031d\nlea     r11, [rsp+78h+var_8]                                           ; +0x272, 0x140430322\nmov     rbx, [r11+18h]                                                 ; +0x277, 0x140430327\nmov     rbp, [r11+20h]                                                 ; +0x27b, 0x14043032b\nmov     rsi, [r11+28h]                                                 ; +0x27f, 0x14043032f\nmov     rsp, r11                                                       ; +0x283, 0x140430333\npop     rdi                                                            ; +0x286, 0x140430336\nretn                                                                   ; +0x287, 0x140430337", "xrefs": ["LevelListLayer::FLAlert_Clicked @ 0x14042f39c", "<???> @ 0x140926c3c"], "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"}