public void X86Ps_FindLongBranches_Flat32() { var rdr = CreateImageReader( Address.Ptr32(0x00100000), 0x0F, 0x84, 0x02, 0x00, 0x00, 0x00, 0xC3, 0x90, 0xC3); var items = new X86PointerScanner32(rdr, new HashSet<uint> { 0x00100008u }, PointerScannerFlags.Jumps).ToArray(); Assert.AreEqual(1, items.Length); Assert.AreEqual(0x00100000u, items[0]); }
public void X86Ps_FindInboundCalls_Flat32() { var rdr = CreateImageReader( Address.Ptr32(0x00100000), 0x00, 0xE8, 0x02, 0x00, 0x00, 0x00, 0xC3, 0x90, 0xC3); var items = new X86PointerScanner32(rdr, new HashSet<uint> { 0x00100008u }, PointerScannerFlags.Calls).ToArray(); Assert.AreEqual(1, items.Length); Assert.AreEqual(0x00100001u, items[0]); }
public void X86Ps_FindShortBranches_Flat32() { var rdr = CreateImageReader( Address.Ptr32(0x00100000), 0x00, 0x74, 0x02, 0xC3, 0x90, 0xC3); var items = new X86PointerScanner32(rdr, new HashSet <uint> { 0x00100005u }, PointerScannerFlags.Jumps).ToArray(); Assert.AreEqual(1, items.Length); Assert.AreEqual(0x00100001u, items[0]); }
public void X86Ps_FindPointer_Flat32() { var rdr = CreateImageReader( Address.Ptr32(0x00100000), 0x22, 0x22, 0x22, 0x08, 0x00, 0x10, 0x00); var items = new X86PointerScanner32(rdr, new HashSet <uint> { 0x00100008u }, PointerScannerFlags.Pointers).ToArray(); Assert.AreEqual(1, items.Length); Assert.AreEqual(0x00100003u, items[0]); }
public void X86Ps_FindInboundCalls_Flat32() { var rdr = CreateImageReader( Address.Ptr32(0x00100000), 0x00, 0xE8, 0x02, 0x00, 0x00, 0x00, 0xC3, 0x90, 0xC3); var items = new X86PointerScanner32(rdr, new HashSet <uint> { 0x00100008u }, PointerScannerFlags.Calls).ToArray(); Assert.AreEqual(1, items.Length); Assert.AreEqual(0x00100001u, items[0]); }
public void X86Ps_FindPointer_Flat32() { var rdr = CreateImageReader( Address.Ptr32(0x00100000), 0x22, 0x22, 0x22, 0x08, 0x00, 0x10, 0x00); var items = new X86PointerScanner32(rdr, new HashSet<uint> { 0x00100008u }, PointerScannerFlags.Pointers).ToArray(); Assert.AreEqual(1, items.Length); Assert.AreEqual(0x00100003u, items[0]); }