{"type": "func", "start": 3898956, "end": 3899150, "name": "EditLevelLayer::onEdit", "pseudocode": "// \n// EditLevelLayer::onEdit from 0x3b7e4c to 0x3b7f0e (194 bytes)\n// \n// 1 xrefs:\n// > EditLevelLayer::FLAlert_Clicked @ 0x3b8130\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::onEdit(EditLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  _BOOL4 m_exiting; // r5\n  FMODAudioEngine *v4; // r9\n  cocos2d::CCDirector *v5; // r5\n  cocos2d::CCScene *v6; // r0\n  cocos2d::CCTransitionFade *v7; // r0\n  int v8; // [sp+18h] [bp-Ch] BYREF\n\n  if ( !cocos2d::CCDirector::sharedDirector()->m_bIsTransitioning )\n  {\n    m_exiting = a1->m_exiting;\n    if ( !a1->m_exiting )\n    {\n      EditLevelLayer::closeTextInputs(a1);\n      a1->setKeypadEnabled(a1, m_exiting);\n      a1->m_exiting = 1;\n      GameManager::sharedState()->m_sceneEnum = 3;\n      EditLevelLayer::verifyLevelName(a1);\n      v4 = FMODAudioEngine::sharedEngine();\n      GJGameLevel::getAudioFileName((GJGameLevel *)&v8);\n      FMODAudioEngine::loadMusic((int)v4, &v8, 1.0, 0.0, 1.0, 1, m_exiting, m_exiting, m_exiting);\n      sub_774008(&v8);\n      v5 = cocos2d::CCDirector::sharedDirector();\n      v6 = LevelEditorLayer::scene(a1->m_level, 0);\n      v7 = cocos2d::CCTransitionFade::create(0.5, v6);\n      cocos2d::CCDirector::replaceScene(v5, v7);\n    }\n  }\n}", "assembly": "; \n; EditLevelLayer::onEdit from 0x3b7e4c to 0x3b7f0e (194 bytes)\n; \n; 1 xrefs:\n; > EditLevelLayer::FLAlert_Clicked @ 0x3b8130\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.W          {R4-R9,LR}                                             ; +0x0, 0x3b7e4c\nSUB             SP, SP, #0x24                                          ; +0x4, 0x3b7e50\nLDR             R7, =(__stack_chk_guard_ptr - 0x3B7E5A)                ; +0x6, 0x3b7e52\nMOV             R4, R0                                                 ; +0x8, 0x3b7e54\nADD             R7, PC; __stack_chk_guard_ptr                          ; +0xa, 0x3b7e56\nLDR             R7, [R7]; __stack_chk_guard                            ; +0xc, 0x3b7e58\nLDR             R3, [R7]                                               ; +0xe, 0x3b7e5a\nSTR             R3, [SP,#0x24+var_8]                                   ; +0x10, 0x3b7e5c\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x12, 0x3b7e5e\nLDRB.W          R3, [R0,#0x80]                                         ; +0x16, 0x3b7e62\nCMP             R3, #0                                                 ; +0x1a, 0x3b7e66\nBNE             loc_3B7EFC                                             ; +0x1c, 0x3b7e68\nLDRB.W          R5, [R4,#0x160]                                        ; +0x1e, 0x3b7e6a\nCMP             R5, #0                                                 ; +0x22, 0x3b7e6e\nBNE             loc_3B7EFC                                             ; +0x24, 0x3b7e70\nMOV             R0, R4; this                                           ; +0x26, 0x3b7e72\nMOV.W           R8, #1                                                 ; +0x28, 0x3b7e74\nBL              _ZN14EditLevelLayer15closeTextInputsEv; EditLevelLayer::closeTextInputs(void) ; +0x2c, 0x3b7e78\nLDR             R3, [R4]                                               ; +0x30, 0x3b7e7c\nMOV             R1, R5                                                 ; +0x32, 0x3b7e7e\nMOV             R0, R4                                                 ; +0x34, 0x3b7e80\nADD             R6, SP, #0x24+var_C                                    ; +0x36, 0x3b7e82\nLDR.W           R3, [R3,#0x210]                                        ; +0x38, 0x3b7e84\nBLX             R3                                                     ; +0x3c, 0x3b7e88\nSTRB.W          R8, [R4,#0x160]                                        ; +0x3e, 0x3b7e8a\nBL              _ZN11GameManager11sharedStateEv; GameManager::sharedState(void) ; +0x42, 0x3b7e8e\nMOVS            R3, #3                                                 ; +0x46, 0x3b7e92\nSTR.W           R3, [R0,#0x1C4]                                        ; +0x48, 0x3b7e94\nMOV             R0, R4; this                                           ; +0x4c, 0x3b7e98\nBL              _ZN14EditLevelLayer15verifyLevelNameEv; EditLevelLayer::verifyLevelName(void) ; +0x4e, 0x3b7e9a\nBL              _ZN15FMODAudioEngine12sharedEngineEv; FMODAudioEngine::sharedEngine(void) ; +0x52, 0x3b7e9e\nLDR.W           R1, [R4,#0x154]                                        ; +0x56, 0x3b7ea2\nMOV             R9, R0                                                 ; +0x5a, 0x3b7ea6\nMOV             R0, R6; this                                           ; +0x5c, 0x3b7ea8\nBL              _ZN11GJGameLevel16getAudioFileNameEv; GJGameLevel::getAudioFileName(void) ; +0x5e, 0x3b7eaa\nMOV.W           R2, #0x3F800000; int                                   ; +0x62, 0x3b7eae\nSTR.W           R8, [SP,#0x24+var_20]; char                            ; +0x66, 0x3b7eb2\nMOV             R0, R9; int                                            ; +0x6a, 0x3b7eb6\nSTR             R2, [SP,#0x24+var_24]; float                           ; +0x6c, 0x3b7eb8\nMOV             R1, R6; int                                            ; +0x6e, 0x3b7eba\nSTR             R5, [SP,#0x24+var_1C]; int                             ; +0x70, 0x3b7ebc\nMOVS            R3, #0; int                                            ; +0x72, 0x3b7ebe\nSTR             R5, [SP,#0x24+var_18]; int                             ; +0x74, 0x3b7ec0\nSTR             R5, [SP,#0x24+var_14]; char                            ; +0x76, 0x3b7ec2\nBL              _ZN15FMODAudioEngine9loadMusicESsfffbiib; FMODAudioEngine::loadMusic(std::string,float,float,float,bool,int,int,bool) ; +0x78, 0x3b7ec4\nMOV             R0, R6                                                 ; +0x7c, 0x3b7ec8\nBL              sub_774008                                             ; +0x7e, 0x3b7eca\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x82, 0x3b7ece\nMOVS            R1, #0; GJGameLevel *                                  ; +0x86, 0x3b7ed2\nMOV             R5, R0                                                 ; +0x88, 0x3b7ed4\nLDR.W           R0, [R4,#0x154]; this                                  ; +0x8a, 0x3b7ed6\nBL              _ZN16LevelEditorLayer5sceneEP11GJGameLevelb; LevelEditorLayer::scene(GJGameLevel *,bool) ; +0x8e, 0x3b7eda\nMOV             R1, R0; float                                          ; +0x92, 0x3b7ede\nMOV.W           R0, #0x3F000000; this                                  ; +0x94, 0x3b7ee0\nBL              _ZN7cocos2d16CCTransitionFade6createEfPNS_7CCSceneE; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x98, 0x3b7ee4\nMOV             R1, R0; lpsrc                                          ; +0x9c, 0x3b7ee8\nMOV             R0, R5; this                                           ; +0x9e, 0x3b7eea\nBL              _ZN7cocos2d10CCDirector12replaceSceneEPNS_7CCSceneE; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0xa0, 0x3b7eec\nB               loc_3B7EFC                                             ; +0xa4, 0x3b7ef0\nMOV             R0, R6                                                 ; +0xa6, 0x3b7ef2\nBL              sub_774008                                             ; +0xa8, 0x3b7ef4\nBL              __cxa_end_cleanup                                      ; +0xac, 0x3b7ef8\nLDR             R2, [SP,#0x24+var_8]                                   ; +0xb0, 0x3b7efc\nLDR             R3, [R7]                                               ; +0xb2, 0x3b7efe\nCMP             R2, R3                                                 ; +0xb4, 0x3b7f00\nBEQ             loc_3B7F08                                             ; +0xb6, 0x3b7f02\nBLX             __stack_chk_fail                                       ; +0xb8, 0x3b7f04\nADD             SP, SP, #0x24 ; '$'                                    ; +0xbc, 0x3b7f08\nPOP.W           {R4-R9,PC}                                             ; +0xbe, 0x3b7f0a", "xrefs": ["EditLevelLayer::FLAlert_Clicked @ 0x3b8130"], "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"}