{"type": "func", "start": 3899156, "end": 3899332, "name": "EditLevelLayer::onBack", "pseudocode": "// \n// EditLevelLayer::onBack from 0x3b7f14 to 0x3b7fc4 (176 bytes)\n// \n// 2 xrefs:\n// > EditLevelLayer::onDelete @ 0x3b7fee\n// > EditLevelLayer::keyBackClicked @ 0x3b7ff4\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::onBack(EditLevelLayer *a1, cocos2d::CCObject *a2)\n{\n  cocos2d::CCDirector *v3; // r0\n  _BOOL4 m_bIsTransitioning; // r6\n  GameLevelManager *v5; // r4\n  GameLevelManager *v6; // r0\n  cocos2d::CCScene *SearchScene; // r4\n  cocos2d::CCDirector *v8; // r6\n  cocos2d::CCTransitionFade *v9; // r0\n  SearchType v10; // r1\n  GJSearchObject *v11; // r0\n  GJSearchObject *v12[2]; // [sp+0h] [bp-8h] BYREF\n\n  v12[0] = (GJSearchObject *)a1;\n  v12[1] = (GJSearchObject *)a2;\n  v3 = cocos2d::CCDirector::sharedDirector();\n  m_bIsTransitioning = v3->m_bIsTransitioning;\n  if ( !v3->m_bIsTransitioning )\n  {\n    EditLevelLayer::closeTextInputs(a1);\n    EditLevelLayer::verifyLevelName(a1);\n    a1->setKeypadEnabled(a1, m_bIsTransitioning);\n    v5 = GameLevelManager::sharedState();\n    v6 = GameLevelManager::sharedState();\n    sub_775C20(v12, &v6->m_searchKey);\n    SearchScene = GameLevelManager::getSearchScene(v5, (const char *)v12[0]);\n    sub_774008(v12);\n    if ( GameLevelManager::sharedState()->m_returnToLocalLevels || !SearchScene )\n    {\n      GameLevelManager::sharedState()->m_returnToLocalLevels = 0;\n      v11 = (GJSearchObject *)GJSearchObject::create((GJSearchObject *)((char *)&dword_60 + 2), v10);\n      SearchScene = LevelBrowserLayer::scene(v11);\n    }\n    v8 = cocos2d::CCDirector::sharedDirector();\n    v9 = cocos2d::CCTransitionFade::create(0.5, SearchScene);\n    cocos2d::CCDirector::replaceScene(v8, v9);\n  }\n}", "assembly": "; \n; EditLevelLayer::onBack from 0x3b7f14 to 0x3b7fc4 (176 bytes)\n; \n; 2 xrefs:\n; > EditLevelLayer::onDelete @ 0x3b7fee\n; > EditLevelLayer::keyBackClicked @ 0x3b7ff4\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            {R0,R1,R4-R6,LR}                                       ; +0x0, 0x3b7f14\nMOV             R4, R0                                                 ; +0x2, 0x3b7f16\nLDR             R5, =(__stack_chk_guard_ptr - 0x3B7F1E)                ; +0x4, 0x3b7f18\nADD             R5, PC; __stack_chk_guard_ptr                          ; +0x6, 0x3b7f1a\nLDR             R5, [R5]; __stack_chk_guard                            ; +0x8, 0x3b7f1c\nLDR             R3, [R5]                                               ; +0xa, 0x3b7f1e\nSTR             R3, [SP,#8+var_4]                                      ; +0xc, 0x3b7f20\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0xe, 0x3b7f22\nLDRB.W          R6, [R0,#0x80]                                         ; +0x12, 0x3b7f26\nCMP             R6, #0                                                 ; +0x16, 0x3b7f2a\nBNE             loc_3B7FB4                                             ; +0x18, 0x3b7f2c\nMOV             R0, R4; this                                           ; +0x1a, 0x3b7f2e\nBL              _ZN14EditLevelLayer15closeTextInputsEv; EditLevelLayer::closeTextInputs(void) ; +0x1c, 0x3b7f30\nMOV             R0, R4; this                                           ; +0x20, 0x3b7f34\nBL              _ZN14EditLevelLayer15verifyLevelNameEv; EditLevelLayer::verifyLevelName(void) ; +0x22, 0x3b7f36\nLDR             R3, [R4]                                               ; +0x26, 0x3b7f3a\nMOV             R1, R6                                                 ; +0x28, 0x3b7f3c\nMOV             R0, R4                                                 ; +0x2a, 0x3b7f3e\nMOV             R6, SP                                                 ; +0x2c, 0x3b7f40\nLDR.W           R3, [R3,#0x210]                                        ; +0x2e, 0x3b7f42\nBLX             R3                                                     ; +0x32, 0x3b7f46\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x34, 0x3b7f48\nMOV             R4, R0                                                 ; +0x38, 0x3b7f4c\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x3a, 0x3b7f4e\nADD.W           R1, R0, #0x1D8                                         ; +0x3e, 0x3b7f52\nMOV             R0, SP                                                 ; +0x42, 0x3b7f56\nBL              sub_775C20                                             ; +0x44, 0x3b7f58\nMOV             R0, R4; this                                           ; +0x48, 0x3b7f5c\nLDR             R1, [SP,#8+var_8]; GJSearchObject *                    ; +0x4a, 0x3b7f5e\nBL              _ZN16GameLevelManager14getSearchSceneEPKc; GameLevelManager::getSearchScene(char const*) ; +0x4c, 0x3b7f60\nMOV             R4, R0                                                 ; +0x50, 0x3b7f64\nMOV             R0, SP                                                 ; +0x52, 0x3b7f66\nBL              sub_774008                                             ; +0x54, 0x3b7f68\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x58, 0x3b7f6c\nLDRB.W          R3, [R0,#0x1E8]                                        ; +0x5c, 0x3b7f70\nCBNZ            R3, loc_3B7F9C                                         ; +0x60, 0x3b7f74\nCBZ             R4, loc_3B7F9C                                         ; +0x62, 0x3b7f76\nBL              _ZN7cocos2d10CCDirector14sharedDirectorEv; cocos2d::CCDirector::sharedDirector(void) ; +0x64, 0x3b7f78\nMOV             R1, R4; float                                          ; +0x68, 0x3b7f7c\nMOV             R6, R0                                                 ; +0x6a, 0x3b7f7e\nMOV.W           R0, #0x3F000000; this                                  ; +0x6c, 0x3b7f80\nBL              _ZN7cocos2d16CCTransitionFade6createEfPNS_7CCSceneE; cocos2d::CCTransitionFade::create(float,cocos2d::CCScene *) ; +0x70, 0x3b7f84\nMOV             R1, R0; lpsrc                                          ; +0x74, 0x3b7f88\nMOV             R0, R6; this                                           ; +0x76, 0x3b7f8a\nBL              _ZN7cocos2d10CCDirector12replaceSceneEPNS_7CCSceneE; cocos2d::CCDirector::replaceScene(cocos2d::CCScene *) ; +0x78, 0x3b7f8c\nB               loc_3B7FB4                                             ; +0x7c, 0x3b7f90\nMOV             R0, R6                                                 ; +0x7e, 0x3b7f92\nBL              sub_774008                                             ; +0x80, 0x3b7f94\nBL              __cxa_end_cleanup                                      ; +0x84, 0x3b7f98\nBL              _ZN16GameLevelManager11sharedStateEv; GameLevelManager::sharedState(void) ; +0x88, 0x3b7f9c\nMOVS            R3, #0                                                 ; +0x8c, 0x3b7fa0\nSTRB.W          R3, [R0,#0x1E8]                                        ; +0x8e, 0x3b7fa2\nMOVS            R0, #0x62 ; 'b'                                        ; +0x92, 0x3b7fa6\nBL              _ZN14GJSearchObject6createE10SearchType; GJSearchObject::create(SearchType) ; +0x94, 0x3b7fa8\nBL              _ZN17LevelBrowserLayer5sceneEP14GJSearchObject; LevelBrowserLayer::scene(GJSearchObject *) ; +0x98, 0x3b7fac\nMOV             R4, R0                                                 ; +0x9c, 0x3b7fb0\nB               loc_3B7F78                                             ; +0x9e, 0x3b7fb2\nLDR             R2, [SP,#8+var_4]                                      ; +0xa0, 0x3b7fb4\nLDR             R3, [R5]                                               ; +0xa2, 0x3b7fb6\nCMP             R2, R3                                                 ; +0xa4, 0x3b7fb8\nBEQ             loc_3B7FC0                                             ; +0xa6, 0x3b7fba\nBLX             __stack_chk_fail                                       ; +0xa8, 0x3b7fbc\nADD             SP, SP, #8                                             ; +0xac, 0x3b7fc0\nPOP             {R4-R6,PC}                                             ; +0xae, 0x3b7fc2", "xrefs": ["EditLevelLayer::onDelete @ 0x3b7fee", "EditLevelLayer::keyBackClicked @ 0x3b7ff4"], "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"}