{"type": "func", "start": 8329652, "end": 8329880, "name": "EditLevelLayer::onClone", "pseudocode": "// \n// EditLevelLayer::onClone from 0x7f19b4 to 0x7f1a98 (228 bytes)\n// \n// 2 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x7f1b3c\n// > <???> @ 0x4f0f0\n// \n// This function is hookable on this platform (idp: arm, 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:54:35 +0000\n// \n\n__int64 __fastcall EditLevelLayer::onClone(GJGameLevel **this)\n{\n  __int64 result; // x0\n  GameLevelManager *v3; // x0\n  GameLevelManager *v4; // x0\n  GJGameLevel *NewLevel; // x20\n  int v6; // w19\n  cocos2d::CCDirector *v7; // x0\n  cocos2d::CCDirector *v8; // x19\n  GJGameLevel *v9; // x1\n  AppDelegate *v10; // x0\n  cocos2d::CCScene *v11; // x1\n  cocos2d::CCScene *v12; // x0\n\n  result = *(unsigned __int8 *)(cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this) + 176);\n  if ( !(_DWORD)result )\n  {\n    result = *((unsigned __int8 *)this + 496);\n    if ( !*((_BYTE *)this + 496) )\n    {\n      (*((void (__fastcall **)(GJGameLevel **, _QWORD))*this + 134))(this, 0);\n      *((_BYTE *)this + 496) = (unsigned __int8)&dword_0 + 1;\n      v3 = (GameLevelManager *)GameManager::sharedState((GameManager *)((char *)&dword_0 + 1));\n      *((_DWORD *)v3 + 177) = 2;\n      v4 = (GameLevelManager *)GameLevelManager::sharedState(v3);\n      NewLevel = (GJGameLevel *)GameLevelManager::createNewLevel(v4);\n      GJGameLevel::copyLevelInfo(NewLevel, *(this + 59));\n      EditLevelLayer::verifyLevelName((EditLevelLayer *)this);\n      if ( *((_DWORD *)*(this + 59) + 247) == *((_DWORD *)*(this + 59) + 248) )\n        v6 = 0;\n      else\n        v6 = *((_DWORD *)*(this + 59) + 247) - *((_DWORD *)*(this + 59) + 248);\n      *((_DWORD *)NewLevel + 249) = v6;\n      v7 = (cocos2d::CCDirector *)(unsigned int)(int)(float)((float)((float)rand() * 4.6566e-10) * 1000.0);\n      *((_DWORD *)NewLevel + 248) = (_DWORD)v7;\n      *((_DWORD *)NewLevel + 247) = v6 + (_DWORD)v7;\n      v8 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v7);\n      v10 = EditLevelLayer::scene(NewLevel, v9);\n      v12 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create(v10, 0.5, v11);\n      return cocos2d::CCDirector::replaceScene(v8, v12);\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditLevelLayer::onClone from 0x7f19b4 to 0x7f1a98 (228 bytes)\n; \n; 2 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x7f1b3c\n; > <???> @ 0x4f0f0\n; \n; This function is hookable on this platform (idp: arm, 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:54:35 +0000\n; \nSTP             X29, X30, [SP,#-0x20+var_s0]!                          ; +0x0, 0x7f19b4\nMOV             X29, SP                                                ; +0x4, 0x7f19b8\nSTP             X19, X20, [SP,#var_s10]                                ; +0x8, 0x7f19bc\nMOV             X19, X0                                                ; +0xc, 0x7f19c0\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x10, 0x7f19c4\nLDRB            W0, [X0,#0xB0]                                         ; +0x14, 0x7f19c8\nCBNZ            W0, loc_7F19D8                                         ; +0x18, 0x7f19cc\nLDRB            W0, [X19,#0x1F0]                                       ; +0x1c, 0x7f19d0\nCBZ             W0, loc_7F19E4                                         ; +0x20, 0x7f19d4\nLDP             X19, X20, [SP,#var_s10]                                ; +0x24, 0x7f19d8\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0x28, 0x7f19dc\nRET                                                                    ; +0x2c, 0x7f19e0\nLDR             X2, [X19]                                              ; +0x30, 0x7f19e4\nMOV             W1, #0                                                 ; +0x34, 0x7f19e8\nMOV             X0, X19                                                ; +0x38, 0x7f19ec\nLDR             X2, [X2,#0x430]                                        ; +0x3c, 0x7f19f0\nBLR             X2                                                     ; +0x40, 0x7f19f4\nMOV             W0, #(dword_0+1); this                                 ; +0x44, 0x7f19f8\nSTRB            W0, [X19,#0x1F0]                                       ; +0x48, 0x7f19fc\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x4c, 0x7f1a00\nMOV             W1, #2                                                 ; +0x50, 0x7f1a04\nSTR             W1, [X0,#0x2C4]                                        ; +0x54, 0x7f1a08\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x58, 0x7f1a0c\nBL              _ZN16GameLevelManager14createNewLevelEv; GameLevelManager::createNewLevel(void) ; +0x5c, 0x7f1a10\nMOV             X20, X0                                                ; +0x60, 0x7f1a14\nLDR             X1, [X19,#0x1D8]; GJGameLevel *                        ; +0x64, 0x7f1a18\nBL              _ZN11GJGameLevel13copyLevelInfoEPS_; GJGameLevel::copyLevelInfo(GJGameLevel*) ; +0x68, 0x7f1a1c\nMOV             X0, X19; this                                          ; +0x6c, 0x7f1a20\nBL              _ZN14EditLevelLayer15verifyLevelNameEv; EditLevelLayer::verifyLevelName(void) ; +0x70, 0x7f1a24\nLDR             X1, [X19,#0x1D8]                                       ; +0x74, 0x7f1a28\nLDR             W0, [X1,#0x3DC]                                        ; +0x78, 0x7f1a2c\nLDR             W1, [X1,#0x3E0]                                        ; +0x7c, 0x7f1a30\nCMP             W0, W1                                                 ; +0x80, 0x7f1a34\nSUB             W0, W0, W1                                             ; +0x84, 0x7f1a38\nCSEL            W19, W0, WZR, NE                                       ; +0x88, 0x7f1a3c\nSTR             W19, [X20,#0x3E4]                                      ; +0x8c, 0x7f1a40\nBL              .rand                                                  ; +0x90, 0x7f1a44\nSCVTF           S0, W0                                                 ; +0x94, 0x7f1a48\nLDR             S1, =0x30000000                                        ; +0x98, 0x7f1a4c\nFMUL            S0, S0, S1                                             ; +0x9c, 0x7f1a50\nLDR             S1, =0x447A0000                                        ; +0xa0, 0x7f1a54\nFMUL            S0, S0, S1                                             ; +0xa4, 0x7f1a58\nFCVTZS          W0, S0; this                                           ; +0xa8, 0x7f1a5c\nADD             W19, W19, W0                                           ; +0xac, 0x7f1a60\nSTR             W0, [X20,#0x3E0]                                       ; +0xb0, 0x7f1a64\nSTR             W19, [X20,#0x3DC]                                      ; +0xb4, 0x7f1a68\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0xb8, 0x7f1a6c\nMOV             X19, X0                                                ; +0xbc, 0x7f1a70\nMOV             X0, X20; this                                          ; +0xc0, 0x7f1a74\nBL              _ZN14EditLevelLayer5sceneEP11GJGameLevel; EditLevelLayer::scene(GJGameLevel *) ; +0xc4, 0x7f1a78\nFMOV            S0, #0.5; float                                        ; +0xc8, 0x7f1a7c\nBL              _ZN7cocos2d16CCTransitionFade6createEfPNS_7CCSceneE; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0xcc, 0x7f1a80\nMOV             X1, X0; lpsrc                                          ; +0xd0, 0x7f1a84\nMOV             X0, X19; this                                          ; +0xd4, 0x7f1a88\nLDP             X19, X20, [SP,#var_s10]                                ; +0xd8, 0x7f1a8c\nLDP             X29, X30, [SP+var_s0],#0x20                            ; +0xdc, 0x7f1a90\nB               _ZN7cocos2d10CCDirector12replaceSceneEPNS_7CCSceneE; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0xe0, 0x7f1a94", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x7f1b3c", "<???> @ 0x4f0f0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "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"}