public void ReloadValues(Memory memory) { foreach (var spiderMatch in Matches) { foreach (var searchData in SearchData) { if (Is64Bit) { long[] addresses = new long[spiderMatch.Level]; for (int x = 0; x < spiderMatch.Level; x++) { if (x == 0) { addresses[x] = searchData.BaseAddress + spiderMatch.GetOffset(x); } else { addresses[x] = spiderMatch.GetOffset(x); } } var mapping64 = new LongMemoryObject(memory, null, addresses); var currentValue = mapping64.ReadValue(DataType, (int)spiderMatch.GetOffset(spiderMatch.Level), StringLength).ToString(); var searchValue = spiderMatch.Values.FirstOrDefault(o => o.Address == searchData.BaseAddress); if (searchValue != null) { searchValue.Current = currentValue; } } else { } } } }
public object ReadValue(Memory memory, DataType dataType, bool is64Bit, long address, int stringLength = 200) { if (is64Bit) { long[] addresses = new long[Level]; for (int x = 0; x < Level; x++) { if (x == 0) { addresses[x] = address + GetOffset(x); } else { addresses[x] = GetOffset(x); } } var mapping64 = new LongMemoryObject(memory, null, addresses); return(mapping64.ReadValue(dataType, (int)GetOffset(Level), stringLength).ToString()); } else { int[] addresses = new int[Level]; for (int x = 0; x < Level; x++) { if (x == 0) { addresses[x] = (int)address + (int)GetOffset(x); } else { addresses[x] = (int)GetOffset(x); } } var mapping64 = new IntMemoryObject(memory, null, addresses); return(mapping64.ReadValue(dataType, (int)GetOffset(Level), stringLength).ToString()); } }