-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMainWindow.xaml
More file actions
685 lines (650 loc) · 41.3 KB
/
Copy pathMainWindow.xaml
File metadata and controls
685 lines (650 loc) · 41.3 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
<Controls:MetroWindow
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:Controls="clr-namespace:MahApps.Metro.Controls;assembly=MahApps.Metro"
Title="Installer Analysis"
Width="1280" Height="780"
MinWidth="1024" MinHeight="640"
WindowStartupLocation="CenterScreen"
TitleCharacterCasing="Normal"
GlowBrush="{DynamicResource MahApps.Brushes.Accent}"
NonActiveGlowBrush="{DynamicResource MahApps.Brushes.Accent}"
BorderThickness="1"
ShowIconOnTitleBar="False"
AllowDrop="True">
<Window.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Controls.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Fonts.xaml" />
<ResourceDictionary Source="pack://application:,,,/MahApps.Metro;component/Styles/Themes/Dark.Steel.xaml" />
</ResourceDictionary.MergedDictionaries>
<!-- Sidebar button template: shade-lift on Pressed instead of the MahApps
Square default (which inverts colors via VSM and renders white text
invisible on the dark-theme sidebar). Foreground stays White;
#3A3A3A reads correctly under either theme during the brief press. -->
<ControlTemplate x:Key="SidebarButtonTemplate" TargetType="Button">
<Border x:Name="Bd"
Background="{TemplateBinding Background}"
BorderBrush="{TemplateBinding BorderBrush}"
BorderThickness="{TemplateBinding BorderThickness}"
SnapsToDevicePixels="True">
<ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
Margin="{TemplateBinding Padding}"
RecognizesAccessKey="True"
SnapsToDevicePixels="True"/>
</Border>
<ControlTemplate.Triggers>
<Trigger Property="IsPressed" Value="True">
<Setter TargetName="Bd" Property="Background">
<Setter.Value>
<SolidColorBrush Color="#3A3A3A"/>
</Setter.Value>
</Setter>
</Trigger>
<Trigger Property="IsEnabled" Value="False">
<Setter TargetName="Bd" Property="Opacity" Value="0.5"/>
</Trigger>
</ControlTemplate.Triggers>
</ControlTemplate>
<Style x:Key="ViewButtonStyle" TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.Square}">
<Setter Property="Template" Value="{StaticResource SidebarButtonTemplate}"/>
<Setter Property="Height" Value="42"/>
<Setter Property="Margin" Value="8,3,8,3"/>
<Setter Property="Padding" Value="12,0,12,0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Controls:ControlsHelper.ContentCharacterCasing" Value="Normal"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background">
<Setter.Value><SolidColorBrush Color="#1E1E1E"/></Setter.Value>
</Setter>
<Setter Property="BorderBrush">
<Setter.Value><SolidColorBrush Color="#555555"/></Setter.Value>
</Setter>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style x:Key="OptionsButtonStyle" TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.Square}">
<Setter Property="Template" Value="{StaticResource SidebarButtonTemplate}"/>
<Setter Property="Height" Value="42"/>
<Setter Property="Margin" Value="8,3,8,3"/>
<Setter Property="Padding" Value="12,0,12,0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
<Setter Property="FontSize" Value="13"/>
<Setter Property="FontWeight" Value="Bold"/>
<Setter Property="Controls:ControlsHelper.ContentCharacterCasing" Value="Normal"/>
<Setter Property="Foreground" Value="White"/>
<Setter Property="Background">
<Setter.Value><SolidColorBrush Color="#1E1E1E"/></Setter.Value>
</Setter>
<Setter Property="BorderBrush">
<Setter.Value><SolidColorBrush Color="#555555"/></Setter.Value>
</Setter>
<Setter Property="BorderThickness" Value="1"/>
</Style>
<Style x:Key="SquareInlineButtonStyle" TargetType="Button" BasedOn="{StaticResource MahApps.Styles.Button.Square}">
<Setter Property="Height" Value="28"/>
<Setter Property="MinWidth" Value="90"/>
<Setter Property="Margin" Value="0,0,8,0"/>
<Setter Property="Controls:ControlsHelper.ContentCharacterCasing" Value="Normal"/>
<Setter Property="FontSize" Value="12"/>
</Style>
<Style x:Key="ViewDataGrid" TargetType="DataGrid">
<Setter Property="AutoGenerateColumns" Value="False"/>
<Setter Property="CanUserAddRows" Value="False"/>
<Setter Property="CanUserDeleteRows" Value="False"/>
<Setter Property="IsReadOnly" Value="True"/>
<Setter Property="SelectionMode" Value="Extended"/>
<Setter Property="SelectionUnit" Value="FullRow"/>
<Setter Property="HeadersVisibility" Value="Column"/>
<Setter Property="GridLinesVisibility" Value="Horizontal"/>
<Setter Property="RowHeaderWidth" Value="0"/>
<Setter Property="BorderThickness" Value="0"/>
<Setter Property="ColumnHeaderHeight" Value="30"/>
<Setter Property="FontSize" Value="11"/>
<Setter Property="Background" Value="{DynamicResource MahApps.Brushes.ThemeBackground}"/>
<Setter Property="Foreground" Value="{DynamicResource MahApps.Brushes.ThemeForeground}"/>
<Setter Property="RowBackground" Value="{DynamicResource MahApps.Brushes.ThemeBackground}"/>
<Setter Property="AlternatingRowBackground" Value="{DynamicResource MahApps.Brushes.Control.Background}"/>
<Setter Property="HorizontalGridLinesBrush" Value="{DynamicResource MahApps.Brushes.Gray8}"/>
</Style>
</ResourceDictionary>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="230"/>
<ColumnDefinition Width="1"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<!-- ================================================================ -->
<!-- LEFT SIDEBAR -->
<!-- ================================================================ -->
<Border Grid.Column="0">
<DockPanel>
<StackPanel DockPanel.Dock="Top" Margin="14,14,14,12">
<TextBlock x:Name="txtAppTitle" Text="Installer Analysis" FontSize="20" FontWeight="Bold"/>
<TextBlock x:Name="txtVersion" Text="v1.0.0.0" FontSize="10"
Foreground="{DynamicResource MahApps.Brushes.Gray1}"
Margin="0,2,0,0"/>
</StackPanel>
<StackPanel DockPanel.Dock="Bottom" Margin="14,0,14,14">
<Separator Margin="0,8,0,10"/>
<DockPanel LastChildFill="False">
<TextBlock x:Name="txtThemeLabel" Text="Dark Theme"
DockPanel.Dock="Left" VerticalAlignment="Center" FontSize="12"/>
<Controls:ToggleSwitch x:Name="toggleTheme"
DockPanel.Dock="Right"
IsOn="True"
OnContent="" OffContent=""
MinWidth="0"
ToolTip="Toggle dark / light theme"/>
</DockPanel>
</StackPanel>
<ScrollViewer VerticalScrollBarVisibility="Auto">
<StackPanel>
<Button x:Name="btnViewOverview" Content="Overview" Style="{StaticResource ViewButtonStyle}"
ToolTip="Show the installer's top-level summary"/>
<Button x:Name="btnViewMsi" Content="MSI Properties" Style="{StaticResource ViewButtonStyle}"
ToolTip="Show MSI tables, properties, and product details"/>
<Button x:Name="btnViewPayload" Content="Payload" Style="{StaticResource ViewButtonStyle}"
ToolTip="Show files embedded inside the installer"/>
<Button x:Name="btnViewFiles" Content="File Browser" Style="{StaticResource ViewButtonStyle}"
Visibility="Collapsed"
ToolTip="Browse the listed files as folders and extract selected files or folders with their paths"/>
<Button x:Name="btnViewEmbedded" Content="Inner Installers" Style="{StaticResource ViewButtonStyle}"
Visibility="Collapsed"
ToolTip="Show inner MSIs / CABs / EXEs that can themselves be analyzed"/>
<Button x:Name="btnViewRegistry" Content="Registry Settings" Style="{StaticResource ViewButtonStyle}"
Visibility="Collapsed"
ToolTip="Show the registry keys and values the installer writes or removes"/>
<Button x:Name="btnViewStrings" Content="Strings" Style="{StaticResource ViewButtonStyle}"
ToolTip="Show strings and resources extracted from the installer"/>
<Button x:Name="btnOptions" Content="Options"
Style="{StaticResource OptionsButtonStyle}"
Margin="8,24,8,3"
ToolTip="7-Zip path, logging, reports folder, about"/>
</StackPanel>
</ScrollViewer>
</DockPanel>
</Border>
<Border Grid.Column="1" Background="{DynamicResource MahApps.Brushes.Gray8}"/>
<!-- ================================================================ -->
<!-- MAIN CONTENT AREA -->
<!-- Row layout: -->
<!-- 0 module header band (view title + subtitle) -->
<!-- 1 file-path row (TextBox + Browse) -->
<!-- 2 action bar (Copy / Export / Extract), hidden pre-analyze -->
<!-- 3 content host (one of 4 views, Visibility-swapped) -->
<!-- 4 GridSplitter -->
<!-- 5 log drawer -->
<!-- 6 status bar -->
<!-- ================================================================ -->
<Grid Grid.Column="2">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="160"/>
<RowDefinition Height="Auto"/>
</Grid.RowDefinitions>
<Border Grid.Row="0" Background="{DynamicResource MahApps.Brushes.Gray10}" Padding="16,12,16,10">
<StackPanel>
<!-- Breadcrumb row. Collapsed by default; revealed when
$script:AnalysisStack.Count > 0 (i.e. we have drilled
into an inner installer at least once). The Back
button pops one stack level; the segments StackPanel
is populated by Update-BreadcrumbBar. -->
<DockPanel x:Name="breadcrumbBar"
Visibility="Collapsed"
LastChildFill="True"
Margin="0,0,0,6">
<Button x:Name="btnBreadcrumbBack"
DockPanel.Dock="Left"
Content="← Back"
MinWidth="76" Height="24"
Padding="6,0,6,0"
Margin="0,0,8,0"
Style="{StaticResource MahApps.Styles.Button.Square}"
Controls:ControlsHelper.ContentCharacterCasing="Normal"
FontSize="11"
ToolTip="Return to the previous (outer) installer"/>
<StackPanel x:Name="breadcrumbSegments"
Orientation="Horizontal"
VerticalAlignment="Center"/>
</DockPanel>
<TextBlock x:Name="txtModuleTitle" Text="Overview" FontSize="18" FontWeight="SemiBold"/>
<TextBlock x:Name="txtModuleSubtitle"
Text="Drag an installer onto the window or browse to one. Supports EXE, MSI, MSIX, .intunewin, .nupkg, PSADT zip, and Squirrel Setup.exe."
FontSize="11"
TextWrapping="Wrap"
Foreground="{DynamicResource MahApps.Brushes.Gray1}"
Margin="0,2,0,0"/>
</StackPanel>
</Border>
<Grid Grid.Row="1" Margin="16,10,16,0">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<TextBox x:Name="txtFilePath"
Grid.Column="0"
FontSize="12"
FontFamily="Cascadia Code, Consolas, Courier New"
Padding="6,4,6,4"
Controls:TextBoxHelper.Watermark="C:\path\to\installer.exe or .msi or package (press Enter to analyze)">
<TextBox.ContextMenu>
<ContextMenu x:Name="ctxPath">
<MenuItem Header="Cut" Command="ApplicationCommands.Cut"/>
<MenuItem Header="Copy" Command="ApplicationCommands.Copy"/>
<MenuItem Header="Paste" Command="ApplicationCommands.Paste"/>
<MenuItem Header="Select All" Command="ApplicationCommands.SelectAll"/>
<Separator/>
<MenuItem x:Name="ctxPathCopyPath" Header="Copy path"/>
<MenuItem x:Name="ctxPathOpenFolder" Header="Open enclosing folder"/>
<MenuItem x:Name="ctxPathReanalyze" Header="Re-analyze"/>
</ContextMenu>
</TextBox.ContextMenu>
</TextBox>
<Button x:Name="btnBrowse"
Grid.Column="1"
Content="Browse..."
Style="{StaticResource SquareInlineButtonStyle}"
Margin="8,0,0,0"
MinWidth="90" Height="28"
ToolTip="Pick an installer file from disk to analyze (Ctrl+O)"/>
</Grid>
<Border Grid.Row="2" x:Name="actionBar" Visibility="Collapsed" Padding="16,10,16,10">
<StackPanel Orientation="Horizontal">
<Button x:Name="btnCopySummary" Content="Copy Summary" Style="{StaticResource SquareInlineButtonStyle}"
ToolTip="Copy the text summary to the clipboard"/>
<Button x:Name="btnCopyJson" Content="Copy JSON" Style="{StaticResource SquareInlineButtonStyle}"
ToolTip="Copy the full analysis as JSON to the clipboard"/>
<Button x:Name="btnExportCsv" Content="Export CSV" Style="{StaticResource SquareInlineButtonStyle}"
ToolTip="Export the current view as CSV"/>
<Button x:Name="btnExportHtml" Content="Export HTML" Style="{StaticResource SquareInlineButtonStyle}"
ToolTip="Export the full report as HTML"/>
<Button x:Name="btnExtractAll" Content="Extract Payload" Style="{StaticResource SquareInlineButtonStyle}" Visibility="Collapsed"
ToolTip="Extract every payload file to a folder on disk"/>
</StackPanel>
</Border>
<Grid Grid.Row="3">
<Grid x:Name="viewHost" Margin="8,8,8,0">
<TextBox x:Name="txtOverview"
Visibility="Visible"
IsReadOnly="True"
TextWrapping="Wrap"
VerticalScrollBarVisibility="Auto"
FontFamily="Cascadia Code, Consolas, Courier New"
FontSize="11"
BorderThickness="0"
Padding="8"
Text="No file loaded. Drag an installer onto the window, click Browse, or paste a path above and press Enter."/>
<DataGrid x:Name="gridMsi"
Visibility="Collapsed"
Style="{StaticResource ViewDataGrid}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource MahApps.Styles.DataGridColumnHeader}">
<Setter Property="Padding" Value="6,0,6,0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource MahApps.Styles.DataGridCell}">
<Setter Property="Padding" Value="6,0,6,0"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTextColumn Header="Property" Width="260" Binding="{Binding Property}"/>
<DataGridTextColumn Header="Value" Width="*" Binding="{Binding Value}"/>
</DataGrid.Columns>
</DataGrid>
<DataGrid x:Name="gridPayload"
Visibility="Collapsed"
Style="{StaticResource ViewDataGrid}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource MahApps.Styles.DataGridColumnHeader}">
<Setter Property="Padding" Value="6,0,6,0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource MahApps.Styles.DataGridCell}">
<Setter Property="Padding" Value="6,0,6,0"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.ContextMenu>
<ContextMenu x:Name="ctxPayload">
<MenuItem x:Name="ctxPayloadExtractTemp" Header="Extract to temp folder"/>
<Separator/>
<MenuItem x:Name="ctxPayloadCopyName" Header="Copy name"/>
<MenuItem x:Name="ctxPayloadCopyPath" Header="Copy full path"/>
<Separator/>
<MenuItem x:Name="ctxPayloadHash" Header="Hash this entry (SHA-256)"/>
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Width="*" Binding="{Binding Name}"/>
<DataGridTextColumn Header="Size" Width="110" Binding="{Binding Size}"/>
<DataGridTextColumn Header="DateTime" Width="170" Binding="{Binding DateTime}"/>
</DataGrid.Columns>
</DataGrid>
<!-- Inner Installers tab. Action row at top, classified grid
below. Populated by Get-EmbeddedInstallers, driven by
$script:LastEmbedded after the pipeline completes. -->
<Grid x:Name="panelEmbedded" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<StackPanel Grid.Row="0"
Orientation="Horizontal"
Margin="0,0,0,8">
<Button x:Name="btnExtractAllInner"
Content="Extract All Inner"
Style="{StaticResource SquareInlineButtonStyle}"
ToolTip="Extract every classified inner installer entry to a folder of your choice"/>
<Button x:Name="btnAnalyzeSelectedInner"
Content="Analyze Selected"
Style="{StaticResource SquareInlineButtonStyle}"
ToolTip="Drill into the selected inner installer (extracts to temp and re-runs the analyzer)"/>
<Button x:Name="btnOpenInNewWindow"
Content="Open In New Window"
Style="{StaticResource SquareInlineButtonStyle}"
ToolTip="Launch a fresh analyzer process against the selected inner installer"/>
</StackPanel>
<DataGrid x:Name="gridEmbedded"
Grid.Row="1"
Style="{StaticResource ViewDataGrid}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource MahApps.Styles.DataGridColumnHeader}">
<Setter Property="Padding" Value="6,0,6,0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource MahApps.Styles.DataGridCell}">
<Setter Property="Padding" Value="6,0,6,0"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.ContextMenu>
<ContextMenu x:Name="ctxEmbedded">
<MenuItem x:Name="ctxEmbAnalyze" Header="Analyze Selected"/>
<MenuItem x:Name="ctxEmbOpenNew" Header="Open in new window"/>
<Separator/>
<MenuItem x:Name="ctxEmbExtractTemp" Header="Extract to temp folder"/>
<Separator/>
<MenuItem x:Name="ctxEmbCopyName" Header="Copy name"/>
<MenuItem x:Name="ctxEmbCopyPath" Header="Copy full path"/>
<Separator/>
<MenuItem x:Name="ctxEmbHash" Header="Hash this entry (SHA-256)"/>
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Width="*" Binding="{Binding Name}"/>
<DataGridTextColumn Header="Kind" Width="64" Binding="{Binding Kind}"/>
<DataGridTextColumn Header="Size" Width="100" Binding="{Binding SizeFormatted}"/>
<DataGridTextColumn Header="Description" Width="2*" Binding="{Binding Description}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
<Grid x:Name="panelFiles" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Margin="0,0,0,6" LastChildFill="True">
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal">
<Button x:Name="btnFilesUp"
Content="Up"
Style="{StaticResource SquareInlineButtonStyle}"
MinWidth="56"
ToolTip="Go to the parent folder"/>
<Button x:Name="btnFilesExtractSelected"
Content="Extract Selected..."
Style="{StaticResource SquareInlineButtonStyle}"
ToolTip="Extract the selected files and folders, with their paths, to a folder of your choice"/>
<Button x:Name="btnFilesExtractFolder"
Content="Extract This Folder..."
Style="{StaticResource SquareInlineButtonStyle}"
ToolTip="Extract everything under the current folder, with paths, to a folder of your choice"/>
</StackPanel>
<TextBox x:Name="txtFilesFilter"
FontSize="12"
Padding="6,4,6,4"
MinWidth="180"
Controls:TextBoxHelper.Watermark="Filter names in this folder..."/>
</DockPanel>
<TextBlock x:Name="txtFilesFolder"
Grid.Row="1"
Text="\"
FontFamily="Cascadia Code, Consolas, Courier New"
FontSize="11"
Margin="2,0,0,6"
TextTrimming="CharacterEllipsis"
Foreground="{DynamicResource MahApps.Brushes.Gray1}"/>
<Grid Grid.Row="2">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="250" MinWidth="120"/>
<ColumnDefinition Width="5"/>
<ColumnDefinition Width="*"/>
</Grid.ColumnDefinitions>
<TreeView x:Name="treeFiles"
Grid.Column="0"
FontSize="12"
BorderThickness="0"
Background="{DynamicResource MahApps.Brushes.ThemeBackground}"
Foreground="{DynamicResource MahApps.Brushes.ThemeForeground}"
VirtualizingStackPanel.IsVirtualizing="True"
ScrollViewer.HorizontalScrollBarVisibility="Auto"/>
<GridSplitter Grid.Column="1"
Width="5"
HorizontalAlignment="Stretch"
VerticalAlignment="Stretch"
Background="{DynamicResource MahApps.Brushes.Gray8}"/>
<DataGrid x:Name="gridFiles"
Grid.Column="2"
Style="{StaticResource ViewDataGrid}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource MahApps.Styles.DataGridColumnHeader}">
<Setter Property="Padding" Value="6,0,6,0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource MahApps.Styles.DataGridCell}">
<Setter Property="Padding" Value="6,0,6,0"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.ContextMenu>
<ContextMenu x:Name="ctxFiles">
<MenuItem x:Name="ctxFilesOpen" Header="Open folder"/>
<Separator/>
<MenuItem x:Name="ctxFilesExtractTo" Header="Extract to folder..."/>
<MenuItem x:Name="ctxFilesExtractTemp" Header="Extract to temp folder"/>
<Separator/>
<MenuItem x:Name="ctxFilesCopyName" Header="Copy name"/>
<MenuItem x:Name="ctxFilesCopyPath" Header="Copy full path"/>
<Separator/>
<MenuItem x:Name="ctxFilesHash" Header="Hash this entry (SHA-256)"/>
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTextColumn Header="Name" Width="*" Binding="{Binding Name}"/>
<DataGridTextColumn Header="Kind" Width="70" Binding="{Binding Kind}"/>
<DataGridTextColumn Header="Size" Width="110" Binding="{Binding Size}"/>
<DataGridTextColumn Header="DateTime" Width="170" Binding="{Binding DateTime}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Grid>
<Grid x:Name="panelRegistry" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<DockPanel Grid.Row="0" Margin="0,0,0,4" LastChildFill="True">
<Button x:Name="btnRegistryCopyAll"
DockPanel.Dock="Right"
Content="Copy All"
Style="{StaticResource SquareInlineButtonStyle}"
Margin="8,0,0,0"
ToolTip="Copy every listed setting as tab-separated text"/>
<TextBox x:Name="txtRegistryFilter"
FontSize="12"
Padding="6,4,6,4"
Controls:TextBoxHelper.Watermark="Filter by key, name, value or component (case-insensitive)..."/>
</DockPanel>
<TextBlock x:Name="txtRegistryNote"
Grid.Row="1"
Text=""
FontSize="11"
Margin="2,0,0,6"
TextWrapping="Wrap"
Foreground="{DynamicResource MahApps.Brushes.Gray1}"/>
<DataGrid x:Name="gridRegistry"
Grid.Row="2"
Style="{StaticResource ViewDataGrid}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource MahApps.Styles.DataGridColumnHeader}">
<Setter Property="Padding" Value="6,0,6,0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource MahApps.Styles.DataGridCell}">
<Setter Property="Padding" Value="6,0,6,0"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.ContextMenu>
<ContextMenu x:Name="ctxRegistry">
<MenuItem x:Name="ctxRegistryCopyKey" Header="Copy key path"/>
<MenuItem x:Name="ctxRegistryCopyValue" Header="Copy value"/>
<MenuItem x:Name="ctxRegistryCopyRows" Header="Copy selected rows"/>
</ContextMenu>
</DataGrid.ContextMenu>
<DataGrid.Columns>
<DataGridTextColumn Header="Root" Width="62" Binding="{Binding Root}"/>
<DataGridTextColumn Header="Key" Width="3*" MinWidth="160" Binding="{Binding Key}"/>
<DataGridTextColumn Header="Name" Width="150" Binding="{Binding Name}"/>
<DataGridTextColumn Header="Type" Width="110" Binding="{Binding Type}"/>
<DataGridTextColumn Header="Value" Width="2*" MinWidth="120" Binding="{Binding Value}"/>
<DataGridTextColumn Header="Action" Width="120" Binding="{Binding Action}"/>
<DataGridTextColumn Header="Flags" Width="130" Binding="{Binding Flags}"/>
<DataGridTextColumn Header="View" Width="105" Binding="{Binding View}"/>
<DataGridTextColumn Header="Section" Width="130" Binding="{Binding Section}"/>
<DataGridTextColumn Header="Source" Width="105" Binding="{Binding Source}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
<Grid x:Name="panelStrings" Visibility="Collapsed">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"/>
<RowDefinition Height="*"/>
</Grid.RowDefinitions>
<TextBox x:Name="txtStringsFilter"
Grid.Row="0"
FontSize="12"
Padding="6,4,6,4"
Margin="0,0,0,4"
Controls:TextBoxHelper.Watermark="Filter strings (case-insensitive)..."/>
<DataGrid x:Name="gridStrings"
Grid.Row="1"
Style="{StaticResource ViewDataGrid}">
<DataGrid.ColumnHeaderStyle>
<Style TargetType="DataGridColumnHeader" BasedOn="{StaticResource MahApps.Styles.DataGridColumnHeader}">
<Setter Property="Padding" Value="6,0,6,0"/>
<Setter Property="HorizontalContentAlignment" Value="Left"/>
</Style>
</DataGrid.ColumnHeaderStyle>
<DataGrid.CellStyle>
<Style TargetType="DataGridCell" BasedOn="{StaticResource MahApps.Styles.DataGridCell}">
<Setter Property="Padding" Value="6,0,6,0"/>
</Style>
</DataGrid.CellStyle>
<DataGrid.Columns>
<DataGridTextColumn Header="Category" Width="160" Binding="{Binding Category}"/>
<DataGridTextColumn Header="Value" Width="*" Binding="{Binding Value}"/>
</DataGrid.Columns>
</DataGrid>
</Grid>
</Grid>
<!-- Drop-zone overlay. Collapsed at rest; shown during drag-over. -->
<Border x:Name="dropOverlay"
Visibility="Collapsed"
IsHitTestVisible="False"
Background="{DynamicResource MahApps.Brushes.Accent}"
Opacity="0.85"
BorderBrush="{DynamicResource MahApps.Brushes.ThemeForeground}"
BorderThickness="2"
Margin="8,8,8,0">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<TextBlock Text="Drop installer to analyze"
FontSize="20" FontWeight="Bold"
HorizontalAlignment="Center"
Foreground="White"/>
<TextBlock Text="EXE, MSI, MSIX / MSIX Bundle, .intunewin, .nupkg, PSADT zip, Squirrel Setup.exe"
FontSize="11"
HorizontalAlignment="Center"
Margin="0,8,0,0"
Foreground="White"/>
</StackPanel>
</Border>
<!-- Progress overlay. Shown while Invoke-AnalysisPipeline is
running so the user sees the shell is working through the
binary-strings scan / 7-Zip payload listing for large
installers. Indeterminate spinner; per-step status below. -->
<Border x:Name="progressOverlay"
Visibility="Collapsed"
IsHitTestVisible="False"
Background="{DynamicResource MahApps.Brushes.ThemeBackground}"
Opacity="0.92"
Margin="8,8,8,0">
<StackPanel VerticalAlignment="Center" HorizontalAlignment="Center">
<Controls:ProgressRing IsActive="True" Width="56" Height="56"
Foreground="{DynamicResource MahApps.Brushes.Accent}"/>
<TextBlock x:Name="txtProgressTitle"
Text="Analyzing..."
FontSize="18" FontWeight="SemiBold"
HorizontalAlignment="Center"
Margin="0,14,0,0"/>
<TextBlock x:Name="txtProgressStep"
Text=""
FontSize="12"
HorizontalAlignment="Center"
Margin="0,6,0,0"
Foreground="{DynamicResource MahApps.Brushes.Gray1}"/>
</StackPanel>
</Border>
</Grid>
<GridSplitter Grid.Row="4" Height="5" HorizontalAlignment="Stretch"
Background="{DynamicResource MahApps.Brushes.Gray8}"
ResizeDirection="Rows"/>
<Border Grid.Row="5">
<DockPanel>
<TextBlock x:Name="lblLogOutput" DockPanel.Dock="Top" Text="LOG OUTPUT"
FontSize="10" FontWeight="SemiBold"
Margin="8,6,0,4"/>
<TextBox x:Name="txtLog"
IsReadOnly="True"
TextWrapping="NoWrap"
VerticalScrollBarVisibility="Auto"
HorizontalScrollBarVisibility="Auto"
FontFamily="Cascadia Code, Consolas, Courier New"
FontSize="11"
BorderThickness="0"
Margin="4,0,4,4"/>
</DockPanel>
</Border>
<Border Grid.Row="6" Padding="8,4,8,4"
Background="{DynamicResource MahApps.Brushes.Gray10}">
<TextBlock x:Name="txtStatus" Text="Ready." FontSize="11"/>
</Border>
</Grid>
</Grid>
</Controls:MetroWindow>