{"type": "func", "start": 8185060, "end": 8185296, "name": "EditorUI::toggleMode", "pseudocode": "// \n// EditorUI::toggleMode from 0x7ce4e4 to 0x7ce5d0 (236 bytes)\n// \n// 12 xrefs:\n// > EditorUI::onPlaytest @ 0x7ce704\n// > EditorUI::init @ 0x7cff68\n// > EditorUI::handleEditorAction @ 0xbd8320\n// > EditorUI::handleEditorAction @ 0xbd8338\n// > EditorUI::handleEditorAction @ 0xbd8350\n// > EditorUI::handleEditorAction @ 0xbd8458\n// > <???> @ 0x5d628\n// > EditorUI::init @ 0x7cf0e0\n// > EditorUI::init @ 0x7cf178\n// > EditorUI::init @ 0x7cf20c\n// > EditorUI::init @ 0x7cf2a0\n// > <???> @ 0x15422e8\n// \n// This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n// \n// Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n// Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n// Generated at Fri, 27 Nov 2026 12:54:13 +0000\n// \n\n__int64 __fastcall EditorUI::toggleMode(EditorUI *this, cocos2d::CCObject *a2)\n{\n  int v3; // w19\n  __int64 result; // x0\n  unsigned int v5; // w19\n  int v6; // w21\n  EditorSFXManager *v7; // x0\n  EditorSFXManager *v8; // x0\n  __int64 v9; // x1\n  ButtonSprite *v10; // x0\n\n  v3 = (*(__int64 (__fastcall **)(cocos2d::CCObject *))(*(_QWORD *)a2 + 64LL))(a2);\n  result = *((unsigned int *)this + 359);\n  if ( (_DWORD)result != v3 )\n  {\n    *((_DWORD *)this + 359) = v3;\n    v5 = v3 - 1;\n    v6 = 169;\n    v7 = (EditorSFXManager *)EditorUI::resetUI(this);\n    if ( v5 <= 3 )\n    {\n      v7 = (EditorSFXManager *)word_1142210;\n      v6 = *(_DWORD *)&word_1142210[2 * v5 + 72];\n    }\n    v8 = (EditorSFXManager *)EditorSFXManager::sharedState(v7);\n    EditorSFXManager::playAction(v8, v6, 169);\n    result = *((unsigned int *)this + 359);\n    switch ( (_DWORD)result )\n    {\n      case 1:\n        v9 = *((_QWORD *)this + 115);\n        break;\n      case 2:\n        v9 = *((_QWORD *)this + 116);\n        break;\n      case 3:\n        v9 = *((_QWORD *)this + 117);\n        break;\n      case 4:\n        v9 = *((_QWORD *)this + 118);\n        break;\n      default:\n        return result;\n    }\n    v10 = (ButtonSprite *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 1072LL))(v9);\n    return ButtonSprite::updateBGImage(v10, \"GJ_button_02.png\");\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::toggleMode from 0x7ce4e4 to 0x7ce5d0 (236 bytes)\n; \n; 12 xrefs:\n; > EditorUI::onPlaytest @ 0x7ce704\n; > EditorUI::init @ 0x7cff68\n; > EditorUI::handleEditorAction @ 0xbd8320\n; > EditorUI::handleEditorAction @ 0xbd8338\n; > EditorUI::handleEditorAction @ 0xbd8350\n; > EditorUI::handleEditorAction @ 0xbd8458\n; > <???> @ 0x5d628\n; > EditorUI::init @ 0x7cf0e0\n; > EditorUI::init @ 0x7cf178\n; > EditorUI::init @ 0x7cf20c\n; > EditorUI::init @ 0x7cf2a0\n; > <???> @ 0x15422e8\n; \n; This function is hookable on this platform (idp: arm, 32 bit: False, 64 bit: True!\n; \n; Using BromaIDA 8.3.0 @ https://github.com/Stazzical/BromaIDA\n; Using bindings at commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings\n; Generated at Fri, 27 Nov 2026 12:54:13 +0000\n; \nSTP             X29, X30, [SP,#var_30]!                                ; +0x0, 0x7ce4e4\nMOV             X29, SP                                                ; +0x4, 0x7ce4e8\nSTP             X19, X20, [SP,#0x30+var_20]                            ; +0x8, 0x7ce4ec\nSTR             X21, [SP,#0x30+var_10]                                 ; +0xc, 0x7ce4f0\nMOV             X20, X0                                                ; +0x10, 0x7ce4f4\nMOV             X0, X1                                                 ; +0x14, 0x7ce4f8\nLDR             X1, [X1]                                               ; +0x18, 0x7ce4fc\nLDR             X1, [X1,#0x40]                                         ; +0x1c, 0x7ce500\nBLR             X1                                                     ; +0x20, 0x7ce504\nMOV             W19, W0                                                ; +0x24, 0x7ce508\nLDR             W0, [X20,#0x59C]                                       ; +0x28, 0x7ce50c\nCMP             W0, W19                                                ; +0x2c, 0x7ce510\nB.EQ            loc_7CE568                                             ; +0x30, 0x7ce514\nSTR             W19, [X20,#0x59C]                                      ; +0x34, 0x7ce518\nMOV             X0, X20; this                                          ; +0x38, 0x7ce51c\nSUB             W19, W19, #1                                           ; +0x3c, 0x7ce520\nMOV             W21, #0xA9                                             ; +0x40, 0x7ce524\nBL              _ZN8EditorUI7resetUIEv; EditorUI::resetUI(void)        ; +0x44, 0x7ce528\nCMP             W19, #3                                                ; +0x48, 0x7ce52c\nB.LS            loc_7CE578                                             ; +0x4c, 0x7ce530\nBL              _ZN16EditorSFXManager11sharedStateEv; EditorSFXManager::sharedState(void) ; +0x50, 0x7ce534\nMOV             W1, W21; int                                           ; +0x54, 0x7ce538\nMOV             W2, #0xA9; int                                         ; +0x58, 0x7ce53c\nBL              _ZN16EditorSFXManager10playActionEii; EditorSFXManager::playAction(int,int) ; +0x5c, 0x7ce540\nLDR             W0, [X20,#0x59C]                                       ; +0x60, 0x7ce544\nCMP             W0, #1                                                 ; +0x64, 0x7ce548\nB.EQ            loc_7CE5B8                                             ; +0x68, 0x7ce54c\nCMP             W0, #2                                                 ; +0x6c, 0x7ce550\nB.EQ            loc_7CE5C0                                             ; +0x70, 0x7ce554\nCMP             W0, #3                                                 ; +0x74, 0x7ce558\nB.EQ            loc_7CE5C8                                             ; +0x78, 0x7ce55c\nCMP             W0, #4                                                 ; +0x7c, 0x7ce560\nB.EQ            loc_7CE58C                                             ; +0x80, 0x7ce564\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0x84, 0x7ce568\nLDR             X21, [SP,#0x30+var_10]                                 ; +0x88, 0x7ce56c\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0x8c, 0x7ce570\nRET                                                                    ; +0x90, 0x7ce574\nADRL            X0, word_1142210                                       ; +0x94, 0x7ce578\nADD             X19, X0, W19,UXTW#2                                    ; +0x9c, 0x7ce580\nLDR             W21, [X19,#0x90]                                       ; +0xa0, 0x7ce584\nB               loc_7CE534                                             ; +0xa4, 0x7ce588\nLDR             X1, [X20,#0x3B0]                                       ; +0xa8, 0x7ce58c\nMOV             X0, X1                                                 ; +0xac, 0x7ce590\nLDR             X1, [X1]                                               ; +0xb0, 0x7ce594\nLDR             X1, [X1,#0x430]                                        ; +0xb4, 0x7ce598\nBLR             X1                                                     ; +0xb8, 0x7ce59c\nLDR             X21, [SP,#0x30+var_10]                                 ; +0xbc, 0x7ce5a0\nLDP             X19, X20, [SP,#0x30+var_20]                            ; +0xc0, 0x7ce5a4\nADRP            X1, #aGjButton02Png@PAGE; \"GJ_button_02.png\"           ; +0xc4, 0x7ce5a8\nLDP             X29, X30, [SP+0x30+var_30],#0x30                       ; +0xc8, 0x7ce5ac\nADD             X1, X1, #aGjButton02Png@PAGEOFF; \"GJ_button_02.png\"    ; +0xcc, 0x7ce5b0\nB               _ZN12ButtonSprite13updateBGImageEPKc; ButtonSprite::updateBGImage(char const*) ; +0xd0, 0x7ce5b4\nLDR             X1, [X20,#0x398]                                       ; +0xd4, 0x7ce5b8\nB               loc_7CE590                                             ; +0xd8, 0x7ce5bc\nLDR             X1, [X20,#0x3A0]                                       ; +0xdc, 0x7ce5c0\nB               loc_7CE590                                             ; +0xe0, 0x7ce5c4\nLDR             X1, [X20,#0x3A8]                                       ; +0xe4, 0x7ce5c8\nB               loc_7CE590                                             ; +0xe8, 0x7ce5cc", "xrefs": ["EditorUI::onPlaytest @ 0x7ce704", "EditorUI::init @ 0x7cff68", "EditorUI::handleEditorAction @ 0xbd8320", "EditorUI::handleEditorAction @ 0xbd8338", "EditorUI::handleEditorAction @ 0xbd8350", "EditorUI::handleEditorAction @ 0xbd8458", "<???> @ 0x5d628", "EditorUI::init @ 0x7cf0e0", "EditorUI::init @ 0x7cf178", "EditorUI::init @ 0x7cf20c", "EditorUI::init @ 0x7cf2a0", "<???> @ 0x15422e8"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "arm", "bida_info": "8.3.0 @ https://github.com/Stazzical/BromaIDA", "bindings_info": "commit 1c6ec395 at Thu Nov 26 21:29:22 2026 from https://github.com/geode-sdk/bindings"}