{"type": "func", "start": 4299623396, "end": 4299623576, "name": "EditorUI::toggleMode", "pseudocode": "// \n// EditorUI::toggleMode from 0x100470be4 to 0x100470c98 (180 bytes)\n// \n// 4 xrefs:\n// > EditorUI::handleEditorAction @ 0x1001630c4\n// > EditorUI::init @ 0x10046f904\n// > EditorUI::onPlaytest @ 0x100471464\n// > EditorUI::init @ 0x10046e934\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 11:05:38 +0000\n// \n\nvoid *__fastcall EditorUI::toggleMode(__int64 a1, __int64 a2)\n{\n  void *result; // x0\n  int v4; // w20\n  __n128 v5; // q0\n  __int64 v6; // x20\n  __int64 v7; // x0\n  unsigned int v8; // w8\n  __int64 v9; // x0\n  __int64 v10; // x0\n\n  result = (void *)(*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);\n  if ( *(_DWORD *)(a1 + 1436) != (_DWORD)result )\n  {\n    v4 = (int)result;\n    *(_DWORD *)(a1 + 1436) = (_DWORD)result;\n    EditorUI::resetUI(a1);\n    if ( (unsigned int)(v4 - 1) > 3 )\n      v6 = 169;\n    else\n      v6 = dword_10076F2C0[v4 - 1];\n    v7 = EditorSFXManager::sharedState(v5);\n    result = (void *)EditorSFXManager::playAction(v7, v6, 169);\n    v8 = *(_DWORD *)(a1 + 1436) - 1;\n    if ( v8 <= 3 )\n    {\n      v9 = *(_QWORD *)(a1 + 8 * v8 + 920);\n      v10 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v9 + 1072LL))(v9);\n      return ButtonSprite::updateBGImage(v10, (__int64)\"GJ_button_02.png\");\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::toggleMode from 0x100470be4 to 0x100470c98 (180 bytes)\n; \n; 4 xrefs:\n; > EditorUI::handleEditorAction @ 0x1001630c4\n; > EditorUI::init @ 0x10046f904\n; > EditorUI::onPlaytest @ 0x100471464\n; > EditorUI::init @ 0x10046e934\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 11:05:38 +0000\n; \nSTP             X20, X19, [SP,#-0x10+var_10]!                          ; +0x0, 0x100470be4\nSTP             X29, X30, [SP,#0x10+var_s0]                            ; +0x4, 0x100470be8\nADD             X29, SP, #0x10                                         ; +0x8, 0x100470bec\nMOV             X19, X0                                                ; +0xc, 0x100470bf0\nLDR             X8, [X1]                                               ; +0x10, 0x100470bf4\nLDR             X8, [X8,#0x40]                                         ; +0x14, 0x100470bf8\nMOV             X0, X1                                                 ; +0x18, 0x100470bfc\nBLR             X8                                                     ; +0x1c, 0x100470c00\nLDR             W8, [X19,#0x59C]                                       ; +0x20, 0x100470c04\nCMP             W8, W0                                                 ; +0x24, 0x100470c08\nB.EQ            loc_100470C8C                                          ; +0x28, 0x100470c0c\nMOV             X20, X0                                                ; +0x2c, 0x100470c10\nSTR             W0, [X19,#0x59C]                                       ; +0x30, 0x100470c14\nMOV             X0, X19                                                ; +0x34, 0x100470c18\nBL              EditorUI__resetUI                                      ; +0x38, 0x100470c1c\nSUB             W8, W20, #1                                            ; +0x3c, 0x100470c20\nCMP             W8, #3                                                 ; +0x40, 0x100470c24\nB.HI            loc_100470C3C                                          ; +0x44, 0x100470c28\nADRL            X9, dword_10076F2C0                                    ; +0x48, 0x100470c2c\nLDR             W20, [X9,W8,UXTW#2]                                    ; +0x50, 0x100470c34\nB               loc_100470C40                                          ; +0x54, 0x100470c38\nMOV             W20, #0xA9                                             ; +0x58, 0x100470c3c\nBL              EditorSFXManager__sharedState                          ; +0x5c, 0x100470c40\nMOV             X1, X20                                                ; +0x60, 0x100470c44\nMOV             W2, #0xA9                                              ; +0x64, 0x100470c48\nBL              EditorSFXManager__playAction                           ; +0x68, 0x100470c4c\nLDR             W8, [X19,#0x59C]                                       ; +0x6c, 0x100470c50\nSUB             W8, W8, #1                                             ; +0x70, 0x100470c54\nCMP             W8, #3                                                 ; +0x74, 0x100470c58\nB.HI            loc_100470C8C                                          ; +0x78, 0x100470c5c\nLSL             W8, W8, #3                                             ; +0x7c, 0x100470c60\nADD             X8, X19, X8                                            ; +0x80, 0x100470c64\nLDR             X0, [X8,#0x398]                                        ; +0x84, 0x100470c68\nLDR             X8, [X0]                                               ; +0x88, 0x100470c6c\nLDR             X8, [X8,#0x430]                                        ; +0x8c, 0x100470c70\nBLR             X8                                                     ; +0x90, 0x100470c74\nADRL            X1, aGjButton02Png; \"GJ_button_02.png\"                 ; +0x94, 0x100470c78\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0x9c, 0x100470c80\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xa0, 0x100470c84\nB               ButtonSprite__updateBGImage                            ; +0xa4, 0x100470c88\nLDP             X29, X30, [SP,#0x10+var_s0]                            ; +0xa8, 0x100470c8c\nLDP             X20, X19, [SP+0x10+var_10],#0x20                       ; +0xac, 0x100470c90\nRET                                                                    ; +0xb0, 0x100470c94", "xrefs": ["EditorUI::handleEditorAction @ 0x1001630c4", "EditorUI::init @ 0x10046f904", "EditorUI::onPlaytest @ 0x100471464", "EditorUI::init @ 0x10046e934"], "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"}