Skip to content

Commit

Permalink
Fixed bug with IAT table.
Browse files Browse the repository at this point in the history
  • Loading branch information
lkinsella committed Jan 19, 2016
1 parent 9aab794 commit 9114c15
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Src/Demo Application/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ static void Main(string[] args)
{
//string file_name = Environment.GetCommandLineArgs()[0];
//string file_name = @"C:\Windows\SysWOW64\kernel32.dll";
//string file_name = @"C:\Windows\SysWOW64\shell32.dll";
string file_name = @"C:\Windows\SysWOW64\shell32.dll";
//string file_name = @"C:\Windows\SysWOW64\xpsservices.dll";
string file_name = @"c:\windows\system32\advapi32.dll";
//string file_name = @"c:\windows\system32\advapi32.dll";
ExeReader reader = ExeReader.FromFile(file_name);
Section[] sections = reader.Sections.ToArray();

Expand Down
2 changes: 1 addition & 1 deletion Src/Workshell.PE/Imports/ImportContent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ private void LoadIAT(Stream stream)
long iat_offset = 0;

if (entry.FirstThunk != 0)
iat_offset = Convert.ToInt32(Section.RVAToOffset(entry.OriginalFirstThunk));
iat_offset = Convert.ToInt32(Section.RVAToOffset(entry.FirstThunk));

if (iat_offset == 0)
return;
Expand Down

0 comments on commit 9114c15

Please sign in to comment.