{"type": "func", "start": 4295141072, "end": 4295141495, "name": "EditorUI::onPause", "pseudocode": "// \n// EditorUI::onPause from 0x10002a6d0 to 0x10002a877 (423 bytes)\n// \n// 4 xrefs:\n// > EditorUI::keyBackClicked @ 0x10003ea05\n// > sub_10003EA10 @ 0x10003ea1c\n// > EditorUI::keyDown @ 0x100050534\n// > EditorUI::init @ 0x10000a525\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 __fastcall EditorUI::onPause(EditorUI *a1, cocos2d::CCObject *a2)\n{\n  __int64 v2; // rax\n  LevelEditorLayer *m_editorLayer; // rdi\n  LevelEditorLayer *v5; // rax\n  __int64 p_m_lastCameraPos; // r14\n  __int64 v7; // rax\n  double v8; // xmm0_8\n  LevelEditorLayer *v9; // rax\n  GJGameLevel *m_level; // r14\n  GJGameLevel *v11; // r14\n  LevelEditorLayer *v12; // rax\n  GJGameLevel *v13; // rcx\n  unsigned int v14; // r14d\n  EditButtonBar *v15; // rax\n  GJGameLevel *v16; // r15\n  int Page; // eax\n  EditorPauseLayer *v18; // r14\n  __int64 v19; // rax\n  _QWORD v20[5]; // [rsp-28h] [rbp-28h] BYREF\n\n  if ( !a1->m_isPaused )\n  {\n    v20[0] = v2;\n    m_editorLayer = a1->m_editorLayer;\n    if ( m_editorLayer->m_playbackMode == Not )\n    {\n      a1->m_editorZoom = ((float (__fastcall *)(cocos2d::CCLayer *, cocos2d::CCObject *))m_editorLayer->m_objectLayer->getScale)(\n                           m_editorLayer->m_objectLayer,\n                           a2);\n      m_editorLayer = a1->m_editorLayer;\n    }\n    LevelEditorLayer::updateKeyframeObjects(m_editorLayer);\n    EditorUI::onStopPlaytest(a1, a2);\n    EditorUI::updatePlaybackBtn(a1);\n    v5 = a1->m_editorLayer;\n    p_m_lastCameraPos = (__int64)&v5->m_level->m_lastCameraPos;\n    v7 = ((__int64 (__fastcall *)(cocos2d::CCLayer *))v5->m_objectLayer->getPosition)(v5->m_objectLayer);\n    v8 = sub_10028CC60(v20, v7);\n    sub_10028CC90(p_m_lastCameraPos, v20);\n    v9 = a1->m_editorLayer;\n    m_level = v9->m_level;\n    m_level->m_lastEditorZoom = ((float (__fastcall *)(cocos2d::CCLayer *, double))v9->m_objectLayer->getScale)(\n                                  v9->m_objectLayer,\n                                  v8);\n    v11 = a1->m_editorLayer->m_level;\n    v11->m_lastBuildPage = EditButtonBar::getPage(a1->m_createButtonBar);\n    v12 = a1->m_editorLayer;\n    v13 = v12->m_level;\n    v13->m_lastBuildTab = a1->m_selectedTab;\n    v13->m_lastBuildGroupID = v12->m_currentLayer;\n    if ( (unsigned int)sub_100720070(a1->m_createButtonBars) )\n    {\n      v14 = 0;\n      do\n      {\n        v15 = (EditButtonBar *)sub_1007200C0(a1->m_createButtonBars, v14);\n        v16 = a1->m_editorLayer->m_level;\n        Page = EditButtonBar::getPage(v15);\n        GJGameLevel::setLastBuildPageForTab(v16, Page, v14++);\n      }\n      while ( v14 < (unsigned int)sub_100720070(a1->m_createButtonBars) );\n    }\n    v18 = EditorPauseLayer::create(a1->m_editorLayer);\n    v19 = ((__int64 (__fastcall *)(EditorUI *))a1->getParent)(a1);\n    (*(void (__fastcall **)(__int64, EditorPauseLayer *, __int64))(*(_QWORD *)v19 + 448LL))(v19, v18, 100);\n    a1->m_isPaused = 1;\n  }\n}", "assembly": "; \n; EditorUI::onPause from 0x10002a6d0 to 0x10002a877 (423 bytes)\n; \n; 4 xrefs:\n; > EditorUI::keyBackClicked @ 0x10003ea05\n; > sub_10003EA10 @ 0x10003ea1c\n; > EditorUI::keyDown @ 0x100050534\n; > EditorUI::init @ 0x10000a525\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\ncmp     byte ptr [rdi+588h], 0                                         ; +0x0, 0x10002a6d0\njnz     locret_10002A876                                               ; +0x7, 0x10002a6d7\npush    rbp                                                            ; +0xd, 0x10002a6dd\nmov     rbp, rsp                                                       ; +0xe, 0x10002a6de\npush    r15                                                            ; +0x11, 0x10002a6e1\npush    r14                                                            ; +0x13, 0x10002a6e3\npush    rbx                                                            ; +0x15, 0x10002a6e5\npush    rax                                                            ; +0x16, 0x10002a6e6\nmov     rbx, rdi                                                       ; +0x17, 0x10002a6e7\nmov     rdi, [rdi+4E8h]                                                ; +0x1a, 0x10002a6ea\ncmp     dword ptr [rdi+798h], 0                                        ; +0x21, 0x10002a6f1\njnz     short loc_10002A719                                            ; +0x28, 0x10002a6f8\nmov     rdi, [rdi+0EB8h]                                               ; +0x2a, 0x10002a6fa\nmov     rax, [rdi]                                                     ; +0x31, 0x10002a701\ncall    qword ptr [rax+0A8h]                                           ; +0x34, 0x10002a704\nmovss   dword ptr [rbx+584h], xmm0                                     ; +0x3a, 0x10002a70a\nmov     rdi, [rbx+4E8h]                                                ; +0x42, 0x10002a712\ncall    LevelEditorLayer__updateKeyframeObjects                        ; +0x49, 0x10002a719\nmov     rdi, rbx                                                       ; +0x4e, 0x10002a71e\ncall    EditorUI__onStopPlaytest                                       ; +0x51, 0x10002a721\nmov     rdi, rbx                                                       ; +0x56, 0x10002a726\ncall    EditorUI__updatePlaybackBtn                                    ; +0x59, 0x10002a729\nmov     rax, [rbx+4E8h]                                                ; +0x5e, 0x10002a72e\nmov     r14d, 3ECh                                                     ; +0x65, 0x10002a735\nadd     r14, [rax+790h]                                                ; +0x6b, 0x10002a73b\nmov     rdi, [rax+0EB8h]                                               ; +0x72, 0x10002a742\nmov     rax, [rdi]                                                     ; +0x79, 0x10002a749\ncall    qword ptr [rax+0C0h]                                           ; +0x7c, 0x10002a74c\nlea     r15, [rbp-20h]                                                 ; +0x82, 0x10002a752\nmov     rdi, r15                                                       ; +0x86, 0x10002a756\nmov     rsi, rax                                                       ; +0x89, 0x10002a759\ncall    sub_10028CC60                                                  ; +0x8c, 0x10002a75c\nmov     rdi, r14                                                       ; +0x91, 0x10002a761\nmov     rsi, r15                                                       ; +0x94, 0x10002a764\ncall    sub_10028CC90                                                  ; +0x97, 0x10002a767\nmov     rax, [rbx+4E8h]                                                ; +0x9c, 0x10002a76c\nmov     r14, [rax+790h]                                                ; +0xa3, 0x10002a773\nmov     rdi, [rax+0EB8h]                                               ; +0xaa, 0x10002a77a\nmov     rax, [rdi]                                                     ; +0xb1, 0x10002a781\ncall    qword ptr [rax+0A8h]                                           ; +0xb4, 0x10002a784\nmovss   dword ptr [r14+3F4h], xmm0                                     ; +0xba, 0x10002a78a\nmov     rax, [rbx+4E8h]                                                ; +0xc3, 0x10002a793\nmov     r14, [rax+790h]                                                ; +0xca, 0x10002a79a\nmov     rdi, [rbx+2E0h]                                                ; +0xd1, 0x10002a7a1\ncall    EditButtonBar__getPage                                         ; +0xd8, 0x10002a7a8\nmov     [r14+3FCh], eax                                                ; +0xdd, 0x10002a7ad\nmov     rax, [rbx+4E8h]                                                ; +0xe4, 0x10002a7b4\nmov     rcx, [rax+790h]                                                ; +0xeb, 0x10002a7bb\nmov     edx, [rbx+540h]                                                ; +0xf2, 0x10002a7c2\nmov     [rcx+3F8h], edx                                                ; +0xf8, 0x10002a7c8\nmovsx   eax, word ptr [rax+364Ah]                                      ; +0xfe, 0x10002a7ce\nmov     [rcx+400h], eax                                                ; +0x105, 0x10002a7d5\nmov     rdi, [rbx+428h]                                                ; +0x10b, 0x10002a7db\ncall    sub_100720070                                                  ; +0x112, 0x10002a7e2\ntest    eax, eax                                                       ; +0x117, 0x10002a7e7\njz      short loc_10002A836                                            ; +0x119, 0x10002a7e9\nxor     r14d, r14d                                                     ; +0x11b, 0x10002a7eb\nxchg    ax, ax                                                         ; +0x11e, 0x10002a7ee\nmov     rdi, [rbx+428h]                                                ; +0x120, 0x10002a7f0\nmov     esi, r14d                                                      ; +0x127, 0x10002a7f7\ncall    sub_1007200C0                                                  ; +0x12a, 0x10002a7fa\nmov     rcx, [rbx+4E8h]                                                ; +0x12f, 0x10002a7ff\nmov     r15, [rcx+790h]                                                ; +0x136, 0x10002a806\nmov     rdi, rax                                                       ; +0x13d, 0x10002a80d\ncall    EditButtonBar__getPage                                         ; +0x140, 0x10002a810\nmov     rdi, r15                                                       ; +0x145, 0x10002a815\nmov     esi, eax                                                       ; +0x148, 0x10002a818\nmov     edx, r14d                                                      ; +0x14a, 0x10002a81a\ncall    GJGameLevel__setLastBuildPageForTab                            ; +0x14d, 0x10002a81d\ninc     r14d                                                           ; +0x152, 0x10002a822\nmov     rdi, [rbx+428h]                                                ; +0x155, 0x10002a825\ncall    sub_100720070                                                  ; +0x15c, 0x10002a82c\ncmp     r14d, eax                                                      ; +0x161, 0x10002a831\njb      short loc_10002A7F0                                            ; +0x164, 0x10002a834\nmov     rdi, [rbx+4E8h]                                                ; +0x166, 0x10002a836\ncall    EditorPauseLayer__create                                       ; +0x16d, 0x10002a83d\nmov     r14, rax                                                       ; +0x172, 0x10002a842\nmov     rax, [rbx]                                                     ; +0x175, 0x10002a845\nmov     rdi, rbx                                                       ; +0x178, 0x10002a848\ncall    qword ptr [rax+1F0h]                                           ; +0x17b, 0x10002a84b\nmov     rcx, [rax]                                                     ; +0x181, 0x10002a851\nmov     rdi, rax                                                       ; +0x184, 0x10002a854\nmov     rsi, r14                                                       ; +0x187, 0x10002a857\nmov     edx, 64h ; 'd'                                                 ; +0x18a, 0x10002a85a\ncall    qword ptr [rcx+1C0h]                                           ; +0x18f, 0x10002a85f\nmov     byte ptr [rbx+588h], 1                                         ; +0x195, 0x10002a865\nadd     rsp, 8                                                         ; +0x19c, 0x10002a86c\npop     rbx                                                            ; +0x1a0, 0x10002a870\npop     r14                                                            ; +0x1a1, 0x10002a871\npop     r15                                                            ; +0x1a3, 0x10002a873\npop     rbp                                                            ; +0x1a5, 0x10002a875\nretn                                                                   ; +0x1a6, 0x10002a876", "xrefs": ["EditorUI::keyBackClicked @ 0x10003ea05", "sub_10003EA10 @ 0x10003ea1c", "EditorUI::keyDown @ 0x100050534", "EditorUI::init @ 0x10000a525"], "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"}