Skip to content

Commit

Permalink
Small project cleanup and add support file extended opcodes
Browse files Browse the repository at this point in the history
  • Loading branch information
MishaTy committed Feb 28, 2021
1 parent 5963aef commit 8136025
Show file tree
Hide file tree
Showing 16 changed files with 304 additions and 401 deletions.
8 changes: 4 additions & 4 deletions LibDotNetParser/CILApi/DotNetFile.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ namespace LibDotNetParser.CILApi
{
public class DotNetFile
{
PEParaser peFile;
public PEParaser Backend
PEFile peFile;
public PEFile Backend
{
get { return peFile; }
}
Expand Down Expand Up @@ -49,12 +49,12 @@ public DotNetMethod EntryPoint
}
public DotNetFile(string Path)
{
peFile = new PEParaser(Path);
peFile = new PEFile(Path);
}

public DotNetFile(byte[] file)
{
peFile = new PEParaser(file);
peFile = new PEFile(file);
}
}
}
6 changes: 3 additions & 3 deletions LibDotNetParser/CILApi/DotNetMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace LibDotNetParser.CILApi
{
public class DotNetMethod
{
private PEParaser file;
private PEFile file;
private DotNetFile file2;
private MethodTabelRow method;

Expand All @@ -24,7 +24,7 @@ public uint Offset
{
get
{
return (uint)PEParaser.RelativeVirtualAddressToFileOffset(RVA, file.PeHeader.Sections);
return (uint)PEFile.RelativeVirtualAddressToFileOffset(RVA, file.PeHeader.Sections);
}
}
public DotNetFile File
Expand All @@ -49,7 +49,7 @@ public bool IsStatic
/// <param name="file"></param>
/// <param name="item"></param>
/// <param name="parrent"></param>
public DotNetMethod(PEParaser file, MethodTabelRow item, DotNetType parrent)
public DotNetMethod(PEFile file, MethodTabelRow item, DotNetType parrent)
{
this.file = file;
this.method = item;
Expand Down
2 changes: 1 addition & 1 deletion LibDotNetParser/CILApi/DotNetType.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace LibDotNetParser.CILApi
{
public class DotNetType
{
private PEParaser file;
private PEFile file;
private TypeDefTabelRow type;
private TypeFlags flags;
private int NextTypeIndex;
Expand Down
Loading

0 comments on commit 8136025

Please sign in to comment.