{"type": "func", "start": 3899392, "end": 3899564, "name": "EditLevelLayer::onClone", "pseudocode": "// \n// EditLevelLayer::onClone from 0x3b8000 to 0x3b80ac (172 bytes)\n// \n// 1 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x3b80e2\n// \n// This function is hookable on this platform!\n// \n// Using BromaIDA 8.0.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings\n// \n\nvoid EditLevelLayer::onClone(EditLevelLayer *a1)\n{\n  int m_exiting; // r4\n  GameLevelManager *v3; // r0\n  GJGameLevel *NewLevel; // r6\n  GJGameLevel *m_level; // r3\n  int random; // r2\n  int seed; // r3\n  int v8; // s15\n  cocos2d::CCDirector *v9; // r4\n  cocos2d::CCScene *v10; // r0\n  cocos2d::CCTransitionFade *v11; // r1\n\n  if ( !cocos2d::CCDirector::sharedDirector()->m_bIsTransitioning )\n  {\n    m_exiting = a1->m_exiting;\n    if ( !a1->m_exiting )\n    {\n      a1->setKeypadEnabled(a1, a1->m_exiting);\n      a1->m_exiting = 1;\n      GameManager::sharedState()->m_sceneEnum = 2;\n      v3 = GameLevelManager::sharedState();\n      NewLevel = GameLevelManager::createNewLevel(v3);\n      GJGameLevel::copyLevelInfo(NewLevel);\n      EditLevelLayer::verifyLevelName(a1);\n      m_level = a1->m_level;\n      random = m_level->m_originalLevel.random;\n      seed = m_level->m_originalLevel.seed;\n      if ( random != seed )\n        m_exiting = random - seed;\n      NewLevel->m_originalLevel.value = m_exiting;\n      v8 = (int)(float)(vcvts_n_f32_s32(rand(), 0x1Fu) * 1000.0);\n      NewLevel->m_originalLevel.seed = v8;\n      NewLevel->m_originalLevel.random = v8 + m_exiting;\n      v9 = cocos2d::CCDirector::sharedDirector();\n      v10 = EditLevelLayer::scene(NewLevel);\n      v11 = cocos2d::CCTransitionFade::create(0.5, v10);\n      cocos2d::CCDirector::replaceScene(v9, v11);\n    }\n  }\n}", "assembly": "; \n; EditLevelLayer::onClone from 0x3b8000 to 0x3b80ac (172 bytes)\n; \n; 1 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x3b80e2\n; \n; This function is hookable on this platform!\n; \n; Using BromaIDA 8.0.0 @ https:;github.com/Stazzical/BromaIDA\n; Using bindings at commit ba9f177b at Thu Jul 16 22:52:06 2026 from https:;github.com/geode-sdk/bindings\n; \n\nPUSH            {R4-R6,LR}                                             ; +0x0, 0x3b8000\nMOV             R5, R0                                                 ; +0x2, 0x3b8002\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x4, 0x3b8004\nLDRB.W          R3, [R0,#0x80]                                         ; +0x8, 0x3b8008\nCMP             R3, #0                                                 ; +0xc, 0x3b800c\nBNE             locret_3B80AA                                          ; +0xe, 0x3b800e\nLDRB.W          R4, [R5,#0x160]                                        ; +0x10, 0x3b8010\nCMP             R4, #0                                                 ; +0x14, 0x3b8014\nBNE             locret_3B80AA                                          ; +0x16, 0x3b8016\nLDR             R3, [R5]                                               ; +0x18, 0x3b8018\nMOV             R1, R4                                                 ; +0x1a, 0x3b801a\nMOV             R0, R5                                                 ; +0x1c, 0x3b801c\nLDR.W           R3, [R3,#0x210]                                        ; +0x1e, 0x3b801e\nBLX             R3                                                     ; +0x22, 0x3b8022\nMOVS            R3, #1                                                 ; +0x24, 0x3b8024\nSTRB.W          R3, [R5,#0x160]                                        ; +0x26, 0x3b8026\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x2a, 0x3b802a\nMOVS            R3, #2                                                 ; +0x2e, 0x3b802e\nSTR.W           R3, [R0,#0x1C4]                                        ; +0x30, 0x3b8030\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x34, 0x3b8034\nBL              _ZN16GameLevelManager14createNewLevelEv; GameLevelManager::createNewLevel(void) ; +0x38, 0x3b8038\nLDR.W           R1, [R5,#0x154]; GJGameLevel *                         ; +0x3c, 0x3b803c\nMOV             R6, R0                                                 ; +0x40, 0x3b8040\nBL              _ZN11GJGameLevel13copyLevelInfoEPS_; GJGameLevel::copyLevelInfo(GJGameLevel*) ; +0x42, 0x3b8042\nMOV             R0, R5; this                                           ; +0x46, 0x3b8046\nBL              _ZN14EditLevelLayer15verifyLevelNameEv; EditLevelLayer::verifyLevelName(void) ; +0x48, 0x3b8048\nLDR.W           R3, [R5,#0x154]                                        ; +0x4c, 0x3b804c\nLDR.W           R2, [R3,#0x274]                                        ; +0x50, 0x3b8050\nLDR.W           R3, [R3,#0x278]                                        ; +0x54, 0x3b8054\nCMP             R2, R3                                                 ; +0x58, 0x3b8058\nIT NE                                                                  ; +0x5a, 0x3b805a\nSUBNE           R4, R2, R3                                             ; +0x5c, 0x3b805c\nSTR.W           R4, [R6,#0x27C]                                        ; +0x5e, 0x3b805e\nBLX             rand                                                   ; +0x62, 0x3b8062\nVLDR            S14, =1000.0                                           ; +0x66, 0x3b8066\nVMOV            S15, R0; this                                          ; +0x6a, 0x3b806a\nVCVT.F32.S32    S15, S15, #0x1F                                        ; +0x6e, 0x3b806e\nVMUL.F32        S15, S15, S14                                          ; +0x72, 0x3b8072\nVCVT.S32.F32    S15, S15                                               ; +0x76, 0x3b8076\nVMOV            R3, S15                                                ; +0x7a, 0x3b807a\nVSTR            S15, [R6,#0x278]                                       ; +0x7e, 0x3b807e\nADD             R3, R4                                                 ; +0x82, 0x3b8082\nSTR.W           R3, [R6,#0x274]                                        ; +0x84, 0x3b8084\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x88, 0x3b8088\nMOV             R4, R0                                                 ; +0x8c, 0x3b808c\nMOV             R0, R6; this                                           ; +0x8e, 0x3b808e\nBL              _ZN14EditLevelLayer5sceneEP11GJGameLevel; EditLevelLayer::scene(GJGameLevel *) ; +0x90, 0x3b8090\nMOV             R1, R0; float                                          ; +0x94, 0x3b8094\nMOV.W           R0, #0x3F000000; this                                  ; +0x96, 0x3b8096\nBL              _ZN7cocos2d16CCTransitionFade6createEfPNS_7CCSceneE; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x9a, 0x3b809a\nMOV             R1, R0; lpsrc                                          ; +0x9e, 0x3b809e\nMOV             R0, R4; this                                           ; +0xa0, 0x3b80a0\nPOP.W           {R4-R6,LR}                                             ; +0xa2, 0x3b80a2\nB.W             _ZN7cocos2d10CCDirector12replaceSceneEPNS_7CCSceneE; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0xa6, 0x3b80a6\nPOP             {R4-R6,PC}                                             ; +0xaa, 0x3b80aa", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x3b80e2"], "is_objc": false, "is_arm32": false, "is_arm64": false, "bida_info": "8.0.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit ba9f177b at Thu Jul 16 22:52:06 2026 from https://github.com/geode-sdk/bindings"}