public static void DisableAccessToMemoryOfProcess(MemoryLayout OriginalMemoryLayout) { ProcessManager.CurrentProcess.TheMemoryLayout = OriginalMemoryLayout; OriginalMemoryLayout.Load(ProcessManager.CurrentProcess.UserMode); }
public MemoryLayout Merge(MemoryLayout y) { MemoryLayout result = new MemoryLayout(); for (int i = 0; i < CodePages.Keys.Count; i++) { uint vAddr = CodePages.Keys[i]; uint pAddr = CodePages[vAddr]; result.AddCodePage(pAddr, vAddr); } for (int i = 0; i < DataPages.Keys.Count; i++) { uint vAddr = DataPages.Keys[i]; uint pAddr = DataPages[vAddr]; result.AddDataPage(pAddr, vAddr); } for (int i = 0; i < y.CodePages.Keys.Count; i++) { uint vAddr = y.CodePages.Keys[i]; uint pAddr = y.CodePages[vAddr]; result.AddCodePage(pAddr, vAddr); } for (int i = 0; i < y.DataPages.Keys.Count; i++) { uint vAddr = y.DataPages.Keys[i]; uint pAddr = y.DataPages[vAddr]; result.AddDataPage(pAddr, vAddr); } return result; }
public void Unmerge(MemoryLayout y) { UInt32Dictionary.Iterator iterator = y.CodePages.GetIterator(); while (iterator.HasNext()) { UInt32Dictionary.KeyValuePair pair = iterator.Next(); uint vAddr = pair.Key; uint pAddr = pair.Value; RemovePage(vAddr); } iterator = y.DataPages.GetIterator(); while (iterator.HasNext()) { UInt32Dictionary.KeyValuePair pair = iterator.Next(); uint vAddr = pair.Key; uint pAddr = pair.Value; RemovePage(vAddr); } }