{"type": "func", "start": 4296937312, "end": 4296937590, "name": "EditLevelLayer::onClone", "pseudocode": "// \n// EditLevelLayer::onClone from 0x1001e0f60 to 0x1001e1076 (278 bytes)\n// \n// 1 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x1001e0cf0\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 12:26:28 +0000\n// \n\n__int64 __fastcall EditLevelLayer::onClone(__int64 a1, __int64 a2)\n{\n  __int64 result; // rax\n  __int64 v3; // rdx\n  __m128 v4; // xmm0\n  __int64 v5; // rax\n  __int64 v6; // rax\n  _DWORD *NewLevel; // r14\n  __int64 v8; // rsi\n  int v9; // ebx\n  __int64 v10; // rbx\n  __int64 v11; // r15\n  char *v12; // rax\n  char *v13; // rax\n\n  result = cocos2d::CCDirector::sharedDirector(a1, a2);\n  if ( !*(_BYTE *)(result + 176) && !*(_BYTE *)(a1 + 496) )\n  {\n    (*(void (__fastcall **)(__int64, _QWORD))(*(_QWORD *)a1 + 1072LL))(a1, 0);\n    *(_BYTE *)(a1 + 496) = 1;\n    v4 = GameManager::sharedState(a1, 0, v3);\n    *(_DWORD *)(v5 + 708) = 2;\n    v6 = GameLevelManager::sharedState(*(double *)v4.i64);\n    NewLevel = (_DWORD *)GameLevelManager::createNewLevel(v6);\n    v8 = *(_QWORD *)(a1 + 472);\n    *(double *)v4.i64 = GJGameLevel::copyLevelInfo(NewLevel, v8);\n    EditLevelLayer::verifyLevelName(a1, v4);\n    v9 = *(_DWORD *)(*(_QWORD *)(a1 + 472) + 988LL) - *(_DWORD *)(*(_QWORD *)(a1 + 472) + 992LL);\n    NewLevel[249] = v9;\n    v4.f32[0] = (float)((float)rand() * 4.6566129e-10) * 1000.0;\n    NewLevel[248] = (int)v4.f32[0];\n    NewLevel[247] = (int)v4.f32[0] + v9;\n    v10 = cocos2d::CCDirector::sharedDirector(a1, v8);\n    v11 = cocos2d::CCScene::create(a1);\n    *(_QWORD *)(AppDelegate::get(a1, v8) + 72) = v11;\n    v12 = EditLevelLayer::create((__int64)NewLevel);\n    (*(void (__fastcall **)(__int64, char *))(*(_QWORD *)v11 + 456LL))(v11, v12);\n    v13 = cocos2d::CCTransitionFade::create_1(v11, 0.5);\n    return cocos2d::CCDirector::replaceScene(v10, v13);\n  }\n  return result;\n}", "assembly": "; \n; EditLevelLayer::onClone from 0x1001e0f60 to 0x1001e1076 (278 bytes)\n; \n; 1 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x1001e0cf0\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 12:26:28 +0000\n; \npush    rbp                                                            ; +0x0, 0x1001e0f60\nmov     rbp, rsp                                                       ; +0x1, 0x1001e0f61\npush    r15                                                            ; +0x4, 0x1001e0f64\npush    r14                                                            ; +0x6, 0x1001e0f66\npush    rbx                                                            ; +0x8, 0x1001e0f68\npush    rax                                                            ; +0x9, 0x1001e0f69\nmov     rbx, rdi                                                       ; +0xa, 0x1001e0f6a\ncall    cocos2d__CCDirector__sharedDirector                            ; +0xd, 0x1001e0f6d\ncmp     byte ptr [rax+0B0h], 0                                         ; +0x12, 0x1001e0f72\njnz     short loc_1001E0F84                                            ; +0x19, 0x1001e0f79\ncmp     byte ptr [rbx+1F0h], 0                                         ; +0x1b, 0x1001e0f7b\njz      short loc_1001E0F8F                                            ; +0x22, 0x1001e0f82\nadd     rsp, 8                                                         ; +0x24, 0x1001e0f84\npop     rbx                                                            ; +0x28, 0x1001e0f88\npop     r14                                                            ; +0x29, 0x1001e0f89\npop     r15                                                            ; +0x2b, 0x1001e0f8b\npop     rbp                                                            ; +0x2d, 0x1001e0f8d\nretn                                                                   ; +0x2e, 0x1001e0f8e\nmov     rax, [rbx]                                                     ; +0x2f, 0x1001e0f8f\nmov     rdi, rbx                                                       ; +0x32, 0x1001e0f92\nxor     esi, esi                                                       ; +0x35, 0x1001e0f95\ncall    qword ptr [rax+430h]                                           ; +0x37, 0x1001e0f97\nmov     byte ptr [rbx+1F0h], 1                                         ; +0x3d, 0x1001e0f9d\ncall    GameManager__sharedState                                       ; +0x44, 0x1001e0fa4\nmov     dword ptr [rax+2C4h], 2                                        ; +0x49, 0x1001e0fa9\ncall    GameLevelManager__sharedState                                  ; +0x53, 0x1001e0fb3\nmov     rdi, rax                                                       ; +0x58, 0x1001e0fb8\ncall    GameLevelManager__createNewLevel                               ; +0x5b, 0x1001e0fbb\nmov     r14, rax                                                       ; +0x60, 0x1001e0fc0\nmov     rsi, [rbx+1D8h]                                                ; +0x63, 0x1001e0fc3\nmov     rdi, rax                                                       ; +0x6a, 0x1001e0fca\ncall    GJGameLevel__copyLevelInfo                                     ; +0x6d, 0x1001e0fcd\nmov     rdi, rbx                                                       ; +0x72, 0x1001e0fd2\ncall    EditLevelLayer__verifyLevelName                                ; +0x75, 0x1001e0fd5\nmov     rax, [rbx+1D8h]                                                ; +0x7a, 0x1001e0fda\nmov     ebx, [rax+3DCh]                                                ; +0x81, 0x1001e0fe1\nsub     ebx, [rax+3E0h]                                                ; +0x87, 0x1001e0fe7\nmov     [r14+3E4h], ebx                                                ; +0x8d, 0x1001e0fed\ncall    _rand                                                          ; +0x94, 0x1001e0ff4\ncvtsi2ss xmm0, eax                                                     ; +0x99, 0x1001e0ff9\nmulss   xmm0, cs:dword_100A03A50                                       ; +0x9d, 0x1001e0ffd\nmulss   xmm0, cs:dword_100A03738                                       ; +0xa5, 0x1001e1005\ncvttss2si eax, xmm0                                                    ; +0xad, 0x1001e100d\nmov     [r14+3E0h], eax                                                ; +0xb1, 0x1001e1011\nadd     ebx, eax                                                       ; +0xb8, 0x1001e1018\nmov     [r14+3DCh], ebx                                                ; +0xba, 0x1001e101a\ncall    cocos2d__CCDirector__sharedDirector                            ; +0xc1, 0x1001e1021\nmov     rbx, rax                                                       ; +0xc6, 0x1001e1026\ncall    cocos2d__CCScene__create                                       ; +0xc9, 0x1001e1029\nmov     r15, rax                                                       ; +0xce, 0x1001e102e\ncall    AppDelegate__get                                               ; +0xd1, 0x1001e1031\nmov     [rax+48h], r15                                                 ; +0xd6, 0x1001e1036\nmov     rdi, r14                                                       ; +0xda, 0x1001e103a\ncall    EditLevelLayer__create                                         ; +0xdd, 0x1001e103d\nmov     rcx, [r15]                                                     ; +0xe2, 0x1001e1042\nmov     rdi, r15                                                       ; +0xe5, 0x1001e1045\nmov     rsi, rax                                                       ; +0xe8, 0x1001e1048\ncall    qword ptr [rcx+1C8h]                                           ; +0xeb, 0x1001e104b\nmovss   xmm0, cs:dword_100A03578                                       ; +0xf1, 0x1001e1051\nmov     rdi, r15                                                       ; +0xf9, 0x1001e1059\ncall    cocos2d__CCTransitionFade__create_1                            ; +0xfc, 0x1001e105c\nmov     rdi, rbx                                                       ; +0x101, 0x1001e1061\nmov     rsi, rax                                                       ; +0x104, 0x1001e1064\nadd     rsp, 8                                                         ; +0x107, 0x1001e1067\npop     rbx                                                            ; +0x10b, 0x1001e106b\npop     r14                                                            ; +0x10c, 0x1001e106c\npop     r15                                                            ; +0x10e, 0x1001e106e\npop     rbp                                                            ; +0x110, 0x1001e1070\njmp     cocos2d__CCDirector__replaceScene                              ; +0x111, 0x1001e1071", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x1001e0cf0"], "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"}