├── .gitignore ├── MEMAPI Debugger.sln ├── MEMAPI Debugger ├── App.config ├── Dialogs │ ├── AddHardwareBreakpointDialog.Designer.cs │ ├── AddHardwareBreakpointDialog.cs │ ├── AddHardwareBreakpointDialog.resx │ ├── HardwareBreakpointDialog.Designer.cs │ ├── HardwareBreakpointDialog.cs │ ├── HardwareBreakpointDialog.resx │ ├── MemoryRangeDialog.Designer.cs │ ├── MemoryRangeDialog.cs │ ├── MemoryRangeDialog.resx │ ├── MixedValueDialog.Designer.cs │ ├── MixedValueDialog.cs │ ├── MixedValueDialog.resx │ ├── PS4Dialog.Designer.cs │ ├── PS4Dialog.cs │ ├── PS4Dialog.resx │ ├── ProcessDialog.Designer.cs │ ├── ProcessDialog.cs │ ├── ProcessDialog.resx │ ├── SelectTargetDialog.Designer.cs │ ├── SelectTargetDialog.cs │ ├── SelectTargetDialog.resx │ ├── StringDialog.Designer.cs │ ├── StringDialog.cs │ └── StringDialog.resx ├── FodyWeavers.xml ├── Forms │ ├── BreakpointsForm.Designer.cs │ ├── BreakpointsForm.cs │ ├── BreakpointsForm.resx │ ├── ConsoleForm.Designer.cs │ ├── ConsoleForm.cs │ ├── ConsoleForm.resx │ ├── DisassemblyForm.Designer.cs │ ├── DisassemblyForm.cs │ ├── DisassemblyForm.resx │ ├── KernelForm.Designer.cs │ ├── KernelForm.cs │ ├── KernelForm.resx │ ├── MainForm.Designer.cs │ ├── MainForm.cs │ ├── MainForm.resx │ ├── MemoryForm.Designer.cs │ ├── MemoryForm.cs │ ├── MemoryForm.resx │ ├── RegistersForm.Designer.cs │ ├── RegistersForm.cs │ ├── RegistersForm.resx │ ├── SearchForm.Designer.cs │ ├── SearchForm.cs │ └── SearchForm.resx ├── Helper.cs ├── MEMAPI Debugger.csproj ├── PS4.cs ├── Program.cs ├── Properties │ ├── AssemblyInfo.cs │ ├── Resources.Designer.cs │ ├── Resources.resx │ ├── Settings.Designer.cs │ └── Settings.settings ├── Resource.cs ├── Resources │ ├── DejaVuSansMono.ttf │ ├── icons │ │ ├── attach.png │ │ ├── attach_eboot.png │ │ ├── blue_cog.png │ │ ├── breakpoint.png │ │ ├── breakpoint_pointer.png │ │ ├── close_document.png │ │ ├── connect.png │ │ ├── connected.png │ │ ├── detach.png │ │ ├── disconnect.png │ │ ├── disconnected.png │ │ ├── document.png │ │ ├── document_info.png │ │ ├── exit.png │ │ ├── folder_open.png │ │ ├── gear.png │ │ ├── gears.png │ │ ├── loading.png │ │ ├── lock.png │ │ ├── logo.ico │ │ ├── logo.png │ │ ├── new_document.png │ │ ├── notify.png │ │ ├── patreon_icon.png │ │ ├── pause.png │ │ ├── play.png │ │ ├── pointer.png │ │ ├── ps4.png │ │ ├── refresh.png │ │ ├── right_arrow_stop.png │ │ ├── save.png │ │ ├── save_as.png │ │ ├── send.png │ │ ├── step.png │ │ ├── stop.png │ │ ├── terminal.png │ │ ├── timer_off.png │ │ ├── timer_on.png │ │ ├── transparent.png │ │ ├── unlock.png │ │ ├── window.png │ │ ├── window_breakpoints.png │ │ ├── window_disassembly.png │ │ ├── window_kernels.png │ │ ├── window_memory.png │ │ ├── window_registers.png │ │ └── window_search.png │ └── memapi-server.bin ├── logo.ico └── packages.config └── README.md /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.rsuser 8 | *.suo 9 | *.user 10 | *.userosscache 11 | *.sln.docstates 12 | 13 | # User-specific files (MonoDevelop/Xamarin Studio) 14 | *.userprefs 15 | 16 | # Build results 17 | [Dd]ebug/ 18 | [Dd]ebugPublic/ 19 | [Rr]elease/ 20 | [Rr]eleases/ 21 | x64/ 22 | x86/ 23 | bld/ 24 | [Bb]in/ 25 | [Oo]bj/ 26 | [Ll]og/ 27 | 28 | # Visual Studio 2015/2017 cache/options directory 29 | .vs/ 30 | # Uncomment if you have tasks that create the project's static files in wwwroot 31 | #wwwroot/ 32 | 33 | # Visual Studio 2017 auto generated files 34 | Generated\ Files/ 35 | 36 | # MSTest test Results 37 | [Tt]est[Rr]esult*/ 38 | [Bb]uild[Ll]og.* 39 | 40 | # NUNIT 41 | *.VisualState.xml 42 | TestResult.xml 43 | 44 | # Build Results of an ATL Project 45 | [Dd]ebugPS/ 46 | [Rr]eleasePS/ 47 | dlldata.c 48 | 49 | # Benchmark Results 50 | BenchmarkDotNet.Artifacts/ 51 | 52 | # .NET Core 53 | project.lock.json 54 | project.fragment.lock.json 55 | artifacts/ 56 | 57 | # StyleCop 58 | StyleCopReport.xml 59 | 60 | # Files built by Visual Studio 61 | *_i.c 62 | *_p.c 63 | *_h.h 64 | *.ilk 65 | *.meta 66 | *.obj 67 | *.iobj 68 | *.pch 69 | *.pdb 70 | *.ipdb 71 | *.pgc 72 | *.pgd 73 | *.rsp 74 | *.sbr 75 | *.tlb 76 | *.tli 77 | *.tlh 78 | *.tmp 79 | *.tmp_proj 80 | *_wpftmp.csproj 81 | *.log 82 | *.vspscc 83 | *.vssscc 84 | .builds 85 | *.pidb 86 | *.svclog 87 | *.scc 88 | 89 | # Chutzpah Test files 90 | _Chutzpah* 91 | 92 | # Visual C++ cache files 93 | ipch/ 94 | *.aps 95 | *.ncb 96 | *.opendb 97 | *.opensdf 98 | *.sdf 99 | *.cachefile 100 | *.VC.db 101 | *.VC.VC.opendb 102 | 103 | # Visual Studio profiler 104 | *.psess 105 | *.vsp 106 | *.vspx 107 | *.sap 108 | 109 | # Visual Studio Trace Files 110 | *.e2e 111 | 112 | # TFS 2012 Local Workspace 113 | $tf/ 114 | 115 | # Guidance Automation Toolkit 116 | *.gpState 117 | 118 | # ReSharper is a .NET coding add-in 119 | _ReSharper*/ 120 | *.[Rr]e[Ss]harper 121 | *.DotSettings.user 122 | 123 | # JustCode is a .NET coding add-in 124 | .JustCode 125 | 126 | # TeamCity is a build add-in 127 | _TeamCity* 128 | 129 | # DotCover is a Code Coverage Tool 130 | *.dotCover 131 | 132 | # AxoCover is a Code Coverage Tool 133 | .axoCover/* 134 | !.axoCover/settings.json 135 | 136 | # Visual Studio code coverage results 137 | *.coverage 138 | *.coveragexml 139 | 140 | # NCrunch 141 | _NCrunch_* 142 | .*crunch*.local.xml 143 | nCrunchTemp_* 144 | 145 | # MightyMoose 146 | *.mm.* 147 | AutoTest.Net/ 148 | 149 | # Web workbench (sass) 150 | .sass-cache/ 151 | 152 | # Installshield output folder 153 | [Ee]xpress/ 154 | 155 | # DocProject is a documentation generator add-in 156 | DocProject/buildhelp/ 157 | DocProject/Help/*.HxT 158 | DocProject/Help/*.HxC 159 | DocProject/Help/*.hhc 160 | DocProject/Help/*.hhk 161 | DocProject/Help/*.hhp 162 | DocProject/Help/Html2 163 | DocProject/Help/html 164 | 165 | # Click-Once directory 166 | publish/ 167 | 168 | # Publish Web Output 169 | *.[Pp]ublish.xml 170 | *.azurePubxml 171 | # Note: Comment the next line if you want to checkin your web deploy settings, 172 | # but database connection strings (with potential passwords) will be unencrypted 173 | *.pubxml 174 | *.publishproj 175 | 176 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 177 | # checkin your Azure Web App publish settings, but sensitive information contained 178 | # in these scripts will be unencrypted 179 | PublishScripts/ 180 | 181 | # NuGet Packages 182 | *.nupkg 183 | # The packages folder can be ignored because of Package Restore 184 | **/[Pp]ackages/* 185 | # except build/, which is used as an MSBuild target. 186 | !**/[Pp]ackages/build/ 187 | # Uncomment if necessary however generally it will be regenerated when needed 188 | #!**/[Pp]ackages/repositories.config 189 | # NuGet v3's project.json files produces more ignorable files 190 | *.nuget.props 191 | *.nuget.targets 192 | 193 | # Microsoft Azure Build Output 194 | csx/ 195 | *.build.csdef 196 | 197 | # Microsoft Azure Emulator 198 | ecf/ 199 | rcf/ 200 | 201 | # Windows Store app package directories and files 202 | AppPackages/ 203 | BundleArtifacts/ 204 | Package.StoreAssociation.xml 205 | _pkginfo.txt 206 | *.appx 207 | 208 | # Visual Studio cache files 209 | # files ending in .cache can be ignored 210 | *.[Cc]ache 211 | # but keep track of directories ending in .cache 212 | !*.[Cc]ache/ 213 | 214 | # Others 215 | ClientBin/ 216 | ~$* 217 | *~ 218 | *.dbmdl 219 | *.dbproj.schemaview 220 | *.jfm 221 | *.pfx 222 | *.publishsettings 223 | orleans.codegen.cs 224 | 225 | # Including strong name files can present a security risk 226 | # (https://github.com/github/gitignore/pull/2483#issue-259490424) 227 | #*.snk 228 | 229 | # Since there are multiple workflows, uncomment next line to ignore bower_components 230 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 231 | #bower_components/ 232 | 233 | # RIA/Silverlight projects 234 | Generated_Code/ 235 | 236 | # Backup & report files from converting an old project file 237 | # to a newer Visual Studio version. Backup files are not needed, 238 | # because we have git ;-) 239 | _UpgradeReport_Files/ 240 | Backup*/ 241 | UpgradeLog*.XML 242 | UpgradeLog*.htm 243 | ServiceFabricBackup/ 244 | *.rptproj.bak 245 | 246 | # SQL Server files 247 | *.mdf 248 | *.ldf 249 | *.ndf 250 | 251 | # Business Intelligence projects 252 | *.rdl.data 253 | *.bim.layout 254 | *.bim_*.settings 255 | *.rptproj.rsuser 256 | 257 | # Microsoft Fakes 258 | FakesAssemblies/ 259 | 260 | # GhostDoc plugin setting file 261 | *.GhostDoc.xml 262 | 263 | # Node.js Tools for Visual Studio 264 | .ntvs_analysis.dat 265 | node_modules/ 266 | 267 | # Visual Studio 6 build log 268 | *.plg 269 | 270 | # Visual Studio 6 workspace options file 271 | *.opt 272 | 273 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 274 | *.vbw 275 | 276 | # Visual Studio LightSwitch build output 277 | **/*.HTMLClient/GeneratedArtifacts 278 | **/*.DesktopClient/GeneratedArtifacts 279 | **/*.DesktopClient/ModelManifest.xml 280 | **/*.Server/GeneratedArtifacts 281 | **/*.Server/ModelManifest.xml 282 | _Pvt_Extensions 283 | 284 | # Paket dependency manager 285 | .paket/paket.exe 286 | paket-files/ 287 | 288 | # FAKE - F# Make 289 | .fake/ 290 | 291 | # JetBrains Rider 292 | .idea/ 293 | *.sln.iml 294 | 295 | # CodeRush personal settings 296 | .cr/personal 297 | 298 | # Python Tools for Visual Studio (PTVS) 299 | __pycache__/ 300 | *.pyc 301 | 302 | # Cake - Uncomment if you are using it 303 | # tools/** 304 | # !tools/packages.config 305 | 306 | # Tabs Studio 307 | *.tss 308 | 309 | # Telerik's JustMock configuration file 310 | *.jmconfig 311 | 312 | # BizTalk build output 313 | *.btp.cs 314 | *.btm.cs 315 | *.odx.cs 316 | *.xsd.cs 317 | 318 | # OpenCover UI analysis results 319 | OpenCover/ 320 | 321 | # Azure Stream Analytics local run output 322 | ASALocalRun/ 323 | 324 | # MSBuild Binary and Structured Log 325 | *.binlog 326 | 327 | # NVidia Nsight GPU debugger configuration file 328 | *.nvuser 329 | 330 | # MFractors (Xamarin productivity tool) working folder 331 | .mfractor/ 332 | 333 | # Local History for Visual Studio 334 | .localhistory/ -------------------------------------------------------------------------------- /MEMAPI Debugger.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27703.2042 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "MEMAPI Debugger", "MEMAPI Debugger\MEMAPI Debugger.csproj", "{D0A07807-E46F-4699-92C2-C71C007E4A52}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {D0A07807-E46F-4699-92C2-C71C007E4A52}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {D0A07807-E46F-4699-92C2-C71C007E4A52}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {D0A07807-E46F-4699-92C2-C71C007E4A52}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {D0A07807-E46F-4699-92C2-C71C007E4A52}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {8DDD5329-2061-4194-8847-8E6DA94F3AB7} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /MEMAPI Debugger/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 |
6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/AddHardwareBreakpointDialog.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Dialogs 2 | { 3 | partial class AddHardwareBreakpointDialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.radioButtonExecute = new System.Windows.Forms.RadioButton(); 32 | this.radioButtonReadWrite = new System.Windows.Forms.RadioButton(); 33 | this.radioButtonWrite = new System.Windows.Forms.RadioButton(); 34 | this.textBoxAddress = new System.Windows.Forms.TextBox(); 35 | this.comboBoxLength = new System.Windows.Forms.ComboBox(); 36 | this.labelAddress = new System.Windows.Forms.Label(); 37 | this.labelLength = new System.Windows.Forms.Label(); 38 | this.buttonCancel = new System.Windows.Forms.Button(); 39 | this.buttonAdd = new System.Windows.Forms.Button(); 40 | this.SuspendLayout(); 41 | // 42 | // radioButtonExecute 43 | // 44 | this.radioButtonExecute.AutoSize = true; 45 | this.radioButtonExecute.Location = new System.Drawing.Point(66, 65); 46 | this.radioButtonExecute.Name = "radioButtonExecute"; 47 | this.radioButtonExecute.Size = new System.Drawing.Size(64, 17); 48 | this.radioButtonExecute.TabIndex = 2; 49 | this.radioButtonExecute.TabStop = true; 50 | this.radioButtonExecute.Text = "Execute"; 51 | this.radioButtonExecute.UseVisualStyleBackColor = true; 52 | // 53 | // radioButtonReadWrite 54 | // 55 | this.radioButtonReadWrite.AutoSize = true; 56 | this.radioButtonReadWrite.Checked = true; 57 | this.radioButtonReadWrite.Location = new System.Drawing.Point(139, 65); 58 | this.radioButtonReadWrite.Name = "radioButtonReadWrite"; 59 | this.radioButtonReadWrite.Size = new System.Drawing.Size(87, 17); 60 | this.radioButtonReadWrite.TabIndex = 3; 61 | this.radioButtonReadWrite.TabStop = true; 62 | this.radioButtonReadWrite.Text = "Read / Write"; 63 | this.radioButtonReadWrite.UseVisualStyleBackColor = true; 64 | // 65 | // radioButtonWrite 66 | // 67 | this.radioButtonWrite.AutoSize = true; 68 | this.radioButtonWrite.Location = new System.Drawing.Point(237, 65); 69 | this.radioButtonWrite.Name = "radioButtonWrite"; 70 | this.radioButtonWrite.Size = new System.Drawing.Size(50, 17); 71 | this.radioButtonWrite.TabIndex = 4; 72 | this.radioButtonWrite.TabStop = true; 73 | this.radioButtonWrite.Text = "Write"; 74 | this.radioButtonWrite.UseVisualStyleBackColor = true; 75 | // 76 | // textBoxAddress 77 | // 78 | this.textBoxAddress.Location = new System.Drawing.Point(66, 12); 79 | this.textBoxAddress.Name = "textBoxAddress"; 80 | this.textBoxAddress.Size = new System.Drawing.Size(223, 20); 81 | this.textBoxAddress.TabIndex = 0; 82 | // 83 | // comboBoxLength 84 | // 85 | this.comboBoxLength.FormattingEnabled = true; 86 | this.comboBoxLength.Items.AddRange(new object[] { 87 | "1 Byte", 88 | "2 Bytes", 89 | "4 Bytes", 90 | "8 Bytes"}); 91 | this.comboBoxLength.Location = new System.Drawing.Point(66, 38); 92 | this.comboBoxLength.Name = "comboBoxLength"; 93 | this.comboBoxLength.Size = new System.Drawing.Size(221, 21); 94 | this.comboBoxLength.TabIndex = 1; 95 | // 96 | // labelAddress 97 | // 98 | this.labelAddress.AutoSize = true; 99 | this.labelAddress.Location = new System.Drawing.Point(12, 15); 100 | this.labelAddress.Name = "labelAddress"; 101 | this.labelAddress.Size = new System.Drawing.Size(48, 13); 102 | this.labelAddress.TabIndex = 5; 103 | this.labelAddress.Text = "Address:"; 104 | // 105 | // labelLength 106 | // 107 | this.labelLength.AutoSize = true; 108 | this.labelLength.Location = new System.Drawing.Point(17, 41); 109 | this.labelLength.Name = "labelLength"; 110 | this.labelLength.Size = new System.Drawing.Size(43, 13); 111 | this.labelLength.TabIndex = 6; 112 | this.labelLength.Text = "Length:"; 113 | // 114 | // buttonCancel 115 | // 116 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 117 | this.buttonCancel.Location = new System.Drawing.Point(214, 88); 118 | this.buttonCancel.Name = "buttonCancel"; 119 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 120 | this.buttonCancel.TabIndex = 6; 121 | this.buttonCancel.Text = "Cancel"; 122 | this.buttonCancel.UseVisualStyleBackColor = true; 123 | // 124 | // buttonAdd 125 | // 126 | this.buttonAdd.Location = new System.Drawing.Point(66, 88); 127 | this.buttonAdd.Name = "buttonAdd"; 128 | this.buttonAdd.Size = new System.Drawing.Size(75, 23); 129 | this.buttonAdd.TabIndex = 5; 130 | this.buttonAdd.Text = "Add"; 131 | this.buttonAdd.UseVisualStyleBackColor = true; 132 | this.buttonAdd.Click += new System.EventHandler(this.buttonAdd_Click); 133 | // 134 | // AddHardwareBreakpointDialog 135 | // 136 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 137 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 138 | this.ClientSize = new System.Drawing.Size(302, 119); 139 | this.Controls.Add(this.buttonCancel); 140 | this.Controls.Add(this.buttonAdd); 141 | this.Controls.Add(this.labelLength); 142 | this.Controls.Add(this.labelAddress); 143 | this.Controls.Add(this.comboBoxLength); 144 | this.Controls.Add(this.textBoxAddress); 145 | this.Controls.Add(this.radioButtonWrite); 146 | this.Controls.Add(this.radioButtonReadWrite); 147 | this.Controls.Add(this.radioButtonExecute); 148 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 149 | this.MaximizeBox = false; 150 | this.MinimizeBox = false; 151 | this.Name = "AddHardwareBreakpointDialog"; 152 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 153 | this.Text = "Add Hardware Breakpoint"; 154 | this.ResumeLayout(false); 155 | this.PerformLayout(); 156 | 157 | } 158 | 159 | #endregion 160 | 161 | private System.Windows.Forms.RadioButton radioButtonExecute; 162 | private System.Windows.Forms.RadioButton radioButtonReadWrite; 163 | private System.Windows.Forms.RadioButton radioButtonWrite; 164 | private System.Windows.Forms.TextBox textBoxAddress; 165 | private System.Windows.Forms.ComboBox comboBoxLength; 166 | private System.Windows.Forms.Label labelAddress; 167 | private System.Windows.Forms.Label labelLength; 168 | private System.Windows.Forms.Button buttonCancel; 169 | private System.Windows.Forms.Button buttonAdd; 170 | } 171 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/AddHardwareBreakpointDialog.cs: -------------------------------------------------------------------------------- 1 | using MEMAPI; 2 | using System; 3 | using System.Windows.Forms; 4 | 5 | namespace MEMAPI_Debugger.Dialogs 6 | { 7 | public partial class AddHardwareBreakpointDialog : Form 8 | { 9 | public HardwareBreakpoint breakpoint { get; set; } 10 | 11 | public AddHardwareBreakpointDialog() 12 | { 13 | InitializeComponent(); 14 | breakpoint = new HardwareBreakpoint(); 15 | } 16 | 17 | private void buttonAdd_Click(object sender, EventArgs e) 18 | { 19 | ulong address = 0; 20 | try 21 | { 22 | address = Convert.ToUInt64(textBoxAddress.Text, 16); 23 | } 24 | catch 25 | { 26 | showError("Address is in an invalid format."); 27 | return; 28 | } 29 | 30 | if (comboBoxLength.SelectedIndex == -1) 31 | { 32 | showError("Invalid length selected."); 33 | return; 34 | } 35 | 36 | breakpoint.Address = address; 37 | 38 | if (radioButtonExecute.Checked) 39 | breakpoint.Type = HardwareBreakpoint.Flags.EXECUTE; 40 | else if (radioButtonReadWrite.Checked) 41 | breakpoint.Type = HardwareBreakpoint.Flags.READ_WRITE; 42 | else if (radioButtonWrite.Checked) 43 | breakpoint.Type = HardwareBreakpoint.Flags.WRITE; 44 | 45 | switch (comboBoxLength.SelectedIndex) 46 | { 47 | case 0: 48 | breakpoint.ByteLength = HardwareBreakpoint.Length.ONE; 49 | break; 50 | case 1: 51 | breakpoint.ByteLength = HardwareBreakpoint.Length.TWO; 52 | break; 53 | case 2: 54 | breakpoint.ByteLength = HardwareBreakpoint.Length.FOUR; 55 | break; 56 | case 3: 57 | breakpoint.ByteLength = HardwareBreakpoint.Length.EIGHT; 58 | break; 59 | } 60 | 61 | // Close dialog 62 | DialogResult = DialogResult.OK; 63 | Close(); 64 | } 65 | 66 | private void showError(string msg) 67 | { 68 | MessageBox.Show(msg, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 69 | } 70 | } 71 | } 72 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/AddHardwareBreakpointDialog.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/HardwareBreakpointDialog.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Dialogs 2 | { 3 | partial class HardwareBreakpointDialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | this.listViewBreakpoints = new System.Windows.Forms.ListView(); 33 | this.columnHeaderIndex = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 34 | this.columnHeaderAddress = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 35 | this.columnHeaderLength = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 36 | this.columnHeaderType = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 37 | this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 38 | this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 39 | this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 40 | this.seperator = new System.Windows.Forms.Label(); 41 | this.buttonCancel = new System.Windows.Forms.Button(); 42 | this.buttonOk = new System.Windows.Forms.Button(); 43 | this.contextMenuStrip.SuspendLayout(); 44 | this.SuspendLayout(); 45 | // 46 | // listViewBreakpoints 47 | // 48 | this.listViewBreakpoints.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 49 | this.columnHeaderIndex, 50 | this.columnHeaderAddress, 51 | this.columnHeaderLength, 52 | this.columnHeaderType}); 53 | this.listViewBreakpoints.ContextMenuStrip = this.contextMenuStrip; 54 | this.listViewBreakpoints.FullRowSelect = true; 55 | this.listViewBreakpoints.Location = new System.Drawing.Point(12, 12); 56 | this.listViewBreakpoints.MultiSelect = false; 57 | this.listViewBreakpoints.Name = "listViewBreakpoints"; 58 | this.listViewBreakpoints.Size = new System.Drawing.Size(400, 194); 59 | this.listViewBreakpoints.TabIndex = 0; 60 | this.listViewBreakpoints.UseCompatibleStateImageBehavior = false; 61 | this.listViewBreakpoints.View = System.Windows.Forms.View.Details; 62 | // 63 | // columnHeaderIndex 64 | // 65 | this.columnHeaderIndex.Text = "Index"; 66 | this.columnHeaderIndex.Width = 0; 67 | // 68 | // columnHeaderAddress 69 | // 70 | this.columnHeaderAddress.Text = "Address"; 71 | this.columnHeaderAddress.Width = 200; 72 | // 73 | // columnHeaderLength 74 | // 75 | this.columnHeaderLength.Text = "Length"; 76 | this.columnHeaderLength.Width = 90; 77 | // 78 | // columnHeaderType 79 | // 80 | this.columnHeaderType.Text = "Type"; 81 | this.columnHeaderType.Width = 105; 82 | // 83 | // contextMenuStrip 84 | // 85 | this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 86 | this.addToolStripMenuItem, 87 | this.removeToolStripMenuItem}); 88 | this.contextMenuStrip.Name = "contextMenuStrip"; 89 | this.contextMenuStrip.Size = new System.Drawing.Size(118, 48); 90 | this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip_Opening); 91 | // 92 | // addToolStripMenuItem 93 | // 94 | this.addToolStripMenuItem.Name = "addToolStripMenuItem"; 95 | this.addToolStripMenuItem.Size = new System.Drawing.Size(117, 22); 96 | this.addToolStripMenuItem.Text = "Add"; 97 | this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click); 98 | // 99 | // removeToolStripMenuItem 100 | // 101 | this.removeToolStripMenuItem.Enabled = false; 102 | this.removeToolStripMenuItem.Name = "removeToolStripMenuItem"; 103 | this.removeToolStripMenuItem.Size = new System.Drawing.Size(117, 22); 104 | this.removeToolStripMenuItem.Text = "Remove"; 105 | this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click); 106 | // 107 | // seperator 108 | // 109 | this.seperator.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 110 | this.seperator.Location = new System.Drawing.Point(12, 214); 111 | this.seperator.Name = "seperator"; 112 | this.seperator.Size = new System.Drawing.Size(400, 2); 113 | this.seperator.TabIndex = 7; 114 | // 115 | // buttonCancel 116 | // 117 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 118 | this.buttonCancel.Location = new System.Drawing.Point(216, 219); 119 | this.buttonCancel.Name = "buttonCancel"; 120 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 121 | this.buttonCancel.TabIndex = 2; 122 | this.buttonCancel.Text = "Cancel"; 123 | this.buttonCancel.UseVisualStyleBackColor = true; 124 | // 125 | // buttonOk 126 | // 127 | this.buttonOk.Location = new System.Drawing.Point(135, 219); 128 | this.buttonOk.Name = "buttonOk"; 129 | this.buttonOk.Size = new System.Drawing.Size(75, 23); 130 | this.buttonOk.TabIndex = 1; 131 | this.buttonOk.Text = "OK"; 132 | this.buttonOk.UseVisualStyleBackColor = true; 133 | this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click); 134 | // 135 | // HardwareBreakpointDialog 136 | // 137 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 138 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 139 | this.ClientSize = new System.Drawing.Size(425, 250); 140 | this.Controls.Add(this.buttonCancel); 141 | this.Controls.Add(this.buttonOk); 142 | this.Controls.Add(this.seperator); 143 | this.Controls.Add(this.listViewBreakpoints); 144 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 145 | this.MaximizeBox = false; 146 | this.MinimizeBox = false; 147 | this.Name = "HardwareBreakpointDialog"; 148 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 149 | this.Text = "Hardware Breakpoints"; 150 | this.contextMenuStrip.ResumeLayout(false); 151 | this.ResumeLayout(false); 152 | 153 | } 154 | 155 | #endregion 156 | 157 | private System.Windows.Forms.ListView listViewBreakpoints; 158 | private System.Windows.Forms.ColumnHeader columnHeaderAddress; 159 | private System.Windows.Forms.ColumnHeader columnHeaderType; 160 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip; 161 | private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem; 162 | private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem; 163 | private System.Windows.Forms.Label seperator; 164 | private System.Windows.Forms.Button buttonCancel; 165 | private System.Windows.Forms.Button buttonOk; 166 | private System.Windows.Forms.ColumnHeader columnHeaderLength; 167 | private System.Windows.Forms.ColumnHeader columnHeaderIndex; 168 | } 169 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/HardwareBreakpointDialog.cs: -------------------------------------------------------------------------------- 1 | using MEMAPI; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Data; 6 | using System.Drawing; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace MEMAPI_Debugger.Dialogs 13 | { 14 | public partial class HardwareBreakpointDialog : Form 15 | { 16 | public List breakpoints{ get; set; } 17 | 18 | public HardwareBreakpointDialog() 19 | { 20 | InitializeComponent(); 21 | breakpoints = new List(); 22 | } 23 | 24 | public void updateList() 25 | { 26 | refresh(); 27 | } 28 | 29 | private void refresh() 30 | { 31 | listViewBreakpoints.Items.Clear(); 32 | for (int i = 0; i < breakpoints.Count; i++) 33 | listViewBreakpoints.Items.Add(new ListViewItem(breakpoints[i].toArray())); 34 | } 35 | 36 | private void contextMenuStrip_Opening(object sender, CancelEventArgs e) 37 | { 38 | addToolStripMenuItem.Enabled = listViewBreakpoints.Items.Count < 4; 39 | removeToolStripMenuItem.Enabled = listViewBreakpoints.SelectedItems.Count > 0; 40 | } 41 | 42 | private void addToolStripMenuItem_Click(object sender, EventArgs e) 43 | { 44 | if (breakpoints.Count >= 4) 45 | { 46 | MessageBox.Show("You can only have a maximum of 4 hardware breakpoints set.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 47 | return; 48 | } 49 | 50 | AddHardwareBreakpointDialog dialog = new AddHardwareBreakpointDialog(); 51 | if (dialog.ShowDialog() == DialogResult.OK) 52 | { 53 | dialog.breakpoint.Index = breakpoints.Count; 54 | breakpoints.Add(dialog.breakpoint); 55 | refresh(); 56 | } 57 | } 58 | 59 | private void removeToolStripMenuItem_Click(object sender, EventArgs e) 60 | { 61 | if (listViewBreakpoints.SelectedItems.Count == 0) 62 | return; 63 | 64 | breakpoints.RemoveAt(Convert.ToInt32(listViewBreakpoints.SelectedItems[0].SubItems[0].Text)); 65 | 66 | refresh(); 67 | } 68 | 69 | private void buttonOk_Click(object sender, EventArgs e) 70 | { 71 | // Close dialog 72 | DialogResult = DialogResult.OK; 73 | Close(); 74 | } 75 | } 76 | } 77 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/HardwareBreakpointDialog.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/MemoryRangeDialog.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Dialogs 2 | { 3 | partial class MemoryRangeDialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.textBoxFrom = new System.Windows.Forms.TextBox(); 32 | this.textBoxTo = new System.Windows.Forms.TextBox(); 33 | this.labelTo = new System.Windows.Forms.Label(); 34 | this.buttonCancel = new System.Windows.Forms.Button(); 35 | this.buttonOk = new System.Windows.Forms.Button(); 36 | this.SuspendLayout(); 37 | // 38 | // textBoxFrom 39 | // 40 | this.textBoxFrom.Location = new System.Drawing.Point(12, 12); 41 | this.textBoxFrom.Name = "textBoxFrom"; 42 | this.textBoxFrom.Size = new System.Drawing.Size(255, 20); 43 | this.textBoxFrom.TabIndex = 0; 44 | this.textBoxFrom.Text = "0x0000000000000000"; 45 | // 46 | // textBoxTo 47 | // 48 | this.textBoxTo.Location = new System.Drawing.Point(12, 51); 49 | this.textBoxTo.Name = "textBoxTo"; 50 | this.textBoxTo.Size = new System.Drawing.Size(255, 20); 51 | this.textBoxTo.TabIndex = 1; 52 | this.textBoxTo.Text = "0x0000000000000000"; 53 | // 54 | // labelTo 55 | // 56 | this.labelTo.AutoSize = true; 57 | this.labelTo.Location = new System.Drawing.Point(120, 35); 58 | this.labelTo.Name = "labelTo"; 59 | this.labelTo.Size = new System.Drawing.Size(20, 13); 60 | this.labelTo.TabIndex = 3; 61 | this.labelTo.Text = "To"; 62 | // 63 | // buttonCancel 64 | // 65 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 66 | this.buttonCancel.Location = new System.Drawing.Point(142, 78); 67 | this.buttonCancel.Name = "buttonCancel"; 68 | this.buttonCancel.Size = new System.Drawing.Size(125, 23); 69 | this.buttonCancel.TabIndex = 3; 70 | this.buttonCancel.Text = "Cancel"; 71 | this.buttonCancel.UseVisualStyleBackColor = true; 72 | // 73 | // buttonOk 74 | // 75 | this.buttonOk.Location = new System.Drawing.Point(12, 78); 76 | this.buttonOk.Name = "buttonOk"; 77 | this.buttonOk.Size = new System.Drawing.Size(125, 23); 78 | this.buttonOk.TabIndex = 2; 79 | this.buttonOk.Text = "OK"; 80 | this.buttonOk.UseVisualStyleBackColor = true; 81 | this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click); 82 | // 83 | // MemoryRangeDialog 84 | // 85 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 86 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 87 | this.ClientSize = new System.Drawing.Size(279, 110); 88 | this.Controls.Add(this.buttonCancel); 89 | this.Controls.Add(this.buttonOk); 90 | this.Controls.Add(this.labelTo); 91 | this.Controls.Add(this.textBoxTo); 92 | this.Controls.Add(this.textBoxFrom); 93 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 94 | this.MaximizeBox = false; 95 | this.MinimizeBox = false; 96 | this.Name = "MemoryRangeDialog"; 97 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 98 | this.Text = "Memory Range"; 99 | this.ResumeLayout(false); 100 | this.PerformLayout(); 101 | 102 | } 103 | 104 | #endregion 105 | 106 | private System.Windows.Forms.TextBox textBoxFrom; 107 | private System.Windows.Forms.TextBox textBoxTo; 108 | private System.Windows.Forms.Label labelTo; 109 | private System.Windows.Forms.Button buttonCancel; 110 | private System.Windows.Forms.Button buttonOk; 111 | } 112 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/MemoryRangeDialog.cs: -------------------------------------------------------------------------------- 1 | using MEMAPI; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.ComponentModel; 5 | using System.Data; 6 | using System.Drawing; 7 | using System.Linq; 8 | using System.Text; 9 | using System.Threading.Tasks; 10 | using System.Windows.Forms; 11 | 12 | namespace MEMAPI_Debugger.Dialogs 13 | { 14 | public partial class MemoryRangeDialog : Form 15 | { 16 | public MemoryRange Range { get; set; } 17 | 18 | public MemoryRangeDialog() 19 | { 20 | InitializeComponent(); 21 | Range = new MemoryRange(); 22 | } 23 | 24 | public void updateFields() 25 | { 26 | textBoxFrom.Text = "0x" + Helper.ulongToString(Range.Start, false); 27 | textBoxTo.Text = "0x" + Helper.ulongToString(Range.End, false); 28 | } 29 | 30 | private void buttonOk_Click(object sender, EventArgs e) 31 | { 32 | MemoryRange tempRange = new MemoryRange(); 33 | try 34 | { 35 | ulong start = Convert.ToUInt64(textBoxFrom.Text, 16); 36 | ulong end = Convert.ToUInt64(textBoxTo.Text, 16); 37 | 38 | if (start >= end) 39 | { 40 | MessageBox.Show("End address must be after the start address.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 41 | return; 42 | } 43 | 44 | tempRange = new MemoryRange(start, end); 45 | } 46 | catch 47 | { 48 | MessageBox.Show("Memory range is not valid.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 49 | return; 50 | } 51 | Range = tempRange; 52 | 53 | // Close dialog 54 | DialogResult = DialogResult.OK; 55 | Close(); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/MemoryRangeDialog.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/MixedValueDialog.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Dialogs 2 | { 3 | partial class MixedValueDialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.textBoxValue = new System.Windows.Forms.TextBox(); 32 | this.comboBoxType = new System.Windows.Forms.ComboBox(); 33 | this.buttonCancel = new System.Windows.Forms.Button(); 34 | this.buttonOk = new System.Windows.Forms.Button(); 35 | this.SuspendLayout(); 36 | // 37 | // textBoxValue 38 | // 39 | this.textBoxValue.Location = new System.Drawing.Point(12, 12); 40 | this.textBoxValue.Name = "textBoxValue"; 41 | this.textBoxValue.Size = new System.Drawing.Size(255, 20); 42 | this.textBoxValue.TabIndex = 0; 43 | // 44 | // comboBoxType 45 | // 46 | this.comboBoxType.FormattingEnabled = true; 47 | this.comboBoxType.Items.AddRange(new object[] { 48 | "Bytes", 49 | "Integer", 50 | "Short", 51 | "Long", 52 | "Float", 53 | "Double", 54 | "String", 55 | "Unsigned Integer", 56 | "Unsigned Short", 57 | "Unsigned Long"}); 58 | this.comboBoxType.Location = new System.Drawing.Point(12, 38); 59 | this.comboBoxType.Name = "comboBoxType"; 60 | this.comboBoxType.Size = new System.Drawing.Size(255, 21); 61 | this.comboBoxType.TabIndex = 1; 62 | // 63 | // buttonCancel 64 | // 65 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 66 | this.buttonCancel.Location = new System.Drawing.Point(142, 65); 67 | this.buttonCancel.Name = "buttonCancel"; 68 | this.buttonCancel.Size = new System.Drawing.Size(125, 23); 69 | this.buttonCancel.TabIndex = 3; 70 | this.buttonCancel.Text = "Cancel"; 71 | this.buttonCancel.UseVisualStyleBackColor = true; 72 | // 73 | // buttonOk 74 | // 75 | this.buttonOk.Location = new System.Drawing.Point(12, 65); 76 | this.buttonOk.Name = "buttonOk"; 77 | this.buttonOk.Size = new System.Drawing.Size(125, 23); 78 | this.buttonOk.TabIndex = 2; 79 | this.buttonOk.Text = "OK"; 80 | this.buttonOk.UseVisualStyleBackColor = true; 81 | this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click); 82 | // 83 | // MixedValueDialog 84 | // 85 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 86 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 87 | this.ClientSize = new System.Drawing.Size(281, 100); 88 | this.Controls.Add(this.buttonCancel); 89 | this.Controls.Add(this.buttonOk); 90 | this.Controls.Add(this.comboBoxType); 91 | this.Controls.Add(this.textBoxValue); 92 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 93 | this.MaximizeBox = false; 94 | this.MinimizeBox = false; 95 | this.Name = "MixedValueDialog"; 96 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 97 | this.ResumeLayout(false); 98 | this.PerformLayout(); 99 | 100 | } 101 | 102 | #endregion 103 | 104 | private System.Windows.Forms.TextBox textBoxValue; 105 | private System.Windows.Forms.ComboBox comboBoxType; 106 | private System.Windows.Forms.Button buttonCancel; 107 | private System.Windows.Forms.Button buttonOk; 108 | } 109 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/MixedValueDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace MEMAPI_Debugger.Dialogs 12 | { 13 | public partial class MixedValueDialog : Form 14 | { 15 | public object Variable { get; set; } 16 | public Type VariableType { get; set; } 17 | 18 | public MixedValueDialog(string title) 19 | { 20 | InitializeComponent(); 21 | Text = title; 22 | } 23 | 24 | private void buttonOk_Click(object sender, EventArgs e) 25 | { 26 | if (comboBoxType.SelectedIndex == -1) 27 | { 28 | MessageBox.Show("You must select a valid variable type.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 29 | return; 30 | } 31 | try 32 | { 33 | switch (comboBoxType.SelectedIndex) 34 | { 35 | case 0: 36 | Variable = Helper.stringToByteArray(textBoxValue.Text.Replace(" ", "")); 37 | VariableType = typeof(byte[]); 38 | break; 39 | case 1: 40 | Variable = Convert.ToInt32(textBoxValue.Text); 41 | VariableType = typeof(int); 42 | break; 43 | case 2: 44 | Variable = Convert.ToInt16(textBoxValue.Text); 45 | VariableType = typeof(short); 46 | break; 47 | case 3: 48 | Variable = Convert.ToInt64(textBoxValue.Text); 49 | VariableType = typeof(long); 50 | break; 51 | case 4: 52 | Variable = Convert.ToSingle(textBoxValue.Text); 53 | VariableType = typeof(float); 54 | break; 55 | case 5: 56 | Variable = Convert.ToDouble(textBoxValue.Text); 57 | VariableType = typeof(double); 58 | break; 59 | case 6: 60 | Variable = textBoxValue.Text; 61 | VariableType = typeof(string); 62 | break; 63 | case 7: 64 | Variable = Convert.ToUInt32(textBoxValue.Text); 65 | VariableType = typeof(uint); 66 | break; 67 | case 8: 68 | Variable = Convert.ToUInt16(textBoxValue.Text); 69 | VariableType = typeof(ushort); 70 | break; 71 | case 9: 72 | Variable = Convert.ToUInt64(textBoxValue.Text); 73 | VariableType = typeof(ulong); 74 | break; 75 | } 76 | } 77 | catch 78 | { 79 | MessageBox.Show("Value is in an invalid format.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 80 | return; 81 | } 82 | 83 | // Close dialog 84 | DialogResult = DialogResult.OK; 85 | Close(); 86 | } 87 | } 88 | } 89 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/MixedValueDialog.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/PS4Dialog.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Dialogs 2 | { 3 | partial class PS4Dialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.button1 = new System.Windows.Forms.Button(); 32 | this.button2 = new System.Windows.Forms.Button(); 33 | this.textBoxName = new System.Windows.Forms.TextBox(); 34 | this.textBoxIpAddress = new System.Windows.Forms.TextBox(); 35 | this.labelName = new System.Windows.Forms.Label(); 36 | this.labelIpAddress = new System.Windows.Forms.Label(); 37 | this.SuspendLayout(); 38 | // 39 | // button1 40 | // 41 | this.button1.Location = new System.Drawing.Point(78, 64); 42 | this.button1.Name = "button1"; 43 | this.button1.Size = new System.Drawing.Size(75, 23); 44 | this.button1.TabIndex = 2; 45 | this.button1.Text = "Save"; 46 | this.button1.UseVisualStyleBackColor = true; 47 | this.button1.Click += new System.EventHandler(this.button1_Click); 48 | // 49 | // button2 50 | // 51 | this.button2.DialogResult = System.Windows.Forms.DialogResult.Cancel; 52 | this.button2.Location = new System.Drawing.Point(193, 64); 53 | this.button2.Name = "button2"; 54 | this.button2.Size = new System.Drawing.Size(75, 23); 55 | this.button2.TabIndex = 3; 56 | this.button2.Text = "Cancel"; 57 | this.button2.UseVisualStyleBackColor = true; 58 | // 59 | // textBoxName 60 | // 61 | this.textBoxName.Location = new System.Drawing.Point(78, 12); 62 | this.textBoxName.MaxLength = 32; 63 | this.textBoxName.Name = "textBoxName"; 64 | this.textBoxName.Size = new System.Drawing.Size(190, 20); 65 | this.textBoxName.TabIndex = 0; 66 | // 67 | // textBoxIpAddress 68 | // 69 | this.textBoxIpAddress.Location = new System.Drawing.Point(78, 38); 70 | this.textBoxIpAddress.MaxLength = 16; 71 | this.textBoxIpAddress.Name = "textBoxIpAddress"; 72 | this.textBoxIpAddress.Size = new System.Drawing.Size(190, 20); 73 | this.textBoxIpAddress.TabIndex = 1; 74 | // 75 | // labelName 76 | // 77 | this.labelName.AutoSize = true; 78 | this.labelName.Location = new System.Drawing.Point(31, 15); 79 | this.labelName.Name = "labelName"; 80 | this.labelName.Size = new System.Drawing.Size(41, 13); 81 | this.labelName.TabIndex = 4; 82 | this.labelName.Text = "Name: "; 83 | // 84 | // labelIpAddress 85 | // 86 | this.labelIpAddress.AutoSize = true; 87 | this.labelIpAddress.Location = new System.Drawing.Point(11, 41); 88 | this.labelIpAddress.Name = "labelIpAddress"; 89 | this.labelIpAddress.Size = new System.Drawing.Size(61, 13); 90 | this.labelIpAddress.TabIndex = 5; 91 | this.labelIpAddress.Text = "IP Address:"; 92 | // 93 | // PS4Dialog 94 | // 95 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 96 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 97 | this.ClientSize = new System.Drawing.Size(287, 97); 98 | this.Controls.Add(this.labelIpAddress); 99 | this.Controls.Add(this.labelName); 100 | this.Controls.Add(this.textBoxIpAddress); 101 | this.Controls.Add(this.textBoxName); 102 | this.Controls.Add(this.button2); 103 | this.Controls.Add(this.button1); 104 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 105 | this.MaximizeBox = false; 106 | this.MinimizeBox = false; 107 | this.Name = "PS4Dialog"; 108 | this.ShowIcon = false; 109 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 110 | this.Text = "PS4"; 111 | this.ResumeLayout(false); 112 | this.PerformLayout(); 113 | 114 | } 115 | 116 | #endregion 117 | 118 | private System.Windows.Forms.Button button1; 119 | private System.Windows.Forms.Button button2; 120 | private System.Windows.Forms.TextBox textBoxName; 121 | private System.Windows.Forms.TextBox textBoxIpAddress; 122 | private System.Windows.Forms.Label labelName; 123 | private System.Windows.Forms.Label labelIpAddress; 124 | } 125 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/PS4Dialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace MEMAPI_Debugger.Dialogs 12 | { 13 | public partial class PS4Dialog : Form 14 | { 15 | public PS4 ps4 { get; set; } 16 | 17 | public PS4Dialog() 18 | { 19 | InitializeComponent(); 20 | ps4 = new PS4(); 21 | } 22 | 23 | public void updateFields() 24 | { 25 | textBoxIpAddress.Text = ps4.IP; 26 | textBoxName.Text = ps4.Name; 27 | } 28 | 29 | private void button1_Click(object sender, EventArgs e) 30 | { 31 | if (textBoxIpAddress.Text == "" || textBoxName.Text == "") 32 | { 33 | MessageBox.Show("Name or IP Address is empty.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 34 | return; 35 | } 36 | ps4.IP = textBoxIpAddress.Text; 37 | ps4.Name = textBoxName.Text; 38 | 39 | // Close dialog 40 | DialogResult = DialogResult.OK; 41 | Close(); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/PS4Dialog.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/ProcessDialog.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Dialogs 2 | { 3 | partial class ProcessDialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | this.listViewProcesses = new System.Windows.Forms.ListView(); 33 | this.columnHeaderId = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 34 | this.columnHeaderName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 35 | this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 36 | this.refreshToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 37 | this.buttonOk = new System.Windows.Forms.Button(); 38 | this.buttonCancel = new System.Windows.Forms.Button(); 39 | this.buttonRefresh = new System.Windows.Forms.Button(); 40 | this.contextMenuStrip.SuspendLayout(); 41 | this.SuspendLayout(); 42 | // 43 | // listViewProcesses 44 | // 45 | this.listViewProcesses.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 46 | this.columnHeaderId, 47 | this.columnHeaderName}); 48 | this.listViewProcesses.ContextMenuStrip = this.contextMenuStrip; 49 | this.listViewProcesses.FullRowSelect = true; 50 | this.listViewProcesses.Location = new System.Drawing.Point(12, 12); 51 | this.listViewProcesses.MultiSelect = false; 52 | this.listViewProcesses.Name = "listViewProcesses"; 53 | this.listViewProcesses.Size = new System.Drawing.Size(410, 403); 54 | this.listViewProcesses.TabIndex = 0; 55 | this.listViewProcesses.UseCompatibleStateImageBehavior = false; 56 | this.listViewProcesses.View = System.Windows.Forms.View.Details; 57 | this.listViewProcesses.ColumnWidthChanging += new System.Windows.Forms.ColumnWidthChangingEventHandler(this.listViewProcesses_ColumnWidthChanging); 58 | this.listViewProcesses.SelectedIndexChanged += new System.EventHandler(this.listViewProcesses_SelectedIndexChanged); 59 | this.listViewProcesses.DoubleClick += new System.EventHandler(this.listViewProcesses_DoubleClick); 60 | // 61 | // columnHeaderId 62 | // 63 | this.columnHeaderId.Text = "Id"; 64 | // 65 | // columnHeaderName 66 | // 67 | this.columnHeaderName.Text = "Name"; 68 | this.columnHeaderName.Width = 305; 69 | // 70 | // contextMenuStrip 71 | // 72 | this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 73 | this.refreshToolStripMenuItem}); 74 | this.contextMenuStrip.Name = "contextMenuStrip"; 75 | this.contextMenuStrip.Size = new System.Drawing.Size(114, 26); 76 | // 77 | // refreshToolStripMenuItem 78 | // 79 | this.refreshToolStripMenuItem.Name = "refreshToolStripMenuItem"; 80 | this.refreshToolStripMenuItem.Size = new System.Drawing.Size(113, 22); 81 | this.refreshToolStripMenuItem.Text = "Refresh"; 82 | this.refreshToolStripMenuItem.Click += new System.EventHandler(this.refreshToolStripMenuItem_Click); 83 | // 84 | // buttonOk 85 | // 86 | this.buttonOk.Location = new System.Drawing.Point(12, 421); 87 | this.buttonOk.Name = "buttonOk"; 88 | this.buttonOk.Size = new System.Drawing.Size(132, 23); 89 | this.buttonOk.TabIndex = 1; 90 | this.buttonOk.Text = "OK"; 91 | this.buttonOk.UseVisualStyleBackColor = true; 92 | this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click); 93 | // 94 | // buttonCancel 95 | // 96 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 97 | this.buttonCancel.Location = new System.Drawing.Point(151, 421); 98 | this.buttonCancel.Name = "buttonCancel"; 99 | this.buttonCancel.Size = new System.Drawing.Size(132, 23); 100 | this.buttonCancel.TabIndex = 2; 101 | this.buttonCancel.Text = "Cancel"; 102 | this.buttonCancel.UseVisualStyleBackColor = true; 103 | // 104 | // buttonRefresh 105 | // 106 | this.buttonRefresh.Location = new System.Drawing.Point(290, 421); 107 | this.buttonRefresh.Name = "buttonRefresh"; 108 | this.buttonRefresh.Size = new System.Drawing.Size(132, 23); 109 | this.buttonRefresh.TabIndex = 3; 110 | this.buttonRefresh.Text = "Refresh"; 111 | this.buttonRefresh.UseVisualStyleBackColor = true; 112 | this.buttonRefresh.Click += new System.EventHandler(this.buttonRefresh_Click); 113 | // 114 | // ProcessDialog 115 | // 116 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 117 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 118 | this.ClientSize = new System.Drawing.Size(434, 452); 119 | this.Controls.Add(this.buttonRefresh); 120 | this.Controls.Add(this.buttonCancel); 121 | this.Controls.Add(this.buttonOk); 122 | this.Controls.Add(this.listViewProcesses); 123 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 124 | this.MaximizeBox = false; 125 | this.MinimizeBox = false; 126 | this.Name = "ProcessDialog"; 127 | this.ShowIcon = false; 128 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 129 | this.Text = "Processes"; 130 | this.contextMenuStrip.ResumeLayout(false); 131 | this.ResumeLayout(false); 132 | 133 | } 134 | 135 | #endregion 136 | 137 | private System.Windows.Forms.ListView listViewProcesses; 138 | private System.Windows.Forms.ColumnHeader columnHeaderId; 139 | private System.Windows.Forms.ColumnHeader columnHeaderName; 140 | private System.Windows.Forms.Button buttonOk; 141 | private System.Windows.Forms.Button buttonCancel; 142 | private System.Windows.Forms.Button buttonRefresh; 143 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip; 144 | private System.Windows.Forms.ToolStripMenuItem refreshToolStripMenuItem; 145 | } 146 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/ProcessDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using MEMAPI; 11 | 12 | namespace MEMAPI_Debugger.Dialogs 13 | { 14 | public partial class ProcessDialog : Form 15 | { 16 | public Process process { get; set; } 17 | 18 | private List processes; 19 | 20 | public ProcessDialog() 21 | { 22 | InitializeComponent(); 23 | process = null; 24 | refresh(); 25 | } 26 | 27 | private void refresh() 28 | { 29 | API.ErrorCode error; 30 | processes = API.getProcesses(out error); 31 | 32 | listViewProcesses.Items.Clear(); 33 | for (int i = processes.Count - 1; i >= 0; i--) 34 | listViewProcesses.Items.Add(new ListViewItem(processes[i].toArray())); 35 | } 36 | 37 | private void buttonOk_Click(object sender, EventArgs e) 38 | { 39 | if (process == null) 40 | { 41 | MessageBox.Show("No Process has been selected.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 42 | return; 43 | } 44 | 45 | // Close dialog 46 | DialogResult = DialogResult.OK; 47 | Close(); 48 | } 49 | 50 | private void buttonRefresh_Click(object sender, EventArgs e) 51 | { 52 | refresh(); 53 | } 54 | 55 | private void refreshToolStripMenuItem_Click(object sender, EventArgs e) 56 | { 57 | refresh(); 58 | } 59 | 60 | private void listViewProcesses_SelectedIndexChanged(object sender, EventArgs e) 61 | { 62 | if (listViewProcesses.SelectedItems.Count == 0) 63 | return; 64 | 65 | ListViewItem item = listViewProcesses.SelectedItems[0]; 66 | process = new Process(Convert.ToInt32(item.SubItems[0].Text), item.SubItems[1].Text); 67 | } 68 | 69 | private void listViewProcesses_DoubleClick(object sender, EventArgs e) 70 | { 71 | if (process == null) 72 | return; 73 | 74 | // Close dialog 75 | DialogResult = DialogResult.OK; 76 | Close(); 77 | } 78 | 79 | private void listViewProcesses_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) 80 | { 81 | // Disable column resizing 82 | e.Cancel = true; 83 | e.NewWidth = listViewProcesses.Columns[e.ColumnIndex].Width; 84 | } 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/ProcessDialog.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 17, 17 122 | 123 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/SelectTargetDialog.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Dialogs 2 | { 3 | partial class SelectTargetDialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | this.buttonOk = new System.Windows.Forms.Button(); 33 | this.buttonCancel = new System.Windows.Forms.Button(); 34 | this.listViewPS4s = new System.Windows.Forms.ListView(); 35 | this.columnHeaderName = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 36 | this.columnHeaderIp = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 37 | this.columnHeaderStatus = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 38 | this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 39 | this.addToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 40 | this.editToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 41 | this.removeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 42 | this.buttonRefresh = new System.Windows.Forms.Button(); 43 | this.buttonFindTargets = new System.Windows.Forms.Button(); 44 | this.seperator = new System.Windows.Forms.Label(); 45 | this.backgroundWorkerFindTargets = new System.ComponentModel.BackgroundWorker(); 46 | this.statusStrip = new System.Windows.Forms.StatusStrip(); 47 | this.toolStripProgressBar = new System.Windows.Forms.ToolStripProgressBar(); 48 | this.toolStripStatusLabel = new System.Windows.Forms.ToolStripStatusLabel(); 49 | this.contextMenuStrip.SuspendLayout(); 50 | this.statusStrip.SuspendLayout(); 51 | this.SuspendLayout(); 52 | // 53 | // buttonOk 54 | // 55 | this.buttonOk.Location = new System.Drawing.Point(12, 244); 56 | this.buttonOk.Name = "buttonOk"; 57 | this.buttonOk.Size = new System.Drawing.Size(75, 23); 58 | this.buttonOk.TabIndex = 1; 59 | this.buttonOk.Text = "OK"; 60 | this.buttonOk.UseVisualStyleBackColor = true; 61 | this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click); 62 | // 63 | // buttonCancel 64 | // 65 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 66 | this.buttonCancel.Location = new System.Drawing.Point(93, 244); 67 | this.buttonCancel.Name = "buttonCancel"; 68 | this.buttonCancel.Size = new System.Drawing.Size(75, 23); 69 | this.buttonCancel.TabIndex = 2; 70 | this.buttonCancel.Text = "Cancel"; 71 | this.buttonCancel.UseVisualStyleBackColor = true; 72 | // 73 | // listViewPS4s 74 | // 75 | this.listViewPS4s.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 76 | this.columnHeaderName, 77 | this.columnHeaderIp, 78 | this.columnHeaderStatus}); 79 | this.listViewPS4s.ContextMenuStrip = this.contextMenuStrip; 80 | this.listViewPS4s.FullRowSelect = true; 81 | this.listViewPS4s.Location = new System.Drawing.Point(12, 12); 82 | this.listViewPS4s.MultiSelect = false; 83 | this.listViewPS4s.Name = "listViewPS4s"; 84 | this.listViewPS4s.Size = new System.Drawing.Size(320, 213); 85 | this.listViewPS4s.TabIndex = 0; 86 | this.listViewPS4s.UseCompatibleStateImageBehavior = false; 87 | this.listViewPS4s.View = System.Windows.Forms.View.Details; 88 | this.listViewPS4s.ColumnWidthChanging += new System.Windows.Forms.ColumnWidthChangingEventHandler(this.listViewPS4s_ColumnWidthChanging); 89 | this.listViewPS4s.SelectedIndexChanged += new System.EventHandler(this.listViewPS4s_SelectedIndexChanged); 90 | this.listViewPS4s.DoubleClick += new System.EventHandler(this.listViewPS4s_DoubleClick); 91 | // 92 | // columnHeaderName 93 | // 94 | this.columnHeaderName.Text = "Name"; 95 | this.columnHeaderName.Width = 115; 96 | // 97 | // columnHeaderIp 98 | // 99 | this.columnHeaderIp.Text = "IP Address"; 100 | this.columnHeaderIp.Width = 120; 101 | // 102 | // columnHeaderStatus 103 | // 104 | this.columnHeaderStatus.Text = "Status"; 105 | this.columnHeaderStatus.Width = 80; 106 | // 107 | // contextMenuStrip 108 | // 109 | this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 110 | this.addToolStripMenuItem, 111 | this.editToolStripMenuItem, 112 | this.removeToolStripMenuItem}); 113 | this.contextMenuStrip.Name = "contextMenuStrip"; 114 | this.contextMenuStrip.Size = new System.Drawing.Size(118, 70); 115 | this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip_Opening); 116 | // 117 | // addToolStripMenuItem 118 | // 119 | this.addToolStripMenuItem.Name = "addToolStripMenuItem"; 120 | this.addToolStripMenuItem.Size = new System.Drawing.Size(117, 22); 121 | this.addToolStripMenuItem.Text = "Add"; 122 | this.addToolStripMenuItem.Click += new System.EventHandler(this.addToolStripMenuItem_Click); 123 | // 124 | // editToolStripMenuItem 125 | // 126 | this.editToolStripMenuItem.Name = "editToolStripMenuItem"; 127 | this.editToolStripMenuItem.Size = new System.Drawing.Size(117, 22); 128 | this.editToolStripMenuItem.Text = "Edit"; 129 | this.editToolStripMenuItem.Click += new System.EventHandler(this.editToolStripMenuItem_Click); 130 | // 131 | // removeToolStripMenuItem 132 | // 133 | this.removeToolStripMenuItem.Name = "removeToolStripMenuItem"; 134 | this.removeToolStripMenuItem.Size = new System.Drawing.Size(117, 22); 135 | this.removeToolStripMenuItem.Text = "Remove"; 136 | this.removeToolStripMenuItem.Click += new System.EventHandler(this.removeToolStripMenuItem_Click); 137 | // 138 | // buttonRefresh 139 | // 140 | this.buttonRefresh.Location = new System.Drawing.Point(174, 244); 141 | this.buttonRefresh.Name = "buttonRefresh"; 142 | this.buttonRefresh.Size = new System.Drawing.Size(75, 23); 143 | this.buttonRefresh.TabIndex = 3; 144 | this.buttonRefresh.Text = "Refresh"; 145 | this.buttonRefresh.UseVisualStyleBackColor = true; 146 | this.buttonRefresh.Click += new System.EventHandler(this.buttonRefresh_Click); 147 | // 148 | // buttonFindTargets 149 | // 150 | this.buttonFindTargets.Location = new System.Drawing.Point(257, 244); 151 | this.buttonFindTargets.Name = "buttonFindTargets"; 152 | this.buttonFindTargets.Size = new System.Drawing.Size(75, 23); 153 | this.buttonFindTargets.TabIndex = 4; 154 | this.buttonFindTargets.Text = "Find Targets"; 155 | this.buttonFindTargets.UseVisualStyleBackColor = true; 156 | this.buttonFindTargets.Click += new System.EventHandler(this.buttonFindTargets_Click); 157 | // 158 | // seperator 159 | // 160 | this.seperator.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D; 161 | this.seperator.Location = new System.Drawing.Point(12, 234); 162 | this.seperator.Name = "seperator"; 163 | this.seperator.Size = new System.Drawing.Size(320, 2); 164 | this.seperator.TabIndex = 6; 165 | // 166 | // backgroundWorkerFindTargets 167 | // 168 | this.backgroundWorkerFindTargets.WorkerReportsProgress = true; 169 | this.backgroundWorkerFindTargets.DoWork += new System.ComponentModel.DoWorkEventHandler(this.backgroundWorkerFindTargets_DoWork); 170 | this.backgroundWorkerFindTargets.ProgressChanged += new System.ComponentModel.ProgressChangedEventHandler(this.backgroundWorkerFindTargets_ProgressChanged); 171 | this.backgroundWorkerFindTargets.RunWorkerCompleted += new System.ComponentModel.RunWorkerCompletedEventHandler(this.backgroundWorkerFindTargets_RunWorkerCompleted); 172 | // 173 | // statusStrip 174 | // 175 | this.statusStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 176 | this.toolStripProgressBar, 177 | this.toolStripStatusLabel}); 178 | this.statusStrip.Location = new System.Drawing.Point(0, 249); 179 | this.statusStrip.Name = "statusStrip"; 180 | this.statusStrip.Size = new System.Drawing.Size(344, 22); 181 | this.statusStrip.SizingGrip = false; 182 | this.statusStrip.TabIndex = 7; 183 | this.statusStrip.Text = "statusStrip"; 184 | this.statusStrip.Visible = false; 185 | // 186 | // toolStripProgressBar 187 | // 188 | this.toolStripProgressBar.Maximum = 256; 189 | this.toolStripProgressBar.Name = "toolStripProgressBar"; 190 | this.toolStripProgressBar.Size = new System.Drawing.Size(100, 16); 191 | // 192 | // toolStripStatusLabel 193 | // 194 | this.toolStripStatusLabel.Name = "toolStripStatusLabel"; 195 | this.toolStripStatusLabel.Size = new System.Drawing.Size(23, 17); 196 | this.toolStripStatusLabel.Text = "0%"; 197 | // 198 | // SelectTargetDialog 199 | // 200 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 201 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 202 | this.ClientSize = new System.Drawing.Size(344, 271); 203 | this.Controls.Add(this.statusStrip); 204 | this.Controls.Add(this.seperator); 205 | this.Controls.Add(this.buttonFindTargets); 206 | this.Controls.Add(this.buttonRefresh); 207 | this.Controls.Add(this.listViewPS4s); 208 | this.Controls.Add(this.buttonCancel); 209 | this.Controls.Add(this.buttonOk); 210 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 211 | this.MaximizeBox = false; 212 | this.MinimizeBox = false; 213 | this.Name = "SelectTargetDialog"; 214 | this.ShowIcon = false; 215 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 216 | this.Text = "Select Target"; 217 | this.contextMenuStrip.ResumeLayout(false); 218 | this.statusStrip.ResumeLayout(false); 219 | this.statusStrip.PerformLayout(); 220 | this.ResumeLayout(false); 221 | this.PerformLayout(); 222 | 223 | } 224 | 225 | #endregion 226 | 227 | private System.Windows.Forms.Button buttonOk; 228 | private System.Windows.Forms.Button buttonCancel; 229 | private System.Windows.Forms.ListView listViewPS4s; 230 | private System.Windows.Forms.ColumnHeader columnHeaderName; 231 | private System.Windows.Forms.ColumnHeader columnHeaderIp; 232 | private System.Windows.Forms.ColumnHeader columnHeaderStatus; 233 | private System.Windows.Forms.Button buttonRefresh; 234 | private System.Windows.Forms.Button buttonFindTargets; 235 | private System.Windows.Forms.Label seperator; 236 | private System.ComponentModel.BackgroundWorker backgroundWorkerFindTargets; 237 | private System.Windows.Forms.StatusStrip statusStrip; 238 | private System.Windows.Forms.ToolStripProgressBar toolStripProgressBar; 239 | private System.Windows.Forms.ToolStripStatusLabel toolStripStatusLabel; 240 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip; 241 | private System.Windows.Forms.ToolStripMenuItem addToolStripMenuItem; 242 | private System.Windows.Forms.ToolStripMenuItem editToolStripMenuItem; 243 | private System.Windows.Forms.ToolStripMenuItem removeToolStripMenuItem; 244 | } 245 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/SelectTargetDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.IO; 7 | using System.Linq; 8 | using System.Net; 9 | using System.Net.NetworkInformation; 10 | using System.Net.Sockets; 11 | using System.Runtime.Serialization.Formatters.Binary; 12 | using System.Text; 13 | using System.Threading.Tasks; 14 | using System.Windows.Forms; 15 | 16 | namespace MEMAPI_Debugger.Dialogs 17 | { 18 | public partial class SelectTargetDialog : Form 19 | { 20 | public string IP { get; set; } 21 | 22 | private List ps4s; 23 | 24 | public SelectTargetDialog() 25 | { 26 | InitializeComponent(); 27 | ps4s = new List(); 28 | loadPS4s(); 29 | refresh(); 30 | } 31 | 32 | private void loadPS4s() 33 | { 34 | ps4s.Clear(); 35 | 36 | if (Properties.Settings.Default.ps4s == null || Properties.Settings.Default.ps4s == "") 37 | return; 38 | 39 | try 40 | { 41 | using (MemoryStream ms = new MemoryStream(Convert.FromBase64String(Properties.Settings.Default.ps4s))) 42 | { 43 | BinaryFormatter bf = new BinaryFormatter(); 44 | ps4s = (List)bf.Deserialize(ms); 45 | } 46 | } 47 | catch 48 | { 49 | Properties.Settings.Default.ps4s = ""; 50 | Properties.Settings.Default.Save(); 51 | } 52 | } 53 | 54 | private void savePS4s() 55 | { 56 | using (MemoryStream ms = new MemoryStream()) 57 | { 58 | BinaryFormatter bf = new BinaryFormatter(); 59 | bf.Serialize(ms, ps4s); 60 | ms.Position = 0; 61 | byte[] buffer = new byte[(int)ms.Length]; 62 | ms.Read(buffer, 0, buffer.Length); 63 | Properties.Settings.Default.ps4s = Convert.ToBase64String(buffer); 64 | Properties.Settings.Default.Save(); 65 | } 66 | } 67 | 68 | private void findTargets() 69 | { 70 | if (!backgroundWorkerFindTargets.IsBusy) 71 | { 72 | Height = 335; 73 | buttonOk.Enabled = false; 74 | buttonCancel.Enabled = false; 75 | buttonRefresh.Enabled = false; 76 | buttonFindTargets.Enabled = false; 77 | statusStrip.Visible = true; 78 | toolStripStatusLabel.Text = "0%"; 79 | toolStripProgressBar.Value = 0; 80 | contextMenuStrip.Enabled = false; 81 | backgroundWorkerFindTargets.RunWorkerAsync(); 82 | } 83 | } 84 | 85 | private void addPS4(PS4 ps4) 86 | { 87 | // Ensure it's not already on our list 88 | for (int i = 0; i < ps4s.Count; i++) 89 | { 90 | if (ps4s[i].IP == ps4.IP) 91 | return; 92 | } 93 | 94 | // Add it 95 | ps4s.Add(ps4); 96 | } 97 | 98 | private void removePS4(string ip) 99 | { 100 | if (Properties.Settings.Default.defaultPs4Ip == ip) 101 | { 102 | Properties.Settings.Default.defaultPs4Ip = ""; 103 | Properties.Settings.Default.Save(); 104 | } 105 | 106 | ps4s.RemoveAt(getPS4Index(ip)); 107 | } 108 | 109 | private int getPS4Index(string ip) 110 | { 111 | for (int i = 0; i < ps4s.Count; i++) 112 | { 113 | if (ps4s[i].IP == ip) 114 | return i; 115 | } 116 | return -1; 117 | } 118 | 119 | private bool checkTarget(string ip) 120 | { 121 | TcpClient client = new TcpClient(); 122 | try 123 | { 124 | if (client.ConnectAsync(ip, 9020).Wait(75)) 125 | { 126 | client.Close(); 127 | return true; 128 | } 129 | return false; 130 | } 131 | catch 132 | { 133 | client.Close(); 134 | return false; 135 | } 136 | } 137 | 138 | private string getLocalIp() 139 | { 140 | Socket socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, 0); 141 | socket.Connect("8.8.8.8", 65530); 142 | IPEndPoint endPoint = socket.LocalEndPoint as IPEndPoint; 143 | string localIP = endPoint.Address.ToString(); 144 | socket.Close(); 145 | return localIP; 146 | } 147 | 148 | private void refresh() 149 | { 150 | listViewPS4s.Items.Clear(); 151 | for (int i = 0; i < ps4s.Count; i++) 152 | listViewPS4s.Items.Add(new ListViewItem(ps4s[i].toArray())); 153 | } 154 | 155 | private void listViewPS4s_ColumnWidthChanging(object sender, ColumnWidthChangingEventArgs e) 156 | { 157 | // Disable column resizing 158 | e.Cancel = true; 159 | e.NewWidth = listViewPS4s.Columns[e.ColumnIndex].Width; 160 | } 161 | 162 | private void buttonRefresh_Click(object sender, EventArgs e) 163 | { 164 | refresh(); 165 | } 166 | 167 | private void buttonFindTargets_Click(object sender, EventArgs e) 168 | { 169 | if (MessageBox.Show("You must have the Webkit Exploit running on your PS4.\nAfter the scan has finished, you will need to reload the Webkit Exploit before sending the payload.\n\nAre you sure you want to continue?", "Warning", MessageBoxButtons.YesNo, MessageBoxIcon.Warning) == DialogResult.No) 170 | return; 171 | findTargets(); 172 | } 173 | 174 | private void listViewPS4s_SelectedIndexChanged(object sender, EventArgs e) 175 | { 176 | if (listViewPS4s.SelectedItems.Count == 0) 177 | return; 178 | 179 | IP = listViewPS4s.SelectedItems[0].SubItems[1].Text; 180 | } 181 | 182 | private void listViewPS4s_DoubleClick(object sender, EventArgs e) 183 | { 184 | if (IP == null) 185 | return; 186 | 187 | // Close dialog 188 | DialogResult = DialogResult.OK; 189 | Close(); 190 | } 191 | 192 | private void buttonOk_Click(object sender, EventArgs e) 193 | { 194 | if (IP == null) 195 | { 196 | MessageBox.Show("No PS4 has been selected.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 197 | return; 198 | } 199 | 200 | // Close dialog 201 | DialogResult = DialogResult.OK; 202 | Close(); 203 | } 204 | 205 | private void backgroundWorkerFindTargets_DoWork(object sender, DoWorkEventArgs e) 206 | { 207 | string ipAddres = getLocalIp(); 208 | string localSubnet = ipAddres.Substring(0, ipAddres.LastIndexOf(".")); 209 | 210 | for (int i = 0; i < 256; i++) 211 | { 212 | string checkIp = localSubnet + "." + i.ToString(); 213 | if (checkTarget(checkIp)) 214 | addPS4(new PS4(checkIp, checkIp)); 215 | BackgroundWorker bg = (BackgroundWorker)sender; 216 | bg.ReportProgress(i); 217 | } 218 | 219 | if (InvokeRequired) 220 | { 221 | Invoke(new MethodInvoker(() => { 222 | refresh(); 223 | })); 224 | return; 225 | } 226 | refresh(); 227 | } 228 | 229 | private void backgroundWorkerFindTargets_ProgressChanged(object sender, ProgressChangedEventArgs e) 230 | { 231 | if (InvokeRequired) 232 | { 233 | Invoke(new MethodInvoker(() => { 234 | toolStripProgressBar.Value = e.ProgressPercentage; 235 | toolStripStatusLabel.Text = Math.Floor(e.ProgressPercentage / 2.56f) + "%"; 236 | })); 237 | return; 238 | } 239 | toolStripProgressBar.Value = e.ProgressPercentage; 240 | toolStripStatusLabel.Text = Math.Floor(e.ProgressPercentage / 2.56f) + "%"; 241 | } 242 | 243 | private void backgroundWorkerFindTargets_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) 244 | { 245 | Height = 310; 246 | buttonOk.Enabled = true; 247 | buttonCancel.Enabled = true; 248 | buttonRefresh.Enabled = true; 249 | buttonFindTargets.Enabled = true; 250 | statusStrip.Visible = false; 251 | contextMenuStrip.Enabled = true; 252 | savePS4s(); 253 | } 254 | 255 | private void addToolStripMenuItem_Click(object sender, EventArgs e) 256 | { 257 | PS4Dialog dialog = new PS4Dialog(); 258 | if (dialog.ShowDialog() == DialogResult.OK) 259 | { 260 | addPS4(dialog.ps4); 261 | savePS4s(); 262 | refresh(); 263 | } 264 | } 265 | 266 | private void editToolStripMenuItem_Click(object sender, EventArgs e) 267 | { 268 | if (listViewPS4s.SelectedItems.Count == 0) 269 | return; 270 | 271 | PS4Dialog dialog = new PS4Dialog(); 272 | 273 | int index = getPS4Index(listViewPS4s.SelectedItems[0].SubItems[1].Text); 274 | 275 | dialog.ps4 = ps4s[index]; 276 | dialog.updateFields(); 277 | if (dialog.ShowDialog() == DialogResult.OK) 278 | { 279 | ps4s[index] = dialog.ps4; 280 | savePS4s(); 281 | refresh(); 282 | } 283 | } 284 | 285 | private void removeToolStripMenuItem_Click(object sender, EventArgs e) 286 | { 287 | if (listViewPS4s.SelectedItems.Count == 0) 288 | return; 289 | 290 | removePS4(listViewPS4s.SelectedItems[0].SubItems[1].Text); 291 | savePS4s(); 292 | refresh(); 293 | } 294 | 295 | private void contextMenuStrip_Opening(object sender, CancelEventArgs e) 296 | { 297 | editToolStripMenuItem.Enabled = listViewPS4s.SelectedItems.Count > 0; 298 | removeToolStripMenuItem.Enabled = listViewPS4s.SelectedItems.Count > 0; 299 | } 300 | } 301 | } 302 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/SelectTargetDialog.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | 121 | 347, 17 122 | 123 | 124 | 17, 17 125 | 126 | 127 | 238, 17 128 | 129 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/StringDialog.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Dialogs 2 | { 3 | partial class StringDialog 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.textBoxString = new System.Windows.Forms.TextBox(); 32 | this.buttonOk = new System.Windows.Forms.Button(); 33 | this.buttonCancel = new System.Windows.Forms.Button(); 34 | this.SuspendLayout(); 35 | // 36 | // textBoxString 37 | // 38 | this.textBoxString.Location = new System.Drawing.Point(12, 12); 39 | this.textBoxString.Name = "textBoxString"; 40 | this.textBoxString.Size = new System.Drawing.Size(255, 20); 41 | this.textBoxString.TabIndex = 0; 42 | // 43 | // buttonOk 44 | // 45 | this.buttonOk.Location = new System.Drawing.Point(12, 38); 46 | this.buttonOk.Name = "buttonOk"; 47 | this.buttonOk.Size = new System.Drawing.Size(125, 23); 48 | this.buttonOk.TabIndex = 1; 49 | this.buttonOk.Text = "OK"; 50 | this.buttonOk.UseVisualStyleBackColor = true; 51 | this.buttonOk.Click += new System.EventHandler(this.buttonOk_Click); 52 | // 53 | // buttonCancel 54 | // 55 | this.buttonCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel; 56 | this.buttonCancel.Location = new System.Drawing.Point(142, 38); 57 | this.buttonCancel.Name = "buttonCancel"; 58 | this.buttonCancel.Size = new System.Drawing.Size(125, 23); 59 | this.buttonCancel.TabIndex = 2; 60 | this.buttonCancel.Text = "Cancel"; 61 | this.buttonCancel.UseVisualStyleBackColor = true; 62 | // 63 | // StringDialog 64 | // 65 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 66 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 67 | this.ClientSize = new System.Drawing.Size(275, 70); 68 | this.Controls.Add(this.buttonCancel); 69 | this.Controls.Add(this.buttonOk); 70 | this.Controls.Add(this.textBoxString); 71 | this.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog; 72 | this.MaximizeBox = false; 73 | this.MinimizeBox = false; 74 | this.Name = "StringDialog"; 75 | this.ShowIcon = false; 76 | this.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent; 77 | this.ResumeLayout(false); 78 | this.PerformLayout(); 79 | 80 | } 81 | 82 | #endregion 83 | 84 | private System.Windows.Forms.TextBox textBoxString; 85 | private System.Windows.Forms.Button buttonOk; 86 | private System.Windows.Forms.Button buttonCancel; 87 | } 88 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/StringDialog.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace MEMAPI_Debugger.Dialogs 12 | { 13 | public partial class StringDialog : Form 14 | { 15 | public String Message { get; set; } 16 | 17 | public StringDialog(string title) 18 | { 19 | InitializeComponent(); 20 | Text = title; 21 | } 22 | 23 | public void updateField() 24 | { 25 | textBoxString.Text = Message; 26 | } 27 | 28 | private void buttonOk_Click(object sender, EventArgs e) 29 | { 30 | if (textBoxString.Text == "") 31 | { 32 | MessageBox.Show("Message must not be empty.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 33 | return; 34 | } 35 | Message = textBoxString.Text; 36 | 37 | // Close dialog 38 | DialogResult = DialogResult.OK; 39 | Close(); 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Dialogs/StringDialog.resx: -------------------------------------------------------------------------------- 1 |  2 | 3 | 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 | text/microsoft-resx 110 | 111 | 112 | 2.0 113 | 114 | 115 | System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 116 | 117 | 118 | System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 119 | 120 | -------------------------------------------------------------------------------- /MEMAPI Debugger/FodyWeavers.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Forms/BreakpointsForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Forms 2 | { 3 | partial class BreakpointsForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(BreakpointsForm)); 32 | this.SuspendLayout(); 33 | // 34 | // BreakpointsForm 35 | // 36 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 37 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 38 | this.ClientSize = new System.Drawing.Size(800, 450); 39 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 40 | this.Name = "BreakpointsForm"; 41 | this.Text = "Breakpoints"; 42 | this.ResumeLayout(false); 43 | 44 | } 45 | 46 | #endregion 47 | } 48 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Forms/BreakpointsForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | 11 | namespace MEMAPI_Debugger.Forms 12 | { 13 | public partial class BreakpointsForm : Form 14 | { 15 | public BreakpointsForm() 16 | { 17 | InitializeComponent(); 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Forms/ConsoleForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Forms 2 | { 3 | partial class ConsoleForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(ConsoleForm)); 32 | this.consoleOutput = new System.Windows.Forms.TextBox(); 33 | this.SuspendLayout(); 34 | // 35 | // consoleOutput 36 | // 37 | this.consoleOutput.Dock = System.Windows.Forms.DockStyle.Fill; 38 | this.consoleOutput.Location = new System.Drawing.Point(0, 0); 39 | this.consoleOutput.Multiline = true; 40 | this.consoleOutput.Name = "consoleOutput"; 41 | this.consoleOutput.ReadOnly = true; 42 | this.consoleOutput.ScrollBars = System.Windows.Forms.ScrollBars.Both; 43 | this.consoleOutput.Size = new System.Drawing.Size(800, 450); 44 | this.consoleOutput.TabIndex = 0; 45 | this.consoleOutput.WordWrap = false; 46 | // 47 | // ConsoleForm 48 | // 49 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 50 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 51 | this.ClientSize = new System.Drawing.Size(800, 450); 52 | this.Controls.Add(this.consoleOutput); 53 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 54 | this.Name = "ConsoleForm"; 55 | this.Text = "Console"; 56 | this.ResumeLayout(false); 57 | this.PerformLayout(); 58 | 59 | } 60 | 61 | #endregion 62 | 63 | private System.Windows.Forms.TextBox consoleOutput; 64 | } 65 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Forms/ConsoleForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Drawing.Text; 7 | using System.IO; 8 | using System.Linq; 9 | using System.Reflection; 10 | using System.Runtime.InteropServices; 11 | using System.Text; 12 | using System.Threading.Tasks; 13 | using System.Windows.Forms; 14 | 15 | namespace MEMAPI_Debugger.Forms 16 | { 17 | public partial class ConsoleForm : Form 18 | { 19 | public ConsoleForm() 20 | { 21 | InitializeComponent(); 22 | 23 | // Custom Font 24 | consoleOutput.Font = Resource.getCustomFont(Resource.monospace); 25 | MEMAPI.Server.ServerQueueUpdated += c_ServerQueueUpdated; 26 | } 27 | 28 | private void c_ServerQueueUpdated(object sender, EventArgs e) 29 | { 30 | if (consoleOutput.InvokeRequired) 31 | { 32 | Invoke(new MethodInvoker(() => { 33 | consoleOutput.Lines = MEMAPI.Server.lines.ToArray(); 34 | consoleOutput.SelectionStart = consoleOutput.Text.Length; 35 | consoleOutput.ScrollToCaret(); 36 | })); 37 | return; 38 | } 39 | consoleOutput.Lines = MEMAPI.Server.lines.ToArray(); 40 | consoleOutput.SelectionStart = consoleOutput.Text.Length; 41 | consoleOutput.ScrollToCaret(); 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Forms/DisassemblyForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Forms 2 | { 3 | partial class DisassemblyForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(DisassemblyForm)); 33 | this.listView = new System.Windows.Forms.ListView(); 34 | this.columnHeaderAddress = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 35 | this.columnHeaderOpcode = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 36 | this.columnHeaderOperands = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader())); 37 | this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 38 | this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 39 | this.copyAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 40 | this.copyOpcodeToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 41 | this.copyOperandsToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 42 | this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); 43 | this.goToAddressToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 44 | this.goToInstructionPointerToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 45 | this.imageListBreakpoint = new System.Windows.Forms.ImageList(this.components); 46 | this.contextMenuStrip.SuspendLayout(); 47 | this.SuspendLayout(); 48 | // 49 | // listView 50 | // 51 | this.listView.CheckBoxes = true; 52 | this.listView.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] { 53 | this.columnHeaderAddress, 54 | this.columnHeaderOpcode, 55 | this.columnHeaderOperands}); 56 | this.listView.ContextMenuStrip = this.contextMenuStrip; 57 | this.listView.Dock = System.Windows.Forms.DockStyle.Fill; 58 | this.listView.FullRowSelect = true; 59 | this.listView.Location = new System.Drawing.Point(0, 0); 60 | this.listView.Name = "listView"; 61 | this.listView.Size = new System.Drawing.Size(629, 539); 62 | this.listView.StateImageList = this.imageListBreakpoint; 63 | this.listView.TabIndex = 0; 64 | this.listView.UseCompatibleStateImageBehavior = false; 65 | this.listView.View = System.Windows.Forms.View.Details; 66 | this.listView.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.listView_ItemCheck); 67 | // 68 | // columnHeaderAddress 69 | // 70 | this.columnHeaderAddress.Text = "Address"; 71 | this.columnHeaderAddress.Width = 150; 72 | // 73 | // columnHeaderOpcode 74 | // 75 | this.columnHeaderOpcode.Text = "Opcode"; 76 | this.columnHeaderOpcode.Width = 100; 77 | // 78 | // columnHeaderOperands 79 | // 80 | this.columnHeaderOperands.Text = "Operands"; 81 | this.columnHeaderOperands.Width = 250; 82 | // 83 | // contextMenuStrip 84 | // 85 | this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 86 | this.copyToolStripMenuItem, 87 | this.copyAddressToolStripMenuItem, 88 | this.copyOpcodeToolStripMenuItem, 89 | this.copyOperandsToolStripMenuItem, 90 | this.toolStripSeparator1, 91 | this.goToAddressToolStripMenuItem, 92 | this.goToInstructionPointerToolStripMenuItem}); 93 | this.contextMenuStrip.Name = "contextMenuStrip"; 94 | this.contextMenuStrip.Size = new System.Drawing.Size(198, 142); 95 | this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip_Opening); 96 | // 97 | // copyToolStripMenuItem 98 | // 99 | this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; 100 | this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); 101 | this.copyToolStripMenuItem.Size = new System.Drawing.Size(197, 22); 102 | this.copyToolStripMenuItem.Text = "Copy"; 103 | this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click); 104 | // 105 | // copyAddressToolStripMenuItem 106 | // 107 | this.copyAddressToolStripMenuItem.Name = "copyAddressToolStripMenuItem"; 108 | this.copyAddressToolStripMenuItem.Size = new System.Drawing.Size(197, 22); 109 | this.copyAddressToolStripMenuItem.Text = "Copy address"; 110 | this.copyAddressToolStripMenuItem.Click += new System.EventHandler(this.copyAddressToolStripMenuItem_Click); 111 | // 112 | // copyOpcodeToolStripMenuItem 113 | // 114 | this.copyOpcodeToolStripMenuItem.Name = "copyOpcodeToolStripMenuItem"; 115 | this.copyOpcodeToolStripMenuItem.Size = new System.Drawing.Size(197, 22); 116 | this.copyOpcodeToolStripMenuItem.Text = "Copy opcode"; 117 | this.copyOpcodeToolStripMenuItem.Click += new System.EventHandler(this.copyOpcodeToolStripMenuItem_Click); 118 | // 119 | // copyOperandsToolStripMenuItem 120 | // 121 | this.copyOperandsToolStripMenuItem.Name = "copyOperandsToolStripMenuItem"; 122 | this.copyOperandsToolStripMenuItem.Size = new System.Drawing.Size(197, 22); 123 | this.copyOperandsToolStripMenuItem.Text = "Copy operands"; 124 | this.copyOperandsToolStripMenuItem.Click += new System.EventHandler(this.copyOperandsToolStripMenuItem_Click); 125 | // 126 | // toolStripSeparator1 127 | // 128 | this.toolStripSeparator1.Name = "toolStripSeparator1"; 129 | this.toolStripSeparator1.Size = new System.Drawing.Size(194, 6); 130 | // 131 | // goToAddressToolStripMenuItem 132 | // 133 | this.goToAddressToolStripMenuItem.Name = "goToAddressToolStripMenuItem"; 134 | this.goToAddressToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.G))); 135 | this.goToAddressToolStripMenuItem.Size = new System.Drawing.Size(197, 22); 136 | this.goToAddressToolStripMenuItem.Text = "Go to address"; 137 | this.goToAddressToolStripMenuItem.Click += new System.EventHandler(this.goToAddressToolStripMenuItem_Click); 138 | // 139 | // goToInstructionPointerToolStripMenuItem 140 | // 141 | this.goToInstructionPointerToolStripMenuItem.Name = "goToInstructionPointerToolStripMenuItem"; 142 | this.goToInstructionPointerToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)(((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.Shift) 143 | | System.Windows.Forms.Keys.G))); 144 | this.goToInstructionPointerToolStripMenuItem.Size = new System.Drawing.Size(197, 22); 145 | this.goToInstructionPointerToolStripMenuItem.Text = "Go to RIP"; 146 | this.goToInstructionPointerToolStripMenuItem.Click += new System.EventHandler(this.goToInstructionPointerToolStripMenuItem_Click); 147 | // 148 | // imageListBreakpoint 149 | // 150 | this.imageListBreakpoint.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageListBreakpoint.ImageStream"))); 151 | this.imageListBreakpoint.TransparentColor = System.Drawing.Color.Transparent; 152 | this.imageListBreakpoint.Images.SetKeyName(0, "transparent.png"); 153 | this.imageListBreakpoint.Images.SetKeyName(1, "pointer.png"); 154 | // 155 | // DisassemblyForm 156 | // 157 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 158 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 159 | this.ClientSize = new System.Drawing.Size(629, 539); 160 | this.Controls.Add(this.listView); 161 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 162 | this.Name = "DisassemblyForm"; 163 | this.Text = "Disassembly"; 164 | this.contextMenuStrip.ResumeLayout(false); 165 | this.ResumeLayout(false); 166 | 167 | } 168 | 169 | #endregion 170 | 171 | private System.Windows.Forms.ListView listView; 172 | private System.Windows.Forms.ImageList imageListBreakpoint; 173 | private System.Windows.Forms.ColumnHeader columnHeaderAddress; 174 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip; 175 | private System.Windows.Forms.ToolStripMenuItem goToAddressToolStripMenuItem; 176 | private System.Windows.Forms.ColumnHeader columnHeaderOpcode; 177 | private System.Windows.Forms.ColumnHeader columnHeaderOperands; 178 | private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem; 179 | private System.Windows.Forms.ToolStripMenuItem copyAddressToolStripMenuItem; 180 | private System.Windows.Forms.ToolStripMenuItem copyOpcodeToolStripMenuItem; 181 | private System.Windows.Forms.ToolStripMenuItem copyOperandsToolStripMenuItem; 182 | private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; 183 | private System.Windows.Forms.ToolStripMenuItem goToInstructionPointerToolStripMenuItem; 184 | } 185 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Forms/DisassemblyForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using MEMAPI; 11 | using MEMAPI_Debugger.Dialogs; 12 | using SharpDisasm; 13 | using static System.Windows.Forms.ListViewItem; 14 | 15 | namespace MEMAPI_Debugger.Forms 16 | { 17 | public partial class DisassemblyForm : Form 18 | { 19 | private ulong addressPointer; 20 | private ulong? instructionPointer; 21 | private int instructionIndex; 22 | private int instructionPointerIndex; 23 | private byte[] memory; 24 | 25 | public DisassemblyForm() 26 | { 27 | InitializeComponent(); 28 | listView.Font = Resource.getCustomFont(Resource.monospace); 29 | 30 | instructionPointer = null; 31 | 32 | // Events 33 | API.AttachedEvent += onAttached; 34 | API.GoEvent += onGo; 35 | API.SteppedEvent += onStepped; 36 | API.StoppedEvent += onStopped; 37 | 38 | addressPointer = 0x0; 39 | instructionIndex = -1; 40 | instructionPointerIndex = -1; 41 | 42 | goToAddressToolStripMenuItem.Enabled = false; 43 | 44 | // Initialise Disassembler 45 | Disassembler.Translator.IncludeAddress = true; 46 | Disassembler.Translator.IncludeBinary = false; 47 | } 48 | 49 | private void onAttached(object sender, EventArgs e) 50 | { 51 | if (InvokeRequired) 52 | { 53 | Invoke(new Action(onAttached), sender, e); 54 | return; 55 | } 56 | // Check if it's paused, if so, then get RIP, otherwise leave blank... 57 | } 58 | 59 | private void onGo(object sender, EventArgs e) 60 | { 61 | if (InvokeRequired) 62 | { 63 | Invoke(new Action(onGo), sender, e); 64 | return; 65 | } 66 | 67 | listView.Items.Clear(); 68 | instructionPointer = null; 69 | goToAddressToolStripMenuItem.Enabled = false; 70 | } 71 | 72 | private void onStopped(object sender, EventArgs e) 73 | { 74 | if (InvokeRequired) 75 | { 76 | Invoke(new Action(onStopped), sender, e); 77 | return; 78 | } 79 | refreshAtInstructionPointer(); 80 | } 81 | 82 | private void onStepped(object sender, EventArgs e) 83 | { 84 | if (InvokeRequired) 85 | { 86 | Invoke(new Action(onStepped), sender, e); 87 | return; 88 | } 89 | refreshAtInstructionPointer(); 90 | } 91 | 92 | private void refreshAtInstructionPointer() 93 | { 94 | // Get RIP and insert into address param 95 | API.ErrorCode error; 96 | Registers regs = API.getRegisters(out error); 97 | instructionPointer = regs.rip; 98 | refresh(instructionPointer); 99 | } 100 | 101 | private void refresh(ulong? address = null) 102 | { 103 | if (address == null) 104 | address = addressPointer; 105 | 106 | goToAddressToolStripMenuItem.Enabled = false; 107 | listView.Items.Clear(); 108 | if (!API.isConnected()) 109 | return; 110 | 111 | API.ErrorCode error; 112 | memory = API.read((ulong)address - 0x100, 0x200, out error); 113 | if (error != API.ErrorCode.NO_ERROR) 114 | memory = new byte[0x200]; 115 | 116 | Disassembler disasm = new Disassembler(memory, ArchitectureMode.x86_64, (ulong)(address - 0x100), true); 117 | 118 | instructionIndex = -1; 119 | IEnumerable instructions = disasm.Disassemble(); 120 | for (int i = 0; i < instructions.Count(); i++) 121 | { 122 | Instruction instruction = instructions.ElementAt(i); 123 | 124 | string line = instruction.ToString(); 125 | List lines = new List(line.Split(new char[] { ' ' })); 126 | 127 | string addr = lines[0]; 128 | string opcode = lines[1]; 129 | lines.RemoveRange(0, 2); 130 | string operands = string.Join(" ", lines); 131 | 132 | ListViewItem item = new ListViewItem(new string[] { addr, opcode, operands }); 133 | 134 | ulong addrConverted = Convert.ToUInt64(addr, 16); 135 | bool isAtRip = instructionPointer == addrConverted; 136 | if (isAtRip) 137 | instructionPointerIndex = i; 138 | 139 | if (addrConverted <= address) 140 | { 141 | if (instructions.Count() == i + 1) 142 | instructionIndex = i; 143 | else 144 | { 145 | string nextInstruction = instructions.ElementAt(i + 1).ToString(); 146 | ulong nextInstructionAddress = Convert.ToUInt64(nextInstruction.Split(new char[] { ' ' })[0], 16); 147 | if (nextInstructionAddress > address) 148 | instructionIndex = i; 149 | } 150 | } 151 | 152 | if (isAtRip) 153 | item.StateImageIndex = 1; 154 | else 155 | item.StateImageIndex = 0; 156 | 157 | listView.Items.Add(item); 158 | } 159 | 160 | if (instructionIndex != -1) 161 | listView.TopItem = listView.Items[instructionIndex]; 162 | goToAddressToolStripMenuItem.Enabled = true; 163 | } 164 | 165 | private void contextMenuStrip_Opening(object sender, CancelEventArgs e) 166 | { 167 | copyToolStripMenuItem.Enabled = listView.SelectedItems.Count > 0; 168 | copyAddressToolStripMenuItem.Enabled = listView.SelectedItems.Count > 0; 169 | copyOpcodeToolStripMenuItem.Enabled = listView.SelectedItems.Count > 0; 170 | copyOperandsToolStripMenuItem.Enabled = listView.SelectedItems.Count > 0; 171 | goToInstructionPointerToolStripMenuItem.Enabled = instructionPointer != null; 172 | } 173 | 174 | private void goToAddressToolStripMenuItem_Click(object sender, EventArgs e) 175 | { 176 | StringDialog dialog = new StringDialog("Go to address"); 177 | if (dialog.ShowDialog() == DialogResult.OK) 178 | { 179 | addressPointer = Convert.ToUInt64(dialog.Message, 16); 180 | refresh(); 181 | } 182 | } 183 | 184 | private void goToInstructionPointerToolStripMenuItem_Click(object sender, EventArgs e) 185 | { 186 | if (instructionPointer == null) 187 | return; 188 | addressPointer = (ulong)instructionPointer; 189 | refresh(); 190 | } 191 | 192 | private void listView_ItemCheck(object sender, ItemCheckEventArgs e) 193 | { 194 | e.NewValue = (instructionPointerIndex != -1 && instructionPointerIndex == e.Index ? CheckState.Checked : CheckState.Unchecked); 195 | } 196 | 197 | private void copyToolStripMenuItem_Click(object sender, EventArgs e) 198 | { 199 | string toCopy = ""; 200 | foreach (ListViewItem item in listView.SelectedItems) 201 | { 202 | foreach (ListViewSubItem subitem in item.SubItems) 203 | toCopy += subitem.Text + "\t\t"; 204 | toCopy = toCopy.TrimEnd(new char[] { '\t' }); 205 | toCopy += "\r\n"; 206 | } 207 | 208 | toCopy = toCopy.TrimEnd(new char[] { '\r', '\n' }); 209 | if (toCopy != null && toCopy != "") 210 | Clipboard.SetText(toCopy); 211 | } 212 | 213 | private void copyAddressToolStripMenuItem_Click(object sender, EventArgs e) 214 | { 215 | string toCopy = ""; 216 | foreach (ListViewItem item in listView.SelectedItems) 217 | toCopy += item.SubItems[0].Text + "\r\n"; 218 | 219 | toCopy = toCopy.TrimEnd(new char[] { '\r', '\n' }); 220 | if (toCopy != null && toCopy != "") 221 | Clipboard.SetText(toCopy); 222 | } 223 | 224 | private void copyOpcodeToolStripMenuItem_Click(object sender, EventArgs e) 225 | { 226 | string toCopy = ""; 227 | foreach (ListViewItem item in listView.SelectedItems) 228 | toCopy += item.SubItems[1].Text + "\r\n"; 229 | 230 | toCopy = toCopy.TrimEnd(new char[] { '\r', '\n' }); 231 | if (toCopy != null && toCopy != "") 232 | Clipboard.SetText(toCopy); 233 | } 234 | 235 | private void copyOperandsToolStripMenuItem_Click(object sender, EventArgs e) 236 | { 237 | string toCopy = ""; 238 | foreach (ListViewItem item in listView.SelectedItems) 239 | toCopy += item.SubItems[2].Text + "\r\n"; 240 | 241 | toCopy = toCopy.TrimEnd(new char[] { '\r', '\n' }); 242 | if (toCopy != null && toCopy != "") 243 | Clipboard.SetText(toCopy); 244 | } 245 | } 246 | } 247 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Forms/KernelForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Forms 2 | { 3 | partial class KernelForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.Windows.Forms.TreeNode treeNode1 = new System.Windows.Forms.TreeNode("Process"); 33 | System.Windows.Forms.TreeNode treeNode2 = new System.Windows.Forms.TreeNode("Modules"); 34 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(KernelForm)); 35 | this.treeView = new System.Windows.Forms.TreeView(); 36 | this.imageList = new System.Windows.Forms.ImageList(this.components); 37 | this.SuspendLayout(); 38 | // 39 | // treeView 40 | // 41 | this.treeView.Dock = System.Windows.Forms.DockStyle.Fill; 42 | this.treeView.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0))); 43 | this.treeView.ImageIndex = 0; 44 | this.treeView.ImageList = this.imageList; 45 | this.treeView.Location = new System.Drawing.Point(0, 0); 46 | this.treeView.Name = "treeView"; 47 | treeNode1.ImageKey = "gears.png"; 48 | treeNode1.Name = "Process"; 49 | treeNode1.SelectedImageKey = "gears.png"; 50 | treeNode1.Tag = "process"; 51 | treeNode1.Text = "Process"; 52 | treeNode2.ImageKey = "document_info.png"; 53 | treeNode2.Name = "Modules"; 54 | treeNode2.SelectedImageKey = "document.png"; 55 | treeNode2.Tag = "modules"; 56 | treeNode2.Text = "Modules"; 57 | this.treeView.Nodes.AddRange(new System.Windows.Forms.TreeNode[] { 58 | treeNode1, 59 | treeNode2}); 60 | this.treeView.SelectedImageIndex = 0; 61 | this.treeView.Size = new System.Drawing.Size(800, 450); 62 | this.treeView.TabIndex = 0; 63 | this.treeView.BeforeExpand += new System.Windows.Forms.TreeViewCancelEventHandler(this.treeView_BeforeExpand); 64 | // 65 | // imageList 66 | // 67 | this.imageList.ImageStream = ((System.Windows.Forms.ImageListStreamer)(resources.GetObject("imageList.ImageStream"))); 68 | this.imageList.TransparentColor = System.Drawing.Color.Transparent; 69 | this.imageList.Images.SetKeyName(0, "document.png"); 70 | this.imageList.Images.SetKeyName(1, "document_info.png"); 71 | this.imageList.Images.SetKeyName(2, "gear.png"); 72 | this.imageList.Images.SetKeyName(3, "gears.png"); 73 | this.imageList.Images.SetKeyName(4, "loading.png"); 74 | this.imageList.Images.SetKeyName(5, "blue_cog.png"); 75 | // 76 | // KernelForm 77 | // 78 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 79 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 80 | this.ClientSize = new System.Drawing.Size(800, 450); 81 | this.Controls.Add(this.treeView); 82 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 83 | this.Name = "KernelForm"; 84 | this.Text = "Kernel"; 85 | this.ResumeLayout(false); 86 | 87 | } 88 | 89 | #endregion 90 | 91 | private System.Windows.Forms.TreeView treeView; 92 | private System.Windows.Forms.ImageList imageList; 93 | } 94 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Forms/KernelForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using MEMAPI; 11 | 12 | namespace MEMAPI_Debugger.Forms 13 | { 14 | public partial class KernelForm : Form 15 | { 16 | List modules; 17 | List processes; 18 | 19 | public KernelForm() 20 | { 21 | InitializeComponent(); 22 | 23 | modules = new List(); 24 | processes = new List(); 25 | 26 | // Events 27 | API.ConnectedEvent += onConnected; 28 | API.DisconnectEvent += onDisconnected; 29 | 30 | refresh(); 31 | } 32 | 33 | private void onConnected(object sender, EventArgs e) 34 | { 35 | refresh(); 36 | } 37 | 38 | private void onDisconnected(object sender, EventArgs e) 39 | { 40 | refresh(); 41 | } 42 | 43 | private void refresh() 44 | { 45 | API.ErrorCode error; 46 | if (!API.isConnected()) 47 | { 48 | modules = new List(); 49 | processes = new List(); 50 | } 51 | else 52 | { 53 | modules = API.getModules(out error); 54 | processes = API.getProcesses(out error); 55 | } 56 | 57 | // Clear existing nodes 58 | TreeNode processNode = getRootByTag("process"); 59 | TreeNode moduleNode = getRootByTag("modules"); 60 | 61 | processNode.Nodes.Clear(); 62 | moduleNode.Nodes.Clear(); 63 | 64 | // Add Process Nodes 65 | foreach (Process process in processes) 66 | { 67 | TreeNode sub = processNode.Nodes.Add(process.Id.ToString(), process.Id + " | " + process.Name, "process.png"); 68 | sub.Nodes.Add(process.Id + "_loading", "Loading...", "loading.png"); 69 | } 70 | processNode.Text = "Processes (" + processes.Count + ")"; 71 | 72 | // Add Module Nodes 73 | ulong totalCodeSize = 0; 74 | ulong totalDataSize = 0; 75 | foreach (Module module in modules) 76 | { 77 | ulong memorySize = module.CodeSize + module.DataSize; 78 | TreeNode sub = moduleNode.Nodes.Add(module.Name, module.Id + " | " + module.Name + " | Memory Size: 0x" + Helper.ulongToString(memorySize, false) + " (" + Helper.sizeToSuffix(memorySize) + ")", "document.png"); 79 | 80 | sub.Nodes.Add(module.Name + "_text", "Text Segment | Memory Size (.text) 0x" + Helper.ulongToString(module.CodeSize, false) + " (" + Helper.sizeToSuffix(module.CodeSize) + ")", "document.png"); 81 | sub.Nodes.Add(module.Name + "_data", "Data Segment | Memory Size (.data) 0x" + Helper.ulongToString(module.DataSize, false) + " (" + Helper.sizeToSuffix(module.DataSize) + ")", "document.png"); 82 | 83 | totalCodeSize += module.CodeSize; 84 | totalDataSize += module.DataSize; 85 | } 86 | ulong totalMemorySize = totalCodeSize + totalDataSize; 87 | moduleNode.Text = "Modules (" + modules.Count + ")"; 88 | if (modules.Count > 0) 89 | moduleNode.Text += " | Memory Size " + Helper.sizeToSuffix(totalMemorySize) + " (.text = " + Helper.sizeToSuffix(totalCodeSize) + ", .data = " + Helper.sizeToSuffix(totalDataSize) + ")"; 90 | } 91 | 92 | private TreeNode getRootByTag(string tag) 93 | { 94 | foreach (TreeNode node in treeView.Nodes) 95 | { 96 | if (node.Tag.ToString() == tag) 97 | return node; 98 | } 99 | return null; 100 | } 101 | 102 | private void treeView_BeforeExpand(object sender, TreeViewCancelEventArgs e) 103 | { 104 | if (e.Node.Nodes.Count < 1 || e.Node.FirstNode.Text != "Loading...") 105 | return; 106 | 107 | int processId = Convert.ToInt32(e.Node.Name.Replace("_loading", "")); 108 | 109 | API.ErrorCode error; 110 | List threads = API.getProcessThreads(out error, processId); 111 | 112 | e.Node.Nodes.Clear(); 113 | foreach (Thread thread in threads) 114 | e.Node.Nodes.Add(processId + "_" + thread.Id, "Thread: " + thread.Id, "blue_cog.png"); 115 | } 116 | } 117 | } 118 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Forms/RegistersForm.Designer.cs: -------------------------------------------------------------------------------- 1 | namespace MEMAPI_Debugger.Forms 2 | { 3 | partial class RegistersForm 4 | { 5 | /// 6 | /// Required designer variable. 7 | /// 8 | private System.ComponentModel.IContainer components = null; 9 | 10 | /// 11 | /// Clean up any resources being used. 12 | /// 13 | /// true if managed resources should be disposed; otherwise, false. 14 | protected override void Dispose(bool disposing) 15 | { 16 | if (disposing && (components != null)) 17 | { 18 | components.Dispose(); 19 | } 20 | base.Dispose(disposing); 21 | } 22 | 23 | #region Windows Form Designer generated code 24 | 25 | /// 26 | /// Required method for Designer support - do not modify 27 | /// the contents of this method with the code editor. 28 | /// 29 | private void InitializeComponent() 30 | { 31 | this.components = new System.ComponentModel.Container(); 32 | System.Windows.Forms.ListViewGroup listViewGroup1 = new System.Windows.Forms.ListViewGroup("General Purpose Registers", System.Windows.Forms.HorizontalAlignment.Left); 33 | System.Windows.Forms.ListViewGroup listViewGroup2 = new System.Windows.Forms.ListViewGroup("Instruction Pointer", System.Windows.Forms.HorizontalAlignment.Left); 34 | System.Windows.Forms.ListViewGroup listViewGroup3 = new System.Windows.Forms.ListViewGroup("Segments", System.Windows.Forms.HorizontalAlignment.Left); 35 | System.Windows.Forms.ListViewGroup listViewGroup4 = new System.Windows.Forms.ListViewGroup("Other", System.Windows.Forms.HorizontalAlignment.Left); 36 | System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(RegistersForm)); 37 | this.listView = new System.Windows.Forms.ListView(); 38 | this.contextMenuStrip = new System.Windows.Forms.ContextMenuStrip(this.components); 39 | this.copyToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 40 | this.pasteToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 41 | this.toolStripSeparator1 = new System.Windows.Forms.ToolStripSeparator(); 42 | this.enterNewValueToolStripMenuItem = new System.Windows.Forms.ToolStripMenuItem(); 43 | this.contextMenuStrip.SuspendLayout(); 44 | this.SuspendLayout(); 45 | // 46 | // listView 47 | // 48 | this.listView.ContextMenuStrip = this.contextMenuStrip; 49 | this.listView.Dock = System.Windows.Forms.DockStyle.Fill; 50 | listViewGroup1.Header = "General Purpose Registers"; 51 | listViewGroup1.Name = "listViewGroupRegisters"; 52 | listViewGroup1.Tag = "register"; 53 | listViewGroup2.Header = "Instruction Pointer"; 54 | listViewGroup2.Name = "listViewGroupRip"; 55 | listViewGroup2.Tag = "rip"; 56 | listViewGroup3.Header = "Segments"; 57 | listViewGroup3.Name = "listViewGroupSegments"; 58 | listViewGroup3.Tag = "segment"; 59 | listViewGroup4.Header = "Other"; 60 | listViewGroup4.Name = "listViewGroupOther"; 61 | listViewGroup4.Tag = "other"; 62 | this.listView.Groups.AddRange(new System.Windows.Forms.ListViewGroup[] { 63 | listViewGroup1, 64 | listViewGroup2, 65 | listViewGroup3, 66 | listViewGroup4}); 67 | this.listView.Location = new System.Drawing.Point(0, 0); 68 | this.listView.Name = "listView"; 69 | this.listView.Size = new System.Drawing.Size(800, 450); 70 | this.listView.TabIndex = 0; 71 | this.listView.UseCompatibleStateImageBehavior = false; 72 | this.listView.View = System.Windows.Forms.View.SmallIcon; 73 | // 74 | // contextMenuStrip 75 | // 76 | this.contextMenuStrip.Items.AddRange(new System.Windows.Forms.ToolStripItem[] { 77 | this.copyToolStripMenuItem, 78 | this.pasteToolStripMenuItem, 79 | this.toolStripSeparator1, 80 | this.enterNewValueToolStripMenuItem}); 81 | this.contextMenuStrip.Name = "contextMenuStrip"; 82 | this.contextMenuStrip.Size = new System.Drawing.Size(158, 76); 83 | this.contextMenuStrip.Opening += new System.ComponentModel.CancelEventHandler(this.contextMenuStrip_Opening); 84 | // 85 | // copyToolStripMenuItem 86 | // 87 | this.copyToolStripMenuItem.Name = "copyToolStripMenuItem"; 88 | this.copyToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.C))); 89 | this.copyToolStripMenuItem.Size = new System.Drawing.Size(157, 22); 90 | this.copyToolStripMenuItem.Text = "Copy"; 91 | this.copyToolStripMenuItem.Click += new System.EventHandler(this.copyToolStripMenuItem_Click); 92 | // 93 | // pasteToolStripMenuItem 94 | // 95 | this.pasteToolStripMenuItem.Name = "pasteToolStripMenuItem"; 96 | this.pasteToolStripMenuItem.ShortcutKeys = ((System.Windows.Forms.Keys)((System.Windows.Forms.Keys.Control | System.Windows.Forms.Keys.P))); 97 | this.pasteToolStripMenuItem.Size = new System.Drawing.Size(157, 22); 98 | this.pasteToolStripMenuItem.Text = "Paste"; 99 | this.pasteToolStripMenuItem.Click += new System.EventHandler(this.pasteToolStripMenuItem_Click); 100 | // 101 | // toolStripSeparator1 102 | // 103 | this.toolStripSeparator1.Name = "toolStripSeparator1"; 104 | this.toolStripSeparator1.Size = new System.Drawing.Size(154, 6); 105 | // 106 | // enterNewValueToolStripMenuItem 107 | // 108 | this.enterNewValueToolStripMenuItem.Name = "enterNewValueToolStripMenuItem"; 109 | this.enterNewValueToolStripMenuItem.Size = new System.Drawing.Size(157, 22); 110 | this.enterNewValueToolStripMenuItem.Text = "Enter new value"; 111 | this.enterNewValueToolStripMenuItem.Click += new System.EventHandler(this.enterNewValueToolStripMenuItem_Click); 112 | // 113 | // RegistersForm 114 | // 115 | this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); 116 | this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; 117 | this.ClientSize = new System.Drawing.Size(800, 450); 118 | this.Controls.Add(this.listView); 119 | this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon"))); 120 | this.Name = "RegistersForm"; 121 | this.Text = "Registers"; 122 | this.contextMenuStrip.ResumeLayout(false); 123 | this.ResumeLayout(false); 124 | 125 | } 126 | 127 | #endregion 128 | 129 | private System.Windows.Forms.ListView listView; 130 | private System.Windows.Forms.ContextMenuStrip contextMenuStrip; 131 | private System.Windows.Forms.ToolStripMenuItem copyToolStripMenuItem; 132 | private System.Windows.Forms.ToolStripMenuItem pasteToolStripMenuItem; 133 | private System.Windows.Forms.ToolStripSeparator toolStripSeparator1; 134 | private System.Windows.Forms.ToolStripMenuItem enterNewValueToolStripMenuItem; 135 | } 136 | } -------------------------------------------------------------------------------- /MEMAPI Debugger/Forms/RegistersForm.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.ComponentModel; 4 | using System.Data; 5 | using System.Drawing; 6 | using System.Linq; 7 | using System.Text; 8 | using System.Threading.Tasks; 9 | using System.Windows.Forms; 10 | using MEMAPI_Debugger.Dialogs; 11 | using MEMAPI; 12 | 13 | namespace MEMAPI_Debugger.Forms 14 | { 15 | public partial class RegistersForm : Form 16 | { 17 | Registers registers; 18 | 19 | public RegistersForm() 20 | { 21 | InitializeComponent(); 22 | 23 | registers = new Registers(); 24 | 25 | // Events 26 | API.GoEvent += onGo; 27 | API.StoppedEvent += onStopped; 28 | API.SteppedEvent += onStepped; 29 | 30 | refresh(); 31 | } 32 | 33 | private void onGo(object sender, EventArgs e) 34 | { 35 | if (InvokeRequired) 36 | { 37 | Invoke(new Action(onGo), sender, e); 38 | return; 39 | } 40 | 41 | registers = new Registers(); 42 | refresh(false); 43 | } 44 | 45 | private void onStopped(object sender, EventArgs e) 46 | { 47 | if (InvokeRequired) 48 | { 49 | Invoke(new Action(onStopped), sender, e); 50 | return; 51 | } 52 | 53 | refresh(); 54 | } 55 | 56 | private void onStepped(object sender, EventArgs e) 57 | { 58 | if (InvokeRequired) 59 | { 60 | Invoke(new Action(onStepped), sender, e); 61 | return; 62 | } 63 | 64 | refresh(); 65 | } 66 | 67 | private void refresh(bool download = true) 68 | { 69 | if (download) 70 | { 71 | API.ErrorCode error; 72 | if (!API.isConnected()) 73 | registers = new Registers(); 74 | else 75 | registers = API.getRegisters(out error); 76 | } 77 | 78 | string register = "register"; 79 | string rip = "rip"; 80 | string segment = "segment"; 81 | string other = "other"; 82 | 83 | listView.Items.Clear(); 84 | 85 | addItem(register, "RAX: " + Helper.ulongToString(registers.rax)); 86 | addItem(register, "RBX: " + Helper.ulongToString(registers.rbx)); 87 | addItem(register, "RCX: " + Helper.ulongToString(registers.rcx)); 88 | addItem(register, "RDX: " + Helper.ulongToString(registers.rdx)); 89 | addItem(register, "RSI: " + Helper.ulongToString(registers.rsi)); 90 | addItem(register, "RDI: " + Helper.ulongToString(registers.rdi)); 91 | addItem(register, "RBP: " + Helper.ulongToString(registers.rbp)); 92 | addItem(register, "RSP: " + Helper.ulongToString(registers.rsp)); 93 | addItem(register, "R08: " + Helper.ulongToString(registers.r8)); 94 | addItem(register, "R09: " + Helper.ulongToString(registers.r9)); 95 | addItem(register, "R10: " + Helper.ulongToString(registers.r10)); 96 | addItem(register, "R11: " + Helper.ulongToString(registers.r11)); 97 | addItem(register, "R12: " + Helper.ulongToString(registers.r12)); 98 | addItem(register, "R13: " + Helper.ulongToString(registers.r13)); 99 | addItem(register, "R14: " + Helper.ulongToString(registers.r14)); 100 | addItem(register, "R15: " + Helper.ulongToString(registers.r15)); 101 | 102 | addItem(rip, "RIP: " + Helper.ulongToString(registers.rip)); 103 | 104 | addItem(segment, "CS: " + Helper.ulongToString(registers.cs)); 105 | addItem(segment, "DS: " + Helper.ushortToString(registers.ds)); 106 | addItem(segment, "SS: " + Helper.ulongToString(registers.ss)); 107 | addItem(segment, "ES: " + Helper.ushortToString(registers.es)); 108 | addItem(segment, "FS: " + Helper.ushortToString(registers.fs)); 109 | addItem(segment, "GS: " + Helper.ushortToString(registers.gs)); 110 | 111 | addItem(other, "Flags: " + Helper.ulongToString(registers.rflags)); 112 | addItem(other, "Trap: " + Helper.uintToString(registers.trapno)); 113 | addItem(other, "Error: " + Helper.uintToString(registers.err)); 114 | } 115 | 116 | private void addItem(string group, string value) 117 | { 118 | ListViewItem item = new ListViewItem(value); 119 | item.Group = getGroup(group); 120 | listView.Items.Add(item); 121 | } 122 | 123 | private ListViewGroup getGroup(string tag) 124 | { 125 | foreach (ListViewGroup group in listView.Groups) 126 | { 127 | if (group.Tag.ToString() == tag) 128 | return group; 129 | } 130 | return null; 131 | } 132 | 133 | private void contextMenuStrip_Opening(object sender, CancelEventArgs e) 134 | { 135 | copyToolStripMenuItem.Enabled = listView.SelectedItems.Count > 0; 136 | pasteToolStripMenuItem.Enabled = listView.SelectedItems.Count > 0; 137 | enterNewValueToolStripMenuItem.Enabled = listView.SelectedItems.Count == 1; 138 | } 139 | 140 | private void copyToolStripMenuItem_Click(object sender, EventArgs e) 141 | { 142 | string toCopy = ""; 143 | foreach (ListViewItem item in listView.SelectedItems) 144 | toCopy += (item.Text.Split(new char[] { ' ' })[1]) + "\n"; 145 | 146 | toCopy = toCopy.TrimEnd(new char[] { '\n' }); 147 | if (toCopy != null && toCopy != "") 148 | Clipboard.SetText(toCopy); 149 | } 150 | 151 | private Registers setRegister(Registers regs, string register, string value) 152 | { 153 | switch (register) 154 | { 155 | case "RAX": 156 | regs.rax = Convert.ToUInt64(value, 16); 157 | break; 158 | case "RBX": 159 | regs.rbx = Convert.ToUInt64(value, 16); 160 | break; 161 | case "RCX": 162 | regs.rcx = Convert.ToUInt64(value, 16); 163 | break; 164 | case "RDX": 165 | regs.rdx = Convert.ToUInt64(value, 16); 166 | break; 167 | case "RSI": 168 | regs.rsi = Convert.ToUInt64(value, 16); 169 | break; 170 | case "RDI": 171 | regs.rdi = Convert.ToUInt64(value, 16); 172 | break; 173 | case "RBP": 174 | regs.rbp = Convert.ToUInt64(value, 16); 175 | break; 176 | case "RSP": 177 | regs.rsp = Convert.ToUInt64(value, 16); 178 | break; 179 | case "R08": 180 | regs.r8 = Convert.ToUInt64(value, 16); 181 | break; 182 | case "R09": 183 | regs.r9 = Convert.ToUInt64(value, 16); 184 | break; 185 | case "R10": 186 | regs.r10 = Convert.ToUInt64(value, 16); 187 | break; 188 | case "R11": 189 | regs.r11 = Convert.ToUInt64(value, 16); 190 | break; 191 | case "R12": 192 | regs.r12 = Convert.ToUInt64(value, 16); 193 | break; 194 | case "R13": 195 | regs.r13 = Convert.ToUInt64(value, 16); 196 | break; 197 | case "R14": 198 | regs.r14 = Convert.ToUInt64(value, 16); 199 | break; 200 | case "R15": 201 | regs.r15 = Convert.ToUInt64(value, 16); 202 | break; 203 | case "RIP": 204 | regs.rip = Convert.ToUInt64(value, 16); 205 | break; 206 | case "CS": 207 | regs.cs = Convert.ToUInt64(value, 16); 208 | break; 209 | case "DS": 210 | regs.ds = Convert.ToUInt16(value, 16); 211 | break; 212 | case "SS": 213 | regs.ss = Convert.ToUInt64(value, 16); 214 | break; 215 | case "ES": 216 | regs.ds = Convert.ToUInt16(value, 16); 217 | break; 218 | case "FS": 219 | regs.ds = Convert.ToUInt16(value, 16); 220 | break; 221 | case "GS": 222 | regs.ds = Convert.ToUInt16(value, 16); 223 | break; 224 | case "Flags": 225 | regs.rflags = Convert.ToUInt64(value, 16); 226 | break; 227 | case "Trap": 228 | regs.trapno = Convert.ToUInt32(value, 16); 229 | break; 230 | case "Error": 231 | regs.err = Convert.ToUInt32(value, 16); 232 | break; 233 | } 234 | return regs; 235 | } 236 | 237 | private void pasteToolStripMenuItem_Click(object sender, EventArgs e) 238 | { 239 | string[] values = Clipboard.GetText().Split(new char[] { '\r', '\n' }); 240 | if (values.Length != listView.SelectedItems.Count) 241 | { 242 | MessageBox.Show("Number of values in clipboard (" + values.Length + ") does not match the number of paste registers (" + listView.SelectedItems.Count + ").", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); 243 | return; 244 | } 245 | 246 | API.ErrorCode error; 247 | Registers regs = API.getRegisters(out error); 248 | 249 | if (error != API.ErrorCode.NO_ERROR) 250 | return; 251 | 252 | int i = 0; 253 | foreach (ListViewItem item in listView.SelectedItems) 254 | { 255 | try 256 | { 257 | string[] itemSplit = item.Text.Split(new char[] { ':' }); 258 | string register = itemSplit[0]; 259 | regs = setRegister(regs, register, values[i]); 260 | } 261 | catch { } 262 | i++; 263 | } 264 | 265 | API.setRegisters(regs); 266 | refresh(); 267 | } 268 | 269 | private void enterNewValueToolStripMenuItem_Click(object sender, EventArgs e) 270 | { 271 | if (listView.SelectedItems.Count == 0) 272 | return; 273 | 274 | ListViewItem item = listView.SelectedItems[0]; 275 | 276 | API.ErrorCode error; 277 | Registers regs = API.getRegisters(out error); 278 | 279 | if (error != API.ErrorCode.NO_ERROR) 280 | return; 281 | 282 | StringDialog dialog = new StringDialog("Enter new register value"); 283 | if (dialog.ShowDialog() == DialogResult.OK) 284 | { 285 | try 286 | { 287 | string[] itemSplit = item.Text.Split(new char[] { ':' }); 288 | string register = itemSplit[0]; 289 | regs = setRegister(regs, register, dialog.Message); 290 | API.setRegisters(regs); 291 | refresh(); 292 | } 293 | catch { } 294 | } 295 | } 296 | } 297 | } 298 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Helper.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Text; 5 | using System.Threading.Tasks; 6 | 7 | namespace MEMAPI_Debugger 8 | { 9 | public static class Helper 10 | { 11 | static readonly string[] SizeSuffixes = { "bytes", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB" }; 12 | 13 | public static string ulongToString(ulong input, bool padding = true) 14 | { 15 | string output = input.ToString("x").ToUpper(); 16 | if (padding) 17 | output = output.PadLeft(16, '0'); 18 | return output; 19 | } 20 | 21 | public static string longToString(long input, bool padding = true) 22 | { 23 | string output = input.ToString("x").ToUpper(); 24 | if (padding) 25 | output = output.PadLeft(16, '0'); 26 | return output; 27 | } 28 | 29 | public static string uintToString(uint input, bool padding = true) 30 | { 31 | string output = input.ToString("x").ToUpper(); 32 | if (padding) 33 | output = output.PadLeft(8, '0'); 34 | return output; 35 | } 36 | 37 | public static string ushortToString(ushort input, bool padding = true) 38 | { 39 | string output = input.ToString("x").ToUpper(); 40 | if (padding) 41 | output = output.PadLeft(4, '0'); 42 | return output; 43 | } 44 | 45 | public static string sizeToSuffix(ulong value, int decimalPlaces = 1) 46 | { 47 | int i = 0; 48 | decimal dValue = value; 49 | while (Math.Round(dValue, decimalPlaces) >= 1000) 50 | { 51 | dValue /= 1024; 52 | i++; 53 | } 54 | 55 | return string.Format("{0:n" + decimalPlaces + "} {1}", dValue, SizeSuffixes[i]).Replace(".0", ""); 56 | } 57 | 58 | public static byte[] stringToByteArray(string hex) 59 | { 60 | hex = hex.Replace(" ", "").Replace("\t", ""); 61 | return Enumerable.Range(0, hex.Length) 62 | .Where(x => x % 2 == 0) 63 | .Select(x => Convert.ToByte(hex.Substring(x, 2), 16)) 64 | .ToArray(); 65 | } 66 | } 67 | } 68 | -------------------------------------------------------------------------------- /MEMAPI Debugger/PS4.cs: -------------------------------------------------------------------------------- 1 | using MEMAPI; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Text; 6 | using System.Threading.Tasks; 7 | 8 | namespace MEMAPI_Debugger 9 | { 10 | [Serializable()] 11 | public class PS4 12 | { 13 | public string IP { get; set; } 14 | public string Name { get; set; } 15 | 16 | public PS4() 17 | { 18 | 19 | } 20 | 21 | public PS4(string name, string ip) 22 | { 23 | Name = name; 24 | IP = ip; 25 | } 26 | 27 | private string getStatus() 28 | { 29 | if (API.IP == IP) 30 | return API.isConnected() ? "Connected" : "Selected"; 31 | return "Disconnected"; 32 | } 33 | 34 | public string[] toArray() 35 | { 36 | return new string[] { Name, IP, getStatus() }; 37 | } 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Program.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | using System.Windows.Forms; 6 | 7 | namespace MEMAPI_Debugger 8 | { 9 | static class Program 10 | { 11 | /// 12 | /// The main entry point for the application. 13 | /// 14 | [STAThread] 15 | static void Main() 16 | { 17 | Application.EnableVisualStyles(); 18 | Application.SetCompatibleTextRenderingDefault(false); 19 | Application.Run(new Forms.MainForm()); 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("MEMAPI Debugger")] 9 | [assembly: AssemblyDescription("A PS4 Debugger allowing you to debug applications, read/write memory and view it's registers.")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("MEMAPI Debugger")] 13 | [assembly: AssemblyCopyright("Copyright © 2018")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("d0a07807-e46f-4699-92c2-c71c007e4a52")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Build and Revision Numbers 33 | // by using the '*' as shown below: 34 | // [assembly: AssemblyVersion("1.0.*")] 35 | [assembly: AssemblyVersion("1.0.0.0")] 36 | [assembly: AssemblyFileVersion("1.0.0.0")] 37 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Properties/Settings.Designer.cs: -------------------------------------------------------------------------------- 1 | //------------------------------------------------------------------------------ 2 | // 3 | // This code was generated by a tool. 4 | // Runtime Version:4.0.30319.42000 5 | // 6 | // Changes to this file may cause incorrect behavior and will be lost if 7 | // the code is regenerated. 8 | // 9 | //------------------------------------------------------------------------------ 10 | 11 | namespace MEMAPI_Debugger.Properties { 12 | 13 | 14 | [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] 15 | [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "15.7.0.0")] 16 | internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase { 17 | 18 | private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); 19 | 20 | public static Settings Default { 21 | get { 22 | return defaultInstance; 23 | } 24 | } 25 | 26 | [global::System.Configuration.UserScopedSettingAttribute()] 27 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 28 | [global::System.Configuration.DefaultSettingValueAttribute("")] 29 | public string ps4s { 30 | get { 31 | return ((string)(this["ps4s"])); 32 | } 33 | set { 34 | this["ps4s"] = value; 35 | } 36 | } 37 | 38 | [global::System.Configuration.UserScopedSettingAttribute()] 39 | [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] 40 | [global::System.Configuration.DefaultSettingValueAttribute("")] 41 | public string defaultPs4Ip { 42 | get { 43 | return ((string)(this["defaultPs4Ip"])); 44 | } 45 | set { 46 | this["defaultPs4Ip"] = value; 47 | } 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Properties/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Resource.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Drawing; 4 | using System.Drawing.Text; 5 | using System.IO; 6 | using System.Linq; 7 | using System.Reflection; 8 | using System.Runtime.InteropServices; 9 | using System.Text; 10 | using System.Threading.Tasks; 11 | 12 | namespace MEMAPI_Debugger 13 | { 14 | public static class Resource 15 | { 16 | public static string monospace = "DejaVuSansMono"; 17 | 18 | public static byte[] getResource(string name) 19 | { 20 | Stream fileStream = Assembly.GetExecutingAssembly().GetManifestResourceStream("MEMAPI_Debugger.Resources." + name); 21 | byte[] data = new byte[fileStream.Length]; 22 | fileStream.Read(data, 0, (int)fileStream.Length); 23 | fileStream.Close(); 24 | return data; 25 | } 26 | 27 | public static Font getCustomFont(string resource, int fontSize = 12) 28 | { 29 | PrivateFontCollection privateFontCollection = new PrivateFontCollection(); 30 | 31 | // Get font 32 | byte[] data = Resource.getResource(resource + ".ttf"); 33 | 34 | // Allocate a pointer and copy data 35 | System.IntPtr ptr = Marshal.AllocCoTaskMem((int)data.Length); 36 | Marshal.Copy(data, 0, ptr, (int)data.Length); 37 | 38 | // Add font 39 | privateFontCollection.AddMemoryFont(ptr, (int)data.Length); 40 | 41 | // Cleanup allocated memory 42 | Marshal.FreeCoTaskMem(ptr); 43 | 44 | return new Font(privateFontCollection.Families[0].Name, fontSize, FontStyle.Regular, GraphicsUnit.Pixel); ; 45 | } 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/DejaVuSansMono.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/DejaVuSansMono.ttf -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/attach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/attach.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/attach_eboot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/attach_eboot.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/blue_cog.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/blue_cog.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/breakpoint.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/breakpoint.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/breakpoint_pointer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/breakpoint_pointer.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/close_document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/close_document.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/connect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/connect.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/connected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/connected.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/detach.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/detach.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/disconnect.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/disconnect.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/disconnected.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/disconnected.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/document.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/document_info.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/document_info.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/exit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/exit.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/folder_open.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/folder_open.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/gear.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/gear.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/gears.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/gears.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/loading.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/loading.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/lock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/lock.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/logo.ico -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/logo.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/new_document.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/new_document.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/notify.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/notify.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/patreon_icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/patreon_icon.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/pause.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/pause.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/play.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/pointer.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/pointer.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/ps4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/ps4.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/refresh.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/refresh.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/right_arrow_stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/right_arrow_stop.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/save.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/save.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/save_as.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/save_as.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/send.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/step.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/step.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/stop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/stop.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/terminal.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/terminal.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/timer_off.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/timer_off.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/timer_on.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/timer_on.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/transparent.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/transparent.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/unlock.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/unlock.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/window.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/window_breakpoints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/window_breakpoints.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/window_disassembly.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/window_disassembly.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/window_kernels.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/window_kernels.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/window_memory.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/window_memory.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/window_registers.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/window_registers.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/icons/window_search.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/icons/window_search.png -------------------------------------------------------------------------------- /MEMAPI Debugger/Resources/memapi-server.bin: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/Resources/memapi-server.bin -------------------------------------------------------------------------------- /MEMAPI Debugger/logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/McCaulay/memapi-debugger/76344488ca56b3c6edaf01f2f6463d2ee79735b2/MEMAPI Debugger/logo.ico -------------------------------------------------------------------------------- /MEMAPI Debugger/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # MEMAPI Debugger 2 | This debugger is designed to be very similar to ProDG was on the PS3 so that users who were familiar with debugger on the PS3 should be able to pickup on this relatively easily. 3 | 4 | It allows you to have as many windows open as you want so you can have 4 memory views open if you require. It lets you do various things such as adding breakpoints, viewing memory, writing memory, reading registers, writing registers etc. 5 | 6 | ### Server API 7 | All the logic for handling incoming requests is done by the memapi-server payload. 8 | 9 | Repository Link: [memapi-server](https://github.com/McCaulay/memapi-server) 10 | 11 | ### Client Library API 12 | All of the logic for sending requests to the memapi-server is handled in the memapi-library. 13 | 14 | Repository Link: [memapi-library](https://github.com/McCaulay/memapi-library) 15 | 16 | ### Open Source 17 | I have decied to make all these resources i've been working on open source so that hopefully other developers will help improve this software for the entire PS4 community. 18 | There is a lot of things that can be done to improve this software however getting this far has already taken me weeks of continous development. 19 | 20 | ### Preview Images 21 | ![Overview](https://i.imgur.com/4xhwrY6.png) 22 | ![Rearrangement](https://i.imgur.com/crXjy0P.png) 23 | ![Write Memory](https://i.imgur.com/9DNNHg3.png) 24 | --------------------------------------------------------------------------------