{"type": "func", "start": 4299634168, "end": 4299634400, "name": "EditorUI::toggleWindow", "pseudocode": "// \n// EditorUI::toggleWindow from 0x1004735f8 to 0x1004736e0 (232 bytes)\n// \n// 4 xrefs:\n// > EditorUI::onDpadStep @ 0x100186aac\n// > EditorUI::onEditorCommands @ 0x100471c4c\n// > EditorUI::onGridSizeIndicator @ 0x100471c54\n// > sub_100476C74 @ 0x100476c84\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:39 +0000\n// \n\n__int64 *__fastcall EditorUI::toggleWindow(__int64 a1, int a2)\n{\n  __int64 *result; // x0\n  __int64 *v4; // x20\n  int v5; // [xsp+0h] [xbp-20h] BYREF\n  int *v6; // [xsp+8h] [xbp-18h] BYREF\n\n  v5 = a2;\n  result = sub_100019268((_QWORD *)(a1 + 576), &v5);\n  if ( result )\n    return (__int64 *)(*(__int64 (__fastcall **)(__int64, _QWORD))(*(_QWORD *)result[3] + 1368LL))(result[3], 0);\n  if ( v5 > 3 )\n  {\n    if ( v5 == 4 )\n    {\n      result = (__int64 *)sub_1004DEDE8(a1);\n    }\n    else\n    {\n      if ( v5 != 5 )\n        return result;\n      result = (__int64 *)sub_10053C7E8(a1);\n    }\n  }\n  else if ( v5 == 1 )\n  {\n    result = (__int64 *)EditorCommandsPopup::create(a1);\n  }\n  else\n  {\n    if ( v5 != 3 )\n      return result;\n    result = (__int64 *)sub_1004DD550(a1);\n  }\n  v4 = result;\n  if ( result )\n  {\n    v6 = &v5;\n    sub_10001A978(a1 + 576, &v5, (__int64)&unk_10076F2A2, &v6)[3] = result;\n    return (__int64 *)(*(__int64 (__fastcall **)(__int64 *))(*v4 + 1312))(v4);\n  }\n  return result;\n}", "assembly": "; \n; EditorUI::toggleWindow from 0x1004735f8 to 0x1004736e0 (232 bytes)\n; \n; 4 xrefs:\n; > EditorUI::onDpadStep @ 0x100186aac\n; > EditorUI::onEditorCommands @ 0x100471c4c\n; > EditorUI::onGridSizeIndicator @ 0x100471c54\n; > sub_100476C74 @ 0x100476c84\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:39 +0000\n; \nSUB             SP, SP, #0x30                                          ; +0x0, 0x1004735f8\nSTP             X20, X19, [SP,#0x20+var_10]                            ; +0x4, 0x1004735fc\nSTP             X29, X30, [SP,#0x20+var_s0]                            ; +0x8, 0x100473600\nADD             X29, SP, #0x20                                         ; +0xc, 0x100473604\nMOV             X19, X0                                                ; +0x10, 0x100473608\nSTR             W1, [SP,#0x20+var_20]                                  ; +0x14, 0x10047360c\nADD             X0, X0, #0x240                                         ; +0x18, 0x100473610\nMOV             X1, SP                                                 ; +0x1c, 0x100473614\nBL              sub_100019268                                          ; +0x20, 0x100473618\nCBZ             X0, loc_100473638                                      ; +0x24, 0x10047361c\nLDR             X0, [X0,#0x18]                                         ; +0x28, 0x100473620\nLDR             X8, [X0]                                               ; +0x2c, 0x100473624\nLDR             X8, [X8,#0x558]                                        ; +0x30, 0x100473628\nMOV             X1, #0                                                 ; +0x34, 0x10047362c\nBLR             X8                                                     ; +0x38, 0x100473630\nB               loc_1004736D0                                          ; +0x3c, 0x100473634\nLDR             W8, [SP,#0x20+var_20]                                  ; +0x40, 0x100473638\nCMP             W8, #3                                                 ; +0x44, 0x10047363c\nB.GT            loc_100473660                                          ; +0x48, 0x100473640\nCMP             W8, #1                                                 ; +0x4c, 0x100473644\nB.EQ            loc_10047367C                                          ; +0x50, 0x100473648\nCMP             W8, #3                                                 ; +0x54, 0x10047364c\nB.NE            loc_1004736D0                                          ; +0x58, 0x100473650\nMOV             X0, X19                                                ; +0x5c, 0x100473654\nBL              sub_1004DD550                                          ; +0x60, 0x100473658\nB               loc_100473690                                          ; +0x64, 0x10047365c\nCMP             W8, #4                                                 ; +0x68, 0x100473660\nB.EQ            loc_100473688                                          ; +0x6c, 0x100473664\nCMP             W8, #5                                                 ; +0x70, 0x100473668\nB.NE            loc_1004736D0                                          ; +0x74, 0x10047366c\nMOV             X0, X19                                                ; +0x78, 0x100473670\nBL              sub_10053C7E8                                          ; +0x7c, 0x100473674\nB               loc_100473690                                          ; +0x80, 0x100473678\nMOV             X0, X19                                                ; +0x84, 0x10047367c\nBL              EditorCommandsPopup__create                            ; +0x88, 0x100473680\nB               loc_100473690                                          ; +0x8c, 0x100473684\nMOV             X0, X19                                                ; +0x90, 0x100473688\nBL              sub_1004DEDE8                                          ; +0x94, 0x10047368c\nMOV             X20, X0                                                ; +0x98, 0x100473690\nCBZ             X0, loc_1004736D0                                      ; +0x9c, 0x100473694\nMOV             X8, SP                                                 ; +0xa0, 0x100473698\nSTR             X8, [SP,#0x20+var_18]                                  ; +0xa4, 0x10047369c\nADRL            X2, unk_10076F2A2                                      ; +0xa8, 0x1004736a0\nADD             X0, X19, #0x240                                        ; +0xb0, 0x1004736a8\nMOV             X1, SP                                                 ; +0xb4, 0x1004736ac\nADD             X3, SP, #0x20+var_18                                   ; +0xb8, 0x1004736b0\nADD             X4, SP, #0x20+var_19                                   ; +0xbc, 0x1004736b4\nBL              sub_10001A978                                          ; +0xc0, 0x1004736b8\nSTR             X20, [X0,#0x18]                                        ; +0xc4, 0x1004736bc\nLDR             X8, [X20]                                              ; +0xc8, 0x1004736c0\nLDR             X8, [X8,#0x520]                                        ; +0xcc, 0x1004736c4\nMOV             X0, X20                                                ; +0xd0, 0x1004736c8\nBLR             X8                                                     ; +0xd4, 0x1004736cc\nLDP             X29, X30, [SP,#0x20+var_s0]                            ; +0xd8, 0x1004736d0\nLDP             X20, X19, [SP,#0x20+var_10]                            ; +0xdc, 0x1004736d4\nADD             SP, SP, #0x30 ; '0'                                    ; +0xe0, 0x1004736d8\nRET                                                                    ; +0xe4, 0x1004736dc", "xrefs": ["EditorUI::onDpadStep @ 0x100186aac", "EditorUI::onEditorCommands @ 0x100471c4c", "EditorUI::onGridSizeIndicator @ 0x100471c54", "sub_100476C74 @ 0x100476c84"], "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"}