diff --git a/PointerSearcher/Form1.Designer.cs b/PointerSearcher/Form1.Designer.cs index 9e5946d..b16b23d 100644 --- a/PointerSearcher/Form1.Designer.cs +++ b/PointerSearcher/Form1.Designer.cs @@ -29,10 +29,10 @@ protected override void Dispose(bool disposing) private void InitializeComponent() { this.components = new System.ComponentModel.Container(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle6 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle5 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle7 = new System.Windows.Forms.DataGridViewCellStyle(); - System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle8 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle2 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle1 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle3 = new System.Windows.Forms.DataGridViewCellStyle(); + System.Windows.Forms.DataGridViewCellStyle dataGridViewCellStyle4 = new System.Windows.Forms.DataGridViewCellStyle(); this.buttonRead = new System.Windows.Forms.Button(); this.txtPointerSearchResults = new System.Windows.Forms.TextBox(); this.dgvDumpTargets = new System.Windows.Forms.DataGridView(); @@ -212,6 +212,7 @@ private void InitializeComponent() this.groupBox4 = new System.Windows.Forms.GroupBox(); this.button10 = new System.Windows.Forms.Button(); this.button11 = new System.Windows.Forms.Button(); + this.button12 = new System.Windows.Forms.Button(); ((System.ComponentModel.ISupportInitialize)(this.dgvDumpTargets)).BeginInit(); this.tabControl1.SuspendLayout(); this.tabPage1.SuspendLayout(); @@ -278,8 +279,8 @@ private void InitializeComponent() this.dgvDumpTargets.Name = "dgvDumpTargets"; this.dgvDumpTargets.RowHeadersVisible = false; this.dgvDumpTargets.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing; - dataGridViewCellStyle6.NullValue = null; - this.dgvDumpTargets.RowsDefaultCellStyle = dataGridViewCellStyle6; + dataGridViewCellStyle2.NullValue = null; + this.dgvDumpTargets.RowsDefaultCellStyle = dataGridViewCellStyle2; this.dgvDumpTargets.RowTemplate.Height = 21; this.dgvDumpTargets.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.CellSelect; this.dgvDumpTargets.Size = new System.Drawing.Size(1088, 163); @@ -345,8 +346,8 @@ private void InitializeComponent() // ColumnFileRow // this.ColumnFileRow.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.None; - dataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; - this.ColumnFileRow.DefaultCellStyle = dataGridViewCellStyle5; + dataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter; + this.ColumnFileRow.DefaultCellStyle = dataGridViewCellStyle1; this.ColumnFileRow.HeaderText = "File"; this.ColumnFileRow.MinimumWidth = 25; this.ColumnFileRow.Name = "ColumnFileRow"; @@ -1036,17 +1037,17 @@ private void InitializeComponent() // fromDataGridViewTextBoxColumn // this.fromDataGridViewTextBoxColumn.DataPropertyName = "From"; - dataGridViewCellStyle7.Format = "X10"; - dataGridViewCellStyle7.NullValue = null; - this.fromDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle7; + dataGridViewCellStyle3.Format = "X10"; + dataGridViewCellStyle3.NullValue = null; + this.fromDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle3; this.fromDataGridViewTextBoxColumn.HeaderText = "From"; this.fromDataGridViewTextBoxColumn.Name = "fromDataGridViewTextBoxColumn"; // // toDataGridViewTextBoxColumn // this.toDataGridViewTextBoxColumn.DataPropertyName = "To"; - dataGridViewCellStyle8.Format = "X10"; - this.toDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle8; + dataGridViewCellStyle4.Format = "X10"; + this.toDataGridViewTextBoxColumn.DefaultCellStyle = dataGridViewCellStyle4; this.toDataGridViewTextBoxColumn.HeaderText = "To"; this.toDataGridViewTextBoxColumn.Name = "toDataGridViewTextBoxColumn"; // @@ -1870,11 +1871,22 @@ private void InitializeComponent() this.button11.UseVisualStyleBackColor = true; this.button11.Click += new System.EventHandler(this.button11_Click_1); // + // button12 + // + this.button12.Location = new System.Drawing.Point(862, 498); + this.button12.Name = "button12"; + this.button12.Size = new System.Drawing.Size(75, 23); + this.button12.TabIndex = 103; + this.button12.Text = "button12"; + this.button12.UseVisualStyleBackColor = true; + this.button12.Click += new System.EventHandler(this.button12_Click); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font; this.ClientSize = new System.Drawing.Size(1114, 660); + this.Controls.Add(this.button12); this.Controls.Add(this.button11); this.Controls.Add(this.button10); this.Controls.Add(this.button8); @@ -2132,6 +2144,7 @@ private void InitializeComponent() private System.Windows.Forms.DataGridViewTextBoxColumn Address1; private System.Windows.Forms.DataGridViewTextBoxColumn Label; private System.Windows.Forms.Button button11; + private System.Windows.Forms.Button button12; } } diff --git a/PointerSearcher/Form1.cs b/PointerSearcher/Form1.cs index 343300e..6b98e66 100644 --- a/PointerSearcher/Form1.cs +++ b/PointerSearcher/Form1.cs @@ -882,7 +882,7 @@ private void getstatus_Click( object sender, EventArgs e ) c = s.Receive( b ); count = BitConverter.ToInt32( k, 0 ); statusBox.Text = Convert.ToString( b[0] ) + " . " + Convert.ToString( b[1] ) + " . " + Convert.ToString( b[2] ) + " . " + Convert.ToString( b[3] ); - if ( b[3] >= 152 ) { statusBox.BackColor = System.Drawing.Color.LightGreen; } + if ( b[3] >= 153 ) { statusBox.BackColor = System.Drawing.Color.LightGreen; } else { statusBox.BackColor = System.Drawing.Color.Red; @@ -1054,6 +1054,20 @@ private bool noerror() s.Receive( b ); return !showerror( b ); } + private bool resolvepointers( ref byte[] inbuf, ref byte[] outbuf ) + { + if ( !command_available() ) + { + return false; + } + int a = SendMessage( NoexsCommands.ResolvePointers ); + a = SendData( inbuf ); + int size = BitConverter.ToInt32( inbuf, 0 ); + outbuf = new byte[size*22]; + while ( s.Available < size*22 ) { } + s.Receive( outbuf ); + return noerror(); + } private bool readmemblock(ref byte[] outbuf, long address, int size) { if ( !command_available() ) @@ -1069,14 +1083,14 @@ private bool readmemblock(ref byte[] outbuf, long address, int size) a = SendData( BitConverter.GetBytes( size ) ); if ( noerror() ) { - while (size >0) + while ( size > 0 ) { if ( noerror() ) { while ( s.Available < 5 ) { } s.Receive( k ); len = BitConverter.ToInt32( k, 1 ); - if (k[0] == 0) // no compression + if ( k[0] == 0 ) // no compression { inbuf = new byte[len]; while ( s.Available < len ) { } @@ -1105,11 +1119,12 @@ private bool readmemblock(ref byte[] outbuf, long address, int size) pos += urlesize; size -= urlesize; } - } - - } - + } else return false; + + } + } + else return false; return noerror(); } private int SendMessage( NoexsCommands cmd ) @@ -2088,5 +2103,28 @@ private void button11_Click_1( Object sender, EventArgs e ) readmemblock( ref outbuf, targetAddress, size ); int a = 1; } + + private void button12_Click( Object sender, EventArgs e ) + { + byte[] inbuf= { }, outbuf= { }; + UInt32 size = 1; + Int16 depth = 6; + UInt32 offset1=0x487FEB0, offset2=0xb8, offset3=8, offset4=0xA0, offset5=0x78, offset6=0xb4; + inbuf = inbuf.Concat(BitConverter.GetBytes( size )).ToArray(); + inbuf = inbuf.Concat( BitConverter.GetBytes( depth ) ).ToArray(); + inbuf = inbuf.Concat( BitConverter.GetBytes( offset1 ) ).ToArray(); + inbuf = inbuf.Concat( BitConverter.GetBytes( offset2 ) ).ToArray(); + inbuf = inbuf.Concat( BitConverter.GetBytes( offset3 ) ).ToArray(); + inbuf = inbuf.Concat( BitConverter.GetBytes( offset4 ) ).ToArray(); + inbuf = inbuf.Concat( BitConverter.GetBytes( offset5 ) ).ToArray(); + inbuf = inbuf.Concat( BitConverter.GetBytes( offset6 ) ).ToArray(); + resolvepointers( ref inbuf, ref outbuf ); + int idx = BitConverter.ToInt32( outbuf, 0 ) + 1; // index to the list of candidates + depth = BitConverter.ToInt16( outbuf, 4 ); //last depth, match set depth means good otherwise at the depth the value is probably no good so can't continue + long address = BitConverter.ToInt64( outbuf, 6 ); // last address + long value = BitConverter.ToInt64( outbuf, 14 ); // value at last address if the read was successful otherwise the value of last successful read + + int a = 1; + } } } diff --git a/PointerSearcher/Form1.resx b/PointerSearcher/Form1.resx index f616c65..bf35bdd 100644 --- a/PointerSearcher/Form1.resx +++ b/PointerSearcher/Form1.resx @@ -153,18 +153,6 @@ True - - True - - - True - - - True - - - 17, 17 - 17, 17 @@ -177,30 +165,12 @@ True - - True - - - True - - - True - True True - - True - - - True - - - 116, 17 - 116, 17 diff --git a/PointerSearcher/NoexsCommands.cs b/PointerSearcher/NoexsCommands.cs index c0fb958..f52d0ce 100644 --- a/PointerSearcher/NoexsCommands.cs +++ b/PointerSearcher/NoexsCommands.cs @@ -31,6 +31,7 @@ public enum NoexsCommands AttachDmnt = 0x1A, GetBookmark = 0x1B, PutBookmark = 0x1C, - DmntResume = 0x1D + DmntResume = 0x1D, + ResolvePointers = 0x1E } }