Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jul 10th, 2012  |  syntax: C  |  size: 0.47 KB  |  hits: 19  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. ULONG NTAPI hNtQueryVirtualMemory(HANDLE ProcessHandle, PVOID BaseAddress, MEMORY_INFORMATION_CLASS MemoryInformationClass, PVOID MemoryInformation, ULONG MemoryInformationLength, PULONG ReturnLength) {
  2.   removeJMPHook(&hiNtQueryVirtualMemory);
  3.  
  4.   ULONG x = NtQueryVirtualMemory(ProcessHandle, BaseAddress, MemoryInformationClass, MemoryInformation, MemoryInformationLength, ReturnLength);
  5.  
  6.   setJMPHook(&hiNtQueryVirtualMemory, hNtQueryVirtualMemory);
  7.   return x;
  8. }