Rename PE namespace
This commit is contained in:
parent
c5d9cc47ba
commit
c756d543c1
|
@ -19,7 +19,7 @@
|
|||
|
||||
using System.IO;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public class Cor20Header : IFileLocation {
|
||||
public uint cb;
|
||||
public ushort majorRuntimeVersion;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
using System.IO;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public struct DataDirectory {
|
||||
public uint virtualAddress;
|
||||
public uint size;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
using System.IO;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public class DotNetStream : IFileLocation {
|
||||
public string name;
|
||||
public uint fileOffset;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
using System.IO;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public enum Machine : ushort {
|
||||
i386 = 0x14C,
|
||||
ia64 = 0x200,
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public interface IFileLocation {
|
||||
uint Offset { get; }
|
||||
uint Length { get; }
|
||||
|
|
|
@ -21,7 +21,7 @@ using System;
|
|||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public class Metadata : IFileLocation {
|
||||
uint magic;
|
||||
ushort majorVersion, minorVersion;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
using MVT = MetadataVarType;
|
||||
|
||||
public class MetadataTables {
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public enum MetadataIndex {
|
||||
iModule = 0,
|
||||
iTypeRef = 1,
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
enum MetadataVarType {
|
||||
end,
|
||||
stop,
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
using System.IO;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public class OptionalHeader : IFileLocation {
|
||||
public ushort magic;
|
||||
public byte majorLinkerVersion;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public class PeImage {
|
||||
BinaryReader reader;
|
||||
BinaryWriter writer;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
along with de4dot. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public class ResourceData : ResourceDirectoryEntry {
|
||||
uint rva;
|
||||
uint size;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public class ResourceDirectory : ResourceDirectoryEntry {
|
||||
Resources resources;
|
||||
int offset;
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public abstract class ResourceDirectoryEntry {
|
||||
protected readonly string name;
|
||||
protected readonly int id;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public class Resources {
|
||||
BinaryReader reader;
|
||||
uint startOffset;
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
using System.IO;
|
||||
using System.Text;
|
||||
|
||||
namespace de4dot.code.PE {
|
||||
namespace de4dot.PE {
|
||||
public class SectionHeader : IFileLocation {
|
||||
public byte[] name;
|
||||
public uint virtualSize;
|
||||
|
|
|
@ -30,7 +30,7 @@ using de4dot.blocks;
|
|||
using de4dot.blocks.cflow;
|
||||
using de4dot.code.AssemblyClient;
|
||||
using de4dot.code.renamer;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code {
|
||||
public class ObfuscatedFile : IObfuscatedFile, IDeobfuscatedFile {
|
||||
|
|
|
@ -21,7 +21,7 @@ using System.Collections.Generic;
|
|||
using Mono.Cecil;
|
||||
using Mono.MyStuff;
|
||||
using de4dot.blocks;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.CliSecure {
|
||||
public class DeobfuscatorInfo : DeobfuscatorInfoBase {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using Mono.MyStuff;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.CliSecure {
|
||||
class CodeHeader {
|
||||
|
@ -163,7 +163,7 @@ namespace de4dot.code.deobfuscators.CliSecure {
|
|||
return false;
|
||||
|
||||
var metadataTables = peImage.Cor20Header.createMetadataTables();
|
||||
var methodDefTable = metadataTables.getMetadataType(PE.MetadataIndex.iMethodDef);
|
||||
var methodDefTable = metadataTables.getMetadataType(MetadataIndex.iMethodDef);
|
||||
if (methodDefTable.totalSize != codeHeader.methodDefElemSize)
|
||||
return false;
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ using Mono.Cecil.Cil;
|
|||
using Mono.Cecil.Metadata;
|
||||
using Mono.MyStuff;
|
||||
using de4dot.blocks;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.CodeVeil {
|
||||
class MethodsDecrypter {
|
||||
|
|
|
@ -24,7 +24,7 @@ using Mono.Cecil.Cil;
|
|||
using Mono.MyStuff;
|
||||
using de4dot.blocks;
|
||||
using de4dot.blocks.cflow;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators {
|
||||
abstract class DeobfuscatorBase : IDeobfuscator, IWriterListener {
|
||||
|
|
|
@ -24,7 +24,7 @@ using Mono.MyStuff;
|
|||
using de4dot.blocks;
|
||||
using de4dot.blocks.cflow;
|
||||
using de4dot.code.renamer;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators {
|
||||
public interface IDeobfuscatorOptions {
|
||||
|
|
|
@ -22,7 +22,7 @@ using System.Collections.Generic;
|
|||
using System.IO;
|
||||
using System.Text;
|
||||
using Mono.MyStuff;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.MaxtoCode {
|
||||
// Decrypts methods and resources
|
||||
|
|
|
@ -23,7 +23,7 @@ using System.IO;
|
|||
using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using Mono.Cecil;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.dotNET_Reactor.v3 {
|
||||
class IniFile {
|
||||
|
|
|
@ -22,7 +22,7 @@ using System.Collections.Generic;
|
|||
using System.Text;
|
||||
using Mono.Cecil;
|
||||
using de4dot.blocks;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.dotNET_Reactor.v3 {
|
||||
// Find the type that decrypts strings and calls the native lib
|
||||
|
|
|
@ -25,7 +25,7 @@ using Mono.Cecil;
|
|||
using Mono.Cecil.Cil;
|
||||
using Mono.MyStuff;
|
||||
using de4dot.blocks;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.dotNET_Reactor.v3 {
|
||||
public class DeobfuscatorInfo : DeobfuscatorInfoBase {
|
||||
|
|
|
@ -23,7 +23,7 @@ using System.IO;
|
|||
using Mono.Cecil;
|
||||
using de4dot.blocks;
|
||||
using de4dot.blocks.cflow;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.dotNET_Reactor.v3 {
|
||||
class MemoryPatcher {
|
||||
|
|
|
@ -25,7 +25,7 @@ using Mono.Cecil;
|
|||
using Mono.Cecil.Cil;
|
||||
using Mono.MyStuff;
|
||||
using de4dot.blocks;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.dotNET_Reactor.v4 {
|
||||
public class DeobfuscatorInfo : DeobfuscatorInfoBase {
|
||||
|
|
|
@ -24,7 +24,7 @@ using Mono.Cecil;
|
|||
using Mono.Cecil.Cil;
|
||||
using Mono.MyStuff;
|
||||
using de4dot.blocks;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.dotNET_Reactor.v4 {
|
||||
class MethodsDecrypter {
|
||||
|
@ -170,7 +170,7 @@ namespace de4dot.code.deobfuscators.dotNET_Reactor.v4 {
|
|||
// DNR 4.0 - 4.4 (jitter is hooked)
|
||||
|
||||
var metadataTables = peImage.Cor20Header.createMetadataTables();
|
||||
var methodDef = metadataTables.getMetadataType(PE.MetadataIndex.iMethodDef);
|
||||
var methodDef = metadataTables.getMetadataType(MetadataIndex.iMethodDef);
|
||||
var rvaToIndex = new Dictionary<uint, int>((int)methodDef.rows);
|
||||
uint offset = methodDef.fileOffset;
|
||||
for (int i = 0; i < methodDef.rows; i++) {
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
using System;
|
||||
using System.IO;
|
||||
using ICSharpCode.SharpZipLib.Zip.Compression;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.dotNET_Reactor.v4 {
|
||||
class NativeImageUnpacker {
|
||||
|
|
|
@ -23,7 +23,7 @@ using System.Collections.Generic;
|
|||
using Mono.Cecil;
|
||||
using Mono.Cecil.Cil;
|
||||
using de4dot.blocks;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.code.deobfuscators.dotNET_Reactor.v4 {
|
||||
class StringDecrypter {
|
||||
|
|
|
@ -25,7 +25,7 @@ using System.Reflection;
|
|||
using Mono.MyStuff;
|
||||
using Mono.Cecil;
|
||||
using de4dot.blocks;
|
||||
using de4dot.code.PE;
|
||||
using de4dot.PE;
|
||||
|
||||
namespace de4dot.mdecrypt {
|
||||
public class DynamicMethodsDecrypter {
|
||||
|
@ -90,7 +90,7 @@ namespace de4dot.mdecrypt {
|
|||
IntPtr ourCompMem;
|
||||
bool compileMethodIsThisCall;
|
||||
|
||||
de4dot.code.PE.MetadataType methodDefTable;
|
||||
de4dot.PE.MetadataType methodDefTable;
|
||||
IntPtr methodDefTablePtr;
|
||||
ModuleDefinition monoModule;
|
||||
MethodDefinition moduleCctor;
|
||||
|
|
Loading…
Reference in New Issue
Block a user