{"type": "func", "start": 4858024, "end": 4858196, "name": "EditLevelLayer::onClone", "pseudocode": "// \n// EditLevelLayer::onClone from 0x4a20a8 to 0x4a2154 (172 bytes)\n// \n// 1 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x4a218a\n// \n// This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:51 +0000\n// \n\nint __fastcall EditLevelLayer::onClone(GJGameLevel **this)\n{\n  int result; // r0\n  int v3; // r4\n  GameManager *v4; // r0\n  GameLevelManager *v5; // r0\n  GameLevelManager *v6; // r0\n  GJGameLevel *NewLevel; // r6\n  int v8; // r1\n  int v9; // r2\n  int v10; // r3\n  int v11; // r3\n  int v12; // r2\n  int v13; // r3\n  cocos2d::CCDirector *v14; // r0\n  int v15; // s15\n  cocos2d::CCDirector *v16; // r4\n  GJGameLevel *v17; // r1\n  AppDelegate *v18; // r0\n  cocos2d::CCScene *v19; // r2\n  cocos2d::CCScene *v20; // r1\n\n  result = cocos2d::CCDirector::sharedDirector((cocos2d::CCDirector *)this);\n  if ( !*(_BYTE *)(result + 140) )\n  {\n    v3 = *((unsigned __int8 *)this + 360);\n    if ( !*((_BYTE *)this + 360) )\n    {\n      v4 = (GameManager *)(*((int (__fastcall **)(GJGameLevel **, _DWORD))*this + 134))(\n                            this,\n                            *((unsigned __int8 *)this + 360));\n      *((_BYTE *)this + 360) = 1;\n      v5 = (GameLevelManager *)GameManager::sharedState(v4);\n      *((_DWORD *)v5 + 127) = 2;\n      v6 = (GameLevelManager *)GameLevelManager::sharedState(v5);\n      NewLevel = (GJGameLevel *)GameLevelManager::createNewLevel(v6);\n      GJGameLevel::copyLevelInfo(NewLevel, *(this + 87));\n      EditLevelLayer::verifyLevelName((EditLevelLayer *)this, v8, v9, v10);\n      v11 = (int)*(this + 87);\n      v12 = *(_DWORD *)(v11 + 812);\n      v13 = *(_DWORD *)(v11 + 816);\n      if ( v12 != v13 )\n        v3 = v12 - v13;\n      *((_DWORD *)NewLevel + 205) = v3;\n      v14 = (cocos2d::CCDirector *)rand();\n      v15 = (int)(float)(vcvts_n_f32_s32((unsigned int)v14, 0x1Fu) * 1000.0);\n      *((_DWORD *)NewLevel + 204) = v15;\n      *((_DWORD *)NewLevel + 203) = v15 + v3;\n      v16 = (cocos2d::CCDirector *)cocos2d::CCDirector::sharedDirector(v14);\n      v18 = EditLevelLayer::scene(NewLevel, v17);\n      v20 = (cocos2d::CCScene *)cocos2d::CCTransitionFade::create(\n                                  (cocos2d::CCTransitionFade *)0x3F000000,\n                                  *(float *)&v18,\n                                  v19);\n      return cocos2d::CCDirector::replaceScene(v16, v20);\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditLevelLayer::onClone from 0x4a20a8 to 0x4a2154 (172 bytes)\n; \n; 1 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x4a218a\n; \n; This function is hookable on this platform (idp: arm, 32 bit: True, 64 bit: False!\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:49:51 +0000\n; \nPUSH            {R4-R6,LR}                                             ; +0x0, 0x4a20a8\nMOV             R5, R0                                                 ; +0x2, 0x4a20aa\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x4, 0x4a20ac\nLDRB.W          R3, [R0,#0x8C]                                         ; +0x8, 0x4a20b0\nCMP             R3, #0                                                 ; +0xc, 0x4a20b4\nBNE             locret_4A2152                                          ; +0xe, 0x4a20b6\nLDRB.W          R4, [R5,#0x168]                                        ; +0x10, 0x4a20b8\nCMP             R4, #0                                                 ; +0x14, 0x4a20bc\nBNE             locret_4A2152                                          ; +0x16, 0x4a20be\nLDR             R3, [R5]                                               ; +0x18, 0x4a20c0\nMOV             R1, R4                                                 ; +0x1a, 0x4a20c2\nMOV             R0, R5                                                 ; +0x1c, 0x4a20c4\nLDR.W           R3, [R3,#0x218]                                        ; +0x1e, 0x4a20c6\nBLX             R3                                                     ; +0x22, 0x4a20ca\nMOVS            R3, #1                                                 ; +0x24, 0x4a20cc\nSTRB.W          R3, [R5,#0x168]                                        ; +0x26, 0x4a20ce\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x2a, 0x4a20d2\nMOVS            R3, #2                                                 ; +0x2e, 0x4a20d6\nSTR.W           R3, [R0,#0x1FC]                                        ; +0x30, 0x4a20d8\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x34, 0x4a20dc\nBL              _ZN16GameLevelManager14createNewLevelEv; GameLevelManager::createNewLevel(void) ; +0x38, 0x4a20e0\nLDR.W           R1, [R5,#0x15C]; GJGameLevel *                         ; +0x3c, 0x4a20e4\nMOV             R6, R0                                                 ; +0x40, 0x4a20e8\nBL              _ZN11GJGameLevel13copyLevelInfoEPS_; GJGameLevel::copyLevelInfo(GJGameLevel*) ; +0x42, 0x4a20ea\nMOV             R0, R5; this                                           ; +0x46, 0x4a20ee\nBL              _ZN14EditLevelLayer15verifyLevelNameEv; EditLevelLayer::verifyLevelName(void) ; +0x48, 0x4a20f0\nLDR.W           R3, [R5,#0x15C]                                        ; +0x4c, 0x4a20f4\nLDR.W           R2, [R3,#0x32C]                                        ; +0x50, 0x4a20f8\nLDR.W           R3, [R3,#0x330]                                        ; +0x54, 0x4a20fc\nCMP             R2, R3                                                 ; +0x58, 0x4a2100\nIT NE                                                                  ; +0x5a, 0x4a2102\nSUBNE           R4, R2, R3                                             ; +0x5c, 0x4a2104\nSTR.W           R4, [R6,#0x334]                                        ; +0x5e, 0x4a2106\nBLX             rand                                                   ; +0x62, 0x4a210a\nVLDR            S14, =1000.0                                           ; +0x66, 0x4a210e\nVMOV            S15, R0; this                                          ; +0x6a, 0x4a2112\nVCVT.F32.S32    S15, S15, #0x1F                                        ; +0x6e, 0x4a2116\nVMUL.F32        S15, S15, S14                                          ; +0x72, 0x4a211a\nVCVT.S32.F32    S15, S15                                               ; +0x76, 0x4a211e\nVMOV            R3, S15                                                ; +0x7a, 0x4a2122\nVSTR            S15, [R6,#0x330]                                       ; +0x7e, 0x4a2126\nADD             R3, R4                                                 ; +0x82, 0x4a212a\nSTR.W           R3, [R6,#0x32C]                                        ; +0x84, 0x4a212c\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x88, 0x4a2130\nMOV             R4, R0                                                 ; +0x8c, 0x4a2134\nMOV             R0, R6; this                                           ; +0x8e, 0x4a2136\nBL              _ZN14EditLevelLayer5sceneEP11GJGameLevel; EditLevelLayer::scene(GJGameLevel *) ; +0x90, 0x4a2138\nMOV             R1, R0; float                                          ; +0x94, 0x4a213c\nMOV.W           R0, #0x3F000000; this                                  ; +0x96, 0x4a213e\nBL              _ZN7cocos2d16CCTransitionFade6createEfPNS_7CCSceneE; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x9a, 0x4a2142\nMOV             R1, R0; lpsrc                                          ; +0x9e, 0x4a2146\nMOV             R0, R4; this                                           ; +0xa0, 0x4a2148\nPOP.W           {R4-R6,LR}                                             ; +0xa2, 0x4a214a\nB.W             _ZN7cocos2d10CCDirector12replaceSceneEPNS_7CCSceneE; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0xa6, 0x4a214e\nPOP             {R4-R6,PC}                                             ; +0xaa, 0x4a2152", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x4a218a"], "is_objc": false, "is_32_bit": true, "is_64_bit": false, "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"}