Skip to content

Commit

Permalink
Started a demo console application that dumps executable information.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkinsella committed Jul 13, 2016
1 parent d5c4cb2 commit 222e204
Show file tree
Hide file tree
Showing 9 changed files with 2,057 additions and 6 deletions.
15 changes: 11 additions & 4 deletions Src/Debug Application/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ static void Main(string[] args)
//string file_name = Assembly.GetEntryAssembly().Location;
//string file_name = @"C:\Windows\SysWOW64\kernel32.dll";
//string file_name = @"C:\Windows\System32\kernel32.dll";
string file_name = @"C:\Windows\SysWOW64\shell32.dll";
//string file_name = @"C:\Windows\SysWOW64\shell32.dll";
//string file_name = @"C:\Windows\System32\shell32.dll";
//string file_name = @"C:\Windows\System32\user32.dll";
string file_name = @"C:\Windows\System32\user32.dll";
//string file_name = @"C:\Windows\explorer.exe";
//string file_name = @"C:\Windows\SysWOW64\xpsservices.dll";
//string file_name = @"c:\windows\system32\advapi32.dll";
Expand All @@ -42,11 +42,18 @@ static void Main(string[] args)

ExecutableImage image = ExecutableImage.FromFile(file_name);
ResourceCollection resources = ResourceCollection.Get(image);

ResourceType group_types = resources.First(t => t.Id == ResourceType.RT_GROUP_CURSOR);
Resource group_resource = group_types.First(r => r.Id == 100);
CursorGroupResource cursor_group_resource = CursorGroupResource.Load(group_resource);

ResourceType types = resources.First(t => t.Id == ResourceType.RT_CURSOR);
Resource resource = types.First(r => r.Id == 97);
Resource resource = types.First(r => r.Id == 92);
CursorResource cursor_resource = CursorResource.Load(resource);

cursor_resource.Save(@"D:\test.cur");
Bitmap bitmap = cursor_resource.ToBitmap();

bitmap.Save(@"D:\test.bmp");

}

Expand Down
6 changes: 6 additions & 0 deletions Src/PE Dump/App.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
Loading

0 comments on commit 222e204

Please sign in to comment.