{"type": "func", "start": 3699936, "end": 3700220, "name": "EditorUI::onPause", "pseudocode": "// \n// EditorUI::onPause from 0x3874e0 to 0x3875fc (284 bytes)\n// \n// 2 xrefs:\n// > EditorUI::keyBackClicked @ 0x387602\n// > EditorUI::keyDown @ 0x3a6ec0\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 EditorUI::onPause(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  LevelEditorLayer *m_editorLayer; // r3\n  LevelEditorLayer *v4; // r3\n  GJGameLevel *m_level; // r7\n  const cocos2d::CCPoint *v6; // r0\n  int v7; // r2\n  bool v8; // r3\n  LevelEditorLayer *v9; // r3\n  GJGameLevel *v10; // r5\n  int v11; // r0\n  LevelEditorLayer *v12; // r3\n  GJGameLevel *v13; // r5\n  int Page; // r0\n  LevelEditorLayer *v15; // r2\n  GJGameLevel *v16; // r3\n  unsigned int v17; // r5\n  EditButtonBar *v18; // r0\n  GJGameLevel *v19; // r7\n  int v20; // r0\n  int v21; // r2\n  EditorPauseLayer *v22; // r5\n  cocos2d::CCNode *v23; // r0\n  cocos2d::CCPoint v24; // [sp+4h] [bp-10h] BYREF\n\n  if ( !a1->m_isPaused )\n  {\n    m_editorLayer = a1->m_editorLayer;\n    if ( m_editorLayer->m_playbackMode == Not )\n      LODWORD(a1->m_editorZoom) = ((int (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCObject *))m_editorLayer->m_objectLayer->getScale)(\n                                    m_editorLayer->m_objectLayer,\n                                    a2);\n    LevelEditorLayer::updateKeyframeObjects(a1->m_editorLayer);\n    EditorUI::onStopPlaytest(a1, nullptr);\n    EditorUI::updatePlaybackBtn(a1);\n    v4 = a1->m_editorLayer;\n    m_level = v4->m_level;\n    v6 = v4->m_objectLayer->getPosition(v4->m_objectLayer);\n    cocos2d::CCPoint::CCPoint(&v24, v6);\n    cocos2d::CCPoint::operator=((PlayerObject *)&m_level->m_lastCameraPos, COERCE_FLOAT(&v24), v7, v8);\n    v9 = a1->m_editorLayer;\n    v10 = v9->m_level;\n    v11 = ((int (__fastcall *)(cocos2d::CCLayer *))v9->m_objectLayer->getScale)(v9->m_objectLayer);\n    v12 = a1->m_editorLayer;\n    LODWORD(v10->m_lastEditorZoom) = v11;\n    v13 = v12->m_level;\n    Page = EditButtonBar::getPage(a1->m_createButtonBar);\n    v15 = a1->m_editorLayer;\n    v16 = v15->m_level;\n    v13->m_lastBuildPage = Page;\n    v17 = 0;\n    v16->m_lastBuildTab = a1->m_selectedTab;\n    v16->m_lastBuildGroupID = v15->m_currentLayer;\n    while ( v17 < cocos2d::CCArray::count(a1->m_createButtonBars) )\n    {\n      v18 = (EditButtonBar *)cocos2d::CCArray::objectAtIndex(a1->m_createButtonBars, v17);\n      v19 = a1->m_editorLayer->m_level;\n      v20 = EditButtonBar::getPage(v18);\n      v21 = v17++;\n      GJGameLevel::setLastBuildPageForTab(v19, v20, v21);\n    }\n    v22 = EditorPauseLayer::create(a1->m_editorLayer);\n    v23 = a1->getParent(a1);\n    v23->addChild_0(v23, v22, 100);\n    EditorUI::toggleLockUI(a1, 1);\n  }\n}", "assembly": "; \n; EditorUI::onPause from 0x3874e0 to 0x3875fc (284 bytes)\n; \n; 2 xrefs:\n; > EditorUI::keyBackClicked @ 0x387602\n; > EditorUI::keyDown @ 0x3a6ec0\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\nLDR             R3, =(__stack_chk_guard_ptr - 0x3874E8)                ; +0x0, 0x3874e0\nPUSH            {R4-R7,LR}                                             ; +0x2, 0x3874e2\nADD             R3, PC; __stack_chk_guard_ptr                          ; +0x4, 0x3874e4\nLDR             R3, [R3]; __stack_chk_guard                            ; +0x6, 0x3874e6\nSUB             SP, SP, #0x14                                          ; +0x8, 0x3874e8\nMOV             R4, R0                                                 ; +0xa, 0x3874ea\nLDR             R2, [R3]                                               ; +0xc, 0x3874ec\nMOV             R6, R3                                                 ; +0xe, 0x3874ee\nSTR             R2, [SP,#0x14+var_8]                                   ; +0x10, 0x3874f0\nLDRB.W          R2, [R0,#0x3BC]                                        ; +0x12, 0x3874f2\nCMP             R2, #0                                                 ; +0x16, 0x3874f6\nBNE             loc_3875EC                                             ; +0x18, 0x3874f8\nLDR.W           R3, [R0,#0x340]                                        ; +0x1a, 0x3874fa\nLDR.W           R2, [R3,#0x60C]                                        ; +0x1e, 0x3874fe\nCBNZ            R2, loc_387512                                         ; +0x22, 0x387502\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x24, 0x387504\nLDR             R3, [R0]                                               ; +0x28, 0x387508\nLDR             R3, [R3,#0x54]                                         ; +0x2a, 0x38750a\nBLX             R3                                                     ; +0x2c, 0x38750c\nSTR.W           R0, [R4,#0x3B8]                                        ; +0x2e, 0x38750e\nLDR.W           R0, [R4,#0x340]; this                                  ; +0x32, 0x387512\nADD             R5, SP, #0x14+var_10                                   ; +0x36, 0x387516\nBL              _ZN16LevelEditorLayer21updateKeyframeObjectsEv; LevelEditorLayer::updateKeyframeObjects(void) ; +0x38, 0x387518\nMOVS            R1, #0; cocos2d::CCObject *                            ; +0x3c, 0x38751c\nMOV             R0, R4; this                                           ; +0x3e, 0x38751e\nBL              _ZN8EditorUI14onStopPlaytestEPN7cocos2d8CCObjectE; EditorUI::onStopPlaytest(cocos2d::CCObject *) ; +0x40, 0x387520\nMOV             R0, R4; this                                           ; +0x44, 0x387524\nBL              _ZN8EditorUI17updatePlaybackBtnEv; EditorUI::updatePlaybackBtn(void) ; +0x46, 0x387526\nLDR.W           R3, [R4,#0x340]                                        ; +0x4a, 0x38752a\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x4e, 0x38752e\nLDR.W           R7, [R3,#0x608]                                        ; +0x52, 0x387532\nLDR             R3, [R0]                                               ; +0x56, 0x387536\nLDR             R3, [R3,#0x60]                                         ; +0x58, 0x387538\nBLX             R3                                                     ; +0x5a, 0x38753a\nMOV             R1, R0; cocos2d::CCPoint *                             ; +0x5c, 0x38753c\nMOV             R0, R5; this                                           ; +0x5e, 0x38753e\nBL              _ZN7cocos2d7CCPointC1ERKS0_; cocos2d::CCPoint::CCPoint(cocos2d::CCPoint const&) ; +0x60, 0x387540\nMOV             R1, R5                                                 ; +0x64, 0x387544\nADD.W           R0, R7, #0x2E0                                         ; +0x66, 0x387546\nBL              _ZN7cocos2d7CCPointaSERKS0_; cocos2d::CCPoint::operator=(cocos2d::CCPoint const&) ; +0x6a, 0x38754a\nLDR.W           R3, [R4,#0x340]                                        ; +0x6e, 0x38754e\nLDR.W           R0, [R3,#0x9F0]                                        ; +0x72, 0x387552\nLDR.W           R5, [R3,#0x608]                                        ; +0x76, 0x387556\nLDR             R3, [R0]                                               ; +0x7a, 0x38755a\nLDR             R3, [R3,#0x54]                                         ; +0x7c, 0x38755c\nBLX             R3                                                     ; +0x7e, 0x38755e\nLDR.W           R3, [R4,#0x340]                                        ; +0x80, 0x387560\nSTR.W           R0, [R5,#0x2E8]                                        ; +0x84, 0x387564\nLDR.W           R0, [R4,#0x228]; this                                  ; +0x88, 0x387568\nLDR.W           R5, [R3,#0x608]                                        ; +0x8c, 0x38756c\nBL              _ZN13EditButtonBar7getPageEv; EditButtonBar::getPage(void) ; +0x90, 0x387570\nLDR.W           R2, [R4,#0x340]                                        ; +0x94, 0x387574\nLDR.W           R3, [R2,#0x608]                                        ; +0x98, 0x387578\nSTR.W           R0, [R5,#0x2F0]                                        ; +0x9c, 0x38757c\nMOVS            R5, #0                                                 ; +0xa0, 0x387580\nLDR.W           R1, [R4,#0x384]                                        ; +0xa2, 0x387582\nSTR.W           R1, [R3,#0x2EC]                                        ; +0xa6, 0x387586\nMOVW            R1, #0x2E76                                            ; +0xaa, 0x38758a\nLDRSH           R2, [R2,R1]                                            ; +0xae, 0x38758e\nSTR.W           R2, [R3,#0x2F4]                                        ; +0xb0, 0x387590\nLDR.W           R0, [R4,#0x2E0]; this                                  ; +0xb4, 0x387594\nBL              _ZNK7cocos2d7CCArray5countEv; cocos2d::CCArray::count(void) ; +0xb8, 0x387598\nCMP             R5, R0                                                 ; +0xbc, 0x38759c\nBCS             loc_3875C4                                             ; +0xbe, 0x38759e\nMOV             R1, R5; unsigned int                                   ; +0xc0, 0x3875a0\nLDR.W           R0, [R4,#0x2E0]; this                                  ; +0xc2, 0x3875a2\nBL              _ZN7cocos2d7CCArray13objectAtIndexEj; cocos2d::CCArray::objectAtIndex(uint) ; +0xc6, 0x3875a6\nLDR.W           R3, [R4,#0x340]                                        ; +0xca, 0x3875aa\nLDR.W           R7, [R3,#0x608]                                        ; +0xce, 0x3875ae\nBL              _ZN13EditButtonBar7getPageEv; EditButtonBar::getPage(void) ; +0xd2, 0x3875b2\nMOV             R2, R5; int                                            ; +0xd6, 0x3875b6\nADDS            R5, #1                                                 ; +0xd8, 0x3875b8\nMOV             R1, R0; int                                            ; +0xda, 0x3875ba\nMOV             R0, R7; this                                           ; +0xdc, 0x3875bc\nBL              _ZN11GJGameLevel22setLastBuildPageForTabEii; GJGameLevel::setLastBuildPageForTab(int,int) ; +0xde, 0x3875be\nB               loc_387594                                             ; +0xe2, 0x3875c2\nLDR.W           R0, [R4,#0x340]; this                                  ; +0xe4, 0x3875c4\nBL              _ZN16EditorPauseLayer6createEP16LevelEditorLayer; EditorPauseLayer::create(LevelEditorLayer *) ; +0xe8, 0x3875c8\nLDR             R3, [R4]                                               ; +0xec, 0x3875cc\nLDR.W           R3, [R3,#0xF8]                                         ; +0xee, 0x3875ce\nMOV             R5, R0                                                 ; +0xf2, 0x3875d2\nMOV             R0, R4                                                 ; +0xf4, 0x3875d4\nBLX             R3                                                     ; +0xf6, 0x3875d6\nMOV             R1, R5                                                 ; +0xf8, 0x3875d8\nMOVS            R2, #0x64 ; 'd'                                        ; +0xfa, 0x3875da\nLDR             R3, [R0]                                               ; +0xfc, 0x3875dc\nLDR.W           R3, [R3,#0xE0]                                         ; +0xfe, 0x3875de\nBLX             R3                                                     ; +0x102, 0x3875e2\nMOV             R0, R4; this                                           ; +0x104, 0x3875e4\nMOVS            R1, #1; bool                                           ; +0x106, 0x3875e6\nBL              _ZN8EditorUI12toggleLockUIEb; EditorUI::toggleLockUI(bool) ; +0x108, 0x3875e8\nLDR             R2, [SP,#0x14+var_8]                                   ; +0x10c, 0x3875ec\nLDR             R3, [R6]                                               ; +0x10e, 0x3875ee\nCMP             R2, R3                                                 ; +0x110, 0x3875f0\nBEQ             loc_3875F8                                             ; +0x112, 0x3875f2\nBLX             __stack_chk_fail                                       ; +0x114, 0x3875f4\nADD             SP, SP, #0x14                                          ; +0x118, 0x3875f8\nPOP             {R4-R7,PC}                                             ; +0x11a, 0x3875fa", "xrefs": ["EditorUI::keyBackClicked @ 0x387602", "EditorUI::keyDown @ 0x3a6ec0"], "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"}