{"type": "func", "start": 4294999456, "end": 4294999621, "name": "EditorUI::toggleMode", "pseudocode": "// \n// EditorUI::toggleMode from 0x100007da0 to 0x100007e45 (165 bytes)\n// \n// 7 xrefs:\n// > EditorUI::init @ 0x10000677c\n// > EditorUI::onPlaytest @ 0x1000087f7\n// > EditorUI::handleEditorAction @ 0x10060c5d7\n// > EditorUI::init @ 0x1000057f5\n// > EditorUI::init @ 0x100005888\n// > EditorUI::init @ 0x100005914\n// > EditorUI::init @ 0x1000059a0\n// \n// This function is hookable on this platform (idp: pc, 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:18:48 +0000\n// \n\n__int64 __fastcall EditorUI::toggleMode(__int64 a1, __int64 a2)\n{\n  __int64 result; // rax\n  int v3; // r14d\n  unsigned int v4; // r14d\n  unsigned int v5; // r15d\n  __int64 v6; // rax\n  __int64 v7; // rdi\n  __int64 v8; // rax\n\n  result = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)a2 + 64LL))(a2);\n  if ( *(_DWORD *)(a1 + 1436) != (_DWORD)result )\n  {\n    v3 = result;\n    *(_DWORD *)(a1 + 1436) = result;\n    EditorUI::resetUI(a1);\n    v4 = v3 - 1;\n    v5 = 169;\n    if ( v4 <= 3 )\n      v5 = dword_100A038C0[v4];\n    v6 = EditorSFXManager::sharedState();\n    EditorSFXManager::playAction(v6, v5, 169);\n    result = (unsigned int)(*(_DWORD *)(a1 + 1436) - 1);\n    if ( (unsigned int)result <= 3 )\n    {\n      v7 = *(_QWORD *)(a1 + 8LL * (unsigned int)result + 920);\n      v8 = (*(__int64 (__fastcall **)(__int64))(*(_QWORD *)v7 + 1072LL))(v7);\n      return ButtonSprite::updateBGImage(v8, \"GJ_button_02.png\");\n    }\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::toggleMode from 0x100007da0 to 0x100007e45 (165 bytes)\n; \n; 7 xrefs:\n; > EditorUI::init @ 0x10000677c\n; > EditorUI::onPlaytest @ 0x1000087f7\n; > EditorUI::handleEditorAction @ 0x10060c5d7\n; > EditorUI::init @ 0x1000057f5\n; > EditorUI::init @ 0x100005888\n; > EditorUI::init @ 0x100005914\n; > EditorUI::init @ 0x1000059a0\n; \n; This function is hookable on this platform (idp: pc, 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:18:48 +0000\n; \npush    rbp                                                            ; +0x0, 0x100007da0\nmov     rbp, rsp                                                       ; +0x1, 0x100007da1\npush    r15                                                            ; +0x4, 0x100007da4\npush    r14                                                            ; +0x6, 0x100007da6\npush    rbx                                                            ; +0x8, 0x100007da8\npush    rax                                                            ; +0x9, 0x100007da9\nmov     rbx, rdi                                                       ; +0xa, 0x100007daa\nmov     rax, [rsi]                                                     ; +0xd, 0x100007dad\nmov     rdi, rsi                                                       ; +0x10, 0x100007db0\ncall    qword ptr [rax+40h]                                            ; +0x13, 0x100007db3\ncmp     [rbx+59Ch], eax                                                ; +0x16, 0x100007db6\njz      short loc_100007E3A                                            ; +0x1c, 0x100007dbc\nmov     r14d, eax                                                      ; +0x1e, 0x100007dbe\nmov     [rbx+59Ch], eax                                                ; +0x21, 0x100007dc1\nmov     rdi, rbx                                                       ; +0x27, 0x100007dc7\ncall    EditorUI__resetUI                                              ; +0x2a, 0x100007dca\ndec     r14d                                                           ; +0x2f, 0x100007dcf\nmov     r15d, 0A9h                                                     ; +0x32, 0x100007dd2\ncmp     r14d, 3                                                        ; +0x38, 0x100007dd8\nja      short loc_100007DEC                                            ; +0x3c, 0x100007ddc\nmov     eax, r14d                                                      ; +0x3e, 0x100007dde\nlea     rcx, dword_100A038C0                                           ; +0x41, 0x100007de1\nmov     r15d, [rcx+rax*4]                                              ; +0x48, 0x100007de8\ncall    EditorSFXManager__sharedState                                  ; +0x4c, 0x100007dec\nmov     rdi, rax                                                       ; +0x51, 0x100007df1\nmov     esi, r15d                                                      ; +0x54, 0x100007df4\nmov     edx, 0A9h                                                      ; +0x57, 0x100007df7\ncall    EditorSFXManager__playAction                                   ; +0x5c, 0x100007dfc\nmov     eax, [rbx+59Ch]                                                ; +0x61, 0x100007e01\ndec     eax                                                            ; +0x67, 0x100007e07\ncmp     eax, 3                                                         ; +0x69, 0x100007e09\nja      short loc_100007E3A                                            ; +0x6c, 0x100007e0c\nmov     eax, eax                                                       ; +0x6e, 0x100007e0e\nmov     rdi, [rbx+rax*8+398h]                                          ; +0x70, 0x100007e10\nmov     rax, [rdi]                                                     ; +0x78, 0x100007e18\ncall    qword ptr [rax+430h]                                           ; +0x7b, 0x100007e1b\nlea     rsi, aGjButton02Png; \"GJ_button_02.png\"                        ; +0x81, 0x100007e21\nmov     rdi, rax                                                       ; +0x88, 0x100007e28\nadd     rsp, 8                                                         ; +0x8b, 0x100007e2b\npop     rbx                                                            ; +0x8f, 0x100007e2f\npop     r14                                                            ; +0x90, 0x100007e30\npop     r15                                                            ; +0x92, 0x100007e32\npop     rbp                                                            ; +0x94, 0x100007e34\njmp     ButtonSprite__updateBGImage                                    ; +0x95, 0x100007e35\nadd     rsp, 8                                                         ; +0x9a, 0x100007e3a\npop     rbx                                                            ; +0x9e, 0x100007e3e\npop     r14                                                            ; +0x9f, 0x100007e3f\npop     r15                                                            ; +0xa1, 0x100007e41\npop     rbp                                                            ; +0xa3, 0x100007e43\nretn                                                                   ; +0xa4, 0x100007e44", "xrefs": ["EditorUI::init @ 0x10000677c", "EditorUI::onPlaytest @ 0x1000087f7", "EditorUI::handleEditorAction @ 0x10060c5d7", "EditorUI::init @ 0x1000057f5", "EditorUI::init @ 0x100005888", "EditorUI::init @ 0x100005914", "EditorUI::init @ 0x1000059a0"], "is_objc": false, "is_32_bit": false, "is_64_bit": true, "idp_name": "pc", "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"}