Skip to content

Commit

Permalink
fix dump
Browse files Browse the repository at this point in the history
  • Loading branch information
wwh1004 committed Apr 14, 2021
1 parent c40b36a commit 490418d
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion ExtremeDumper.Common.props
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project>
<PropertyGroup>
<Title>ExtremeDumper</Title>
<Version>3.0.1.0</Version>
<Version>3.0.1.1</Version>
<Copyright>Copyright © 2018-2021 Wwh</Copyright>
<Description>.NET Assemblies Dumper</Description>
<ApplicationIcon>..\ExtremeDumper\Images\ExtremeDumper.ico</ApplicationIcon>
Expand Down
12 changes: 7 additions & 5 deletions ExtremeDumper/Dumping/NormalDumper.cs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ public int DumpProcess(string directoryPath) {
foreach (var pageInfo in _process.EnumeratePageInfos()) {
if (!IsValidPage(pageInfo))
continue;
byte[] page = new byte[Math.Min((int)pageInfo.Size, 0x2000)];
byte[] page = new byte[Math.Min((int)pageInfo.Size, 0x40000000)];
// 0x40000000 bytes = 1 giga bytes
if (!_process.TryReadBytes(pageInfo.Address, page))
continue;

Expand All @@ -72,10 +73,11 @@ public int DumpProcess(string directoryPath) {
continue;

fileName = EnsureValidFileName(fileName);
if (!IsSameFile(directoryPath, fileName, peImage, originalFileCache)) {
string filePath = Path.Combine(directoryPath, EnsureNoRepeatFileName(directoryPath, fileName));
File.WriteAllBytes(filePath, peImage);
}
if (IsSameFile(directoryPath, fileName, peImage, originalFileCache))
continue;

string filePath = Path.Combine(directoryPath, EnsureNoRepeatFileName(directoryPath, fileName));
File.WriteAllBytes(filePath, peImage);
count++;
}
}
Expand Down

0 comments on commit 490418d

Please sign in to comment.