Fix compiler errors (on mono) (#123)
This commit is contained in:
parent
cf19456dd6
commit
126758fa6f
|
@ -1233,7 +1233,7 @@ namespace de4dot.blocks.cflow {
|
|||
}
|
||||
|
||||
void Emulate_Ldfld(Instruction instr) {
|
||||
var val1 = valueStack.Pop();
|
||||
/*var val1 =*/ valueStack.Pop();
|
||||
EmulateLoadField(instr.Operand as IField);
|
||||
}
|
||||
|
||||
|
|
|
@ -407,9 +407,14 @@
|
|||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>mkdir "..\$(OutDir)..\LICENSES"
|
||||
<PostBuildEvent Condition="'$(OS)' != 'Unix'">mkdir "..\$(OutDir)..\LICENSES"
|
||||
copy "$(SolutionDir)LICENSE*.txt" "..\$(OutDir)..\LICENSES"
|
||||
copy "$(SolutionDir)COPYING" "..\$(OutDir)..\LICENSES"</PostBuildEvent>
|
||||
<PostBuildEvent Condition="'$(OS)' == 'Unix'">
|
||||
mkdir -p "../$(OutDir)../LICENSES/"
|
||||
cp "$(SolutionDir)LICENSE"*.txt "../$(OutDir)../LICENSES/"
|
||||
cp "$(SolutionDir)COPYING" "../$(OutDir)../LICENSES/"
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
|
||||
Other similar extension points exist, see Microsoft.Common.targets.
|
||||
|
@ -418,4 +423,4 @@ copy "$(SolutionDir)COPYING" "..\$(OutDir)..\LICENSES"</PostBuildEvent>
|
|||
<Target Name="AfterBuild">
|
||||
</Target>
|
||||
-->
|
||||
</Project>
|
||||
</Project>
|
||||
|
|
|
@ -50,7 +50,7 @@ namespace de4dot.code.deobfuscators.Agile_NET.vm {
|
|||
vmIndexToCil.Clear();
|
||||
|
||||
var newInstructions = ReadInstructions(cilMethod, csvmMethod);
|
||||
var newLocals = ReadLocals(cilMethod, csvmMethod);
|
||||
/*var newLocals =*/ ReadLocals(cilMethod, csvmMethod);
|
||||
var newExceptions = ReadExceptions(cilMethod, csvmMethod);
|
||||
|
||||
FixInstructionOperands(newInstructions);
|
||||
|
|
|
@ -451,7 +451,7 @@ namespace de4dot.code.deobfuscators.Agile_NET.vm.v2 {
|
|||
}
|
||||
|
||||
Instruction Handler_Ret(BinaryReader reader) {
|
||||
var method = resolver.ResolveToken(reader.ReadUInt32(), gpContext) as IMethod;
|
||||
/*var method =*/ resolver.ResolveToken(reader.ReadUInt32(), gpContext) /*as IMethod*/;
|
||||
return OpCodes.Ret.ToInstruction();
|
||||
}
|
||||
|
||||
|
@ -486,7 +486,7 @@ namespace de4dot.code.deobfuscators.Agile_NET.vm.v2 {
|
|||
|
||||
Instruction Handler_Stloc(BinaryReader reader) {
|
||||
ushort loc = reader.ReadUInt16();
|
||||
var etype = (ElementType)reader.ReadInt32();
|
||||
/*var etype = (ElementType)*/reader.ReadInt32();
|
||||
return new Instruction(OpCodes.Stloc, new LocalOperand(loc));
|
||||
}
|
||||
|
||||
|
|
|
@ -54,10 +54,10 @@ namespace de4dot.code.deobfuscators.Babel_NET {
|
|||
Dictionary<string, int> methodOffsets;
|
||||
List<TypeSig> typeRefs;
|
||||
MemberRefConverter memberRefConverter;
|
||||
IDeobfuscatorContext deobfuscatorContext;
|
||||
//IDeobfuscatorContext deobfuscatorContext;
|
||||
|
||||
public ImageReader(IDeobfuscatorContext deobfuscatorContext, ModuleDefMD module, byte[] data) {
|
||||
this.deobfuscatorContext = deobfuscatorContext;
|
||||
//this.deobfuscatorContext = deobfuscatorContext;
|
||||
this.module = module;
|
||||
this.reader = MemoryImageStream.Create(data);
|
||||
this.memberRefConverter = new MemberRefConverter(module);
|
||||
|
|
|
@ -129,7 +129,7 @@ namespace de4dot.code.deobfuscators.Babel_NET {
|
|||
|
||||
// 3.0 - 3.5 don't have this field
|
||||
if (headerData[(int)reader.BaseStream.Position] != 8) {
|
||||
var license = reader.ReadString();
|
||||
/*var license =*/ reader.ReadString();
|
||||
}
|
||||
|
||||
// 4.2 (and earlier?) always compress the data
|
||||
|
@ -189,10 +189,10 @@ namespace de4dot.code.deobfuscators.Babel_NET {
|
|||
bool GetKeyIv(byte[] headerData, out byte[] key, out byte[] iv) {
|
||||
var reader = new BinaryReader(new MemoryStream(headerData));
|
||||
|
||||
var license = reader.ReadString();
|
||||
/*var license =*/ reader.ReadString();
|
||||
bool isCompressed = reader.ReadBoolean();
|
||||
|
||||
var unkData = reader.ReadBytes(reader.ReadInt32());
|
||||
/*var unkData =*/ reader.ReadBytes(reader.ReadInt32());
|
||||
|
||||
bool hasEmbeddedKey = reader.ReadBoolean();
|
||||
|
||||
|
|
|
@ -145,7 +145,7 @@ namespace de4dot.code.deobfuscators.CodeVeil {
|
|||
DumpedMethods CreateDumpedMethods(MyPEImage peImage, byte[] fileData, byte[] methodsData) {
|
||||
var dumpedMethods = new DumpedMethods();
|
||||
|
||||
var methodsDataReader = MemoryImageStream.Create(methodsData);
|
||||
/*var methodsDataReader =*/ MemoryImageStream.Create(methodsData);
|
||||
var fileDataReader = MemoryImageStream.Create(fileData);
|
||||
|
||||
var methodDef = peImage.MetaData.TablesStream.MethodTable;
|
||||
|
|
|
@ -133,11 +133,11 @@ namespace de4dot.code.deobfuscators.CodeVeil {
|
|||
resourceFlagsType = type;
|
||||
}
|
||||
|
||||
static string[] resType_fields = new string[] {
|
||||
/*static string[] resType_fields = new string[] {
|
||||
"System.Int32",
|
||||
"System.Object",
|
||||
"System.String",
|
||||
};
|
||||
};*/
|
||||
void FindResType() {
|
||||
if (encryptedResourceReaderTypeDict == null)
|
||||
return;
|
||||
|
|
|
@ -228,7 +228,7 @@ namespace de4dot.code.deobfuscators.CodeVeil {
|
|||
|
||||
var inflated = DeobUtils.Inflate(decryptedData, 0, decryptedData.Length, true);
|
||||
var reader = MemoryImageStream.Create(inflated);
|
||||
int deflatedLength = (int)reader.ReadCompressedUInt32();
|
||||
/*int deflatedLength = (int)*/reader.ReadCompressedUInt32();
|
||||
int numStrings = (int)reader.ReadCompressedUInt32();
|
||||
decryptedStrings = new string[numStrings];
|
||||
var offsets = new int[numStrings];
|
||||
|
|
|
@ -177,10 +177,10 @@ namespace de4dot.code.deobfuscators.CodeWall {
|
|||
return null;
|
||||
|
||||
MethodDef decrypterMethod = null;
|
||||
MethodDef cctor = null;
|
||||
//MethodDef cctor = null;
|
||||
foreach (var method in type.Methods) {
|
||||
if (method.Name == ".cctor") {
|
||||
cctor = method;
|
||||
//cctor = method;
|
||||
continue;
|
||||
}
|
||||
if (decrypterMethod != null)
|
||||
|
|
|
@ -67,10 +67,10 @@ namespace de4dot.code.deobfuscators.Confuser {
|
|||
// Convert ldc.r4/r8 followed by conv to the appropriate ldc.i4/i8 instr
|
||||
if (i + 1 < instrs.Count && (instr.OpCode.Code == Code.Ldc_R4 || instr.OpCode.Code == Code.Ldc_R8)) {
|
||||
var conv = instrs[i + 1];
|
||||
int vali32 = instr.OpCode.Code == Code.Ldc_R4 ? (int)(float)instr.Operand : (int)(double)instr.Operand;
|
||||
/*int vali32 = instr.OpCode.Code == Code.Ldc_R4 ? (int)(float)instr.Operand : (int)(double)instr.Operand;
|
||||
long vali64 = instr.OpCode.Code == Code.Ldc_R4 ? (long)(float)instr.Operand : (long)(double)instr.Operand;
|
||||
uint valu32 = instr.OpCode.Code == Code.Ldc_R4 ? (uint)(float)instr.Operand : (uint)(double)instr.Operand;
|
||||
ulong valu64 = instr.OpCode.Code == Code.Ldc_R4 ? (ulong)(float)instr.Operand : (ulong)(double)instr.Operand;
|
||||
ulong valu64 = instr.OpCode.Code == Code.Ldc_R4 ? (ulong)(float)instr.Operand : (ulong)(double)instr.Operand;*/
|
||||
switch (conv.OpCode.Code) {
|
||||
case Code.Conv_I1:
|
||||
newInstr = Instruction.CreateLdcI4(instr.OpCode.Code == Code.Ldc_R4 ? (sbyte)(float)instr.Operand : (sbyte)(double)instr.Operand);
|
||||
|
|
|
@ -308,7 +308,7 @@ namespace de4dot.code.deobfuscators.Confuser {
|
|||
|
||||
int csOffs = (int)peImage.OptionalHeader.StartOffset + 0x40;
|
||||
Array.Clear(md5SumData, csOffs, 4);
|
||||
var md5Sum = DeobUtils.Md5Sum(md5SumData);
|
||||
/*var md5Sum =*/ DeobUtils.Md5Sum(md5SumData);
|
||||
ulong checkSum = reader.ReadUInt64() ^ lkey0;
|
||||
if (hasStrongNameInfo) {
|
||||
int sn = reader.ReadInt32();
|
||||
|
|
|
@ -66,7 +66,7 @@ namespace de4dot.code.deobfuscators.Confuser {
|
|||
class Unpacker : IVersionProvider {
|
||||
ModuleDefMD module;
|
||||
EmbeddedResource mainAsmResource;
|
||||
uint key0, key1;
|
||||
uint key0/*, key1*/;
|
||||
uint entryPointToken;
|
||||
ConfuserVersion version = ConfuserVersion.Unknown;
|
||||
MethodDef asmResolverMethod;
|
||||
|
@ -146,6 +146,7 @@ namespace de4dot.code.deobfuscators.Confuser {
|
|||
if ((asmResolverMethod = FindAssemblyResolverMethod(entryPoint.DeclaringType)) != null) {
|
||||
theVersion = ConfuserVersion.v14_r58802;
|
||||
simpleDeobfuscator.Deobfuscate(asmResolverMethod);
|
||||
uint key1;
|
||||
if (!FindKey1(asmResolverMethod, out key1))
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -239,7 +239,7 @@ namespace de4dot.code.deobfuscators.DeepSea {
|
|||
void FixFieldCtorCalls(Blocks blocks) {
|
||||
if (blocks.Method.Name != ".ctor")
|
||||
return;
|
||||
var instrsToRemove = new List<int>();
|
||||
//var instrsToRemove = new List<int>();
|
||||
foreach (var block in blocks.MethodBlocks.GetAllBlocks()) {
|
||||
var instrs = block.Instructions;
|
||||
for (int i = 0; i < instrs.Count; i++) {
|
||||
|
|
|
@ -375,7 +375,7 @@ namespace de4dot.code.deobfuscators.DeepSea {
|
|||
string DecryptTrial(int magic2, int magic3) {
|
||||
int offset = magic ^ magic2 ^ magic3;
|
||||
var keyChar = encryptedData[offset + 1];
|
||||
int cachedIndex = encryptedData[offset] ^ keyChar;
|
||||
//int cachedIndex = encryptedData[offset] ^ keyChar;
|
||||
int numChars = ((keyChar ^ encryptedData[offset + 2]) << 16) + (keyChar ^ encryptedData[offset + 3]);
|
||||
offset += 4;
|
||||
var sb = new StringBuilder(numChars);
|
||||
|
@ -395,7 +395,7 @@ namespace de4dot.code.deobfuscators.DeepSea {
|
|||
string DecryptRetail(int magic2, int magic3, int keyCharOffs, int cachedIndexOffs, int flagsOffset, int flag, int keyDispl) {
|
||||
int offset = magic ^ magic2 ^ magic3;
|
||||
var keyChar = encryptedData[offset + keyCharOffs];
|
||||
int cachedIndex = encryptedData[offset + cachedIndexOffs] ^ keyChar;
|
||||
//int cachedIndex = encryptedData[offset + cachedIndexOffs] ^ keyChar;
|
||||
int flags = encryptedData[offset + flagsOffset] ^ keyChar;
|
||||
int numChars = ((flags >> 1) & ~(flag - 1)) | (flags & (flag - 1));
|
||||
if ((flags & flag) != 0) {
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace de4dot.code.deobfuscators.Dotfuscator {
|
|||
}
|
||||
|
||||
class Deobfuscator : DeobfuscatorBase {
|
||||
Options options;
|
||||
//Options options;
|
||||
string obfuscatorName = "Dotfuscator";
|
||||
|
||||
StringDecrypter stringDecrypter;
|
||||
|
@ -70,7 +70,7 @@ namespace de4dot.code.deobfuscators.Dotfuscator {
|
|||
|
||||
public Deobfuscator(Options options)
|
||||
: base(options) {
|
||||
this.options = options;
|
||||
//this.options = options;
|
||||
}
|
||||
|
||||
protected override int DetectInternal() {
|
||||
|
|
|
@ -49,7 +49,7 @@ namespace de4dot.code.deobfuscators.Eazfuscator_NET {
|
|||
}
|
||||
|
||||
class Deobfuscator : DeobfuscatorBase {
|
||||
Options options;
|
||||
//Options options;
|
||||
string obfuscatorName = DeobfuscatorInfo.THE_NAME;
|
||||
bool detectedVersion = false;
|
||||
|
||||
|
@ -76,7 +76,7 @@ namespace de4dot.code.deobfuscators.Eazfuscator_NET {
|
|||
|
||||
public Deobfuscator(Options options)
|
||||
: base(options) {
|
||||
this.options = options;
|
||||
//this.options = options;
|
||||
}
|
||||
|
||||
protected override int DetectInternal() {
|
||||
|
|
|
@ -33,7 +33,7 @@ namespace de4dot.code.deobfuscators.Eazfuscator_NET {
|
|||
MethodDef stringMethod;
|
||||
TypeDef dataDecrypterType;
|
||||
short s1, s2, s3;
|
||||
int i1, i2, i3, i4, i5, i6;
|
||||
int i1, /*i2,*/ i3, i4, i5, i6;
|
||||
bool checkMinus2;
|
||||
bool usePublicKeyToken;
|
||||
int keyLen;
|
||||
|
@ -734,7 +734,7 @@ namespace de4dot.code.deobfuscators.Eazfuscator_NET {
|
|||
if (index < 0)
|
||||
return false;
|
||||
|
||||
i2 = 0;
|
||||
//i2 = 0;
|
||||
var instrs = stringMethod.Body.Instructions;
|
||||
|
||||
var emu = new InstructionEmulator(stringMethod);
|
||||
|
@ -792,7 +792,7 @@ done:
|
|||
foreach (var val in fields.Values) {
|
||||
if (val == null)
|
||||
continue;
|
||||
magic1 = i2 = val.Value;
|
||||
magic1 = /*i2 =*/ val.Value;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
|
|
@ -36,10 +36,10 @@ namespace de4dot.code.deobfuscators.Goliath_NET {
|
|||
: base(module) {
|
||||
}
|
||||
|
||||
static string[] requiredFields = new string[] {
|
||||
/*static string[] requiredFields = new string[] {
|
||||
"System.Byte[]",
|
||||
"System.Collections.Generic.Dictionary`2<System.Int32,System.String>",
|
||||
};
|
||||
};*/
|
||||
protected override bool CheckDecrypterType(TypeDef type) {
|
||||
var fields = type.Fields;
|
||||
if (fields.Count != 2)
|
||||
|
|
|
@ -53,7 +53,7 @@ namespace de4dot.code.deobfuscators.ILProtector {
|
|||
}
|
||||
|
||||
class Deobfuscator : DeobfuscatorBase {
|
||||
Options options;
|
||||
//Options options;
|
||||
string obfuscatorName = DeobfuscatorInfo.THE_NAME;
|
||||
|
||||
MainType mainType;
|
||||
|
@ -77,7 +77,7 @@ namespace de4dot.code.deobfuscators.ILProtector {
|
|||
|
||||
public Deobfuscator(Options options)
|
||||
: base(options) {
|
||||
this.options = options;
|
||||
//this.options = options;
|
||||
}
|
||||
|
||||
protected override int DetectInternal() {
|
||||
|
|
|
@ -34,7 +34,7 @@ namespace de4dot.code.deobfuscators.ILProtector {
|
|||
Module reflectionModule;
|
||||
Module reflectionProtectModule;
|
||||
TypeDef protectMainType;
|
||||
Type reflectionProtectMainType;
|
||||
//Type reflectionProtectMainType;
|
||||
FieldInfo invokerFieldInfo;
|
||||
ModuleDefMD moduleProtect;
|
||||
IDecrypter decrypter;
|
||||
|
@ -630,7 +630,7 @@ namespace de4dot.code.deobfuscators.ILProtector {
|
|||
throw new ApplicationException("Could not find Protect.MainType");
|
||||
var invokerField = FindInvokerField(module);
|
||||
|
||||
reflectionProtectMainType = reflectionProtectModule.ResolveType(0x02000000 + (int)protectMainType.Rid);
|
||||
/*reflectionProtectMainType =*/ reflectionProtectModule.ResolveType(0x02000000 + (int)protectMainType.Rid);
|
||||
invokerFieldInfo = reflectionModule.ResolveField(0x04000000 + (int)invokerField.Rid);
|
||||
|
||||
decrypter = CreateDecrypter();
|
||||
|
|
|
@ -281,7 +281,7 @@ namespace de4dot.code.deobfuscators.ILProtector {
|
|||
var toOffset = new Dictionary<DecryptedMethodInfo, int>();
|
||||
var reader = MemoryImageStream.Create(data);
|
||||
int numMethods = (int)reader.Read7BitEncodedUInt32();
|
||||
int totalCodeSize = (int)reader.Read7BitEncodedUInt32();
|
||||
/*int totalCodeSize = (int)*/reader.Read7BitEncodedUInt32();
|
||||
var methodInfos = new DecryptedMethodInfo[numMethods];
|
||||
int offset = 0;
|
||||
for (int i = 0; i < numMethods; i++) {
|
||||
|
|
|
@ -351,7 +351,7 @@ namespace de4dot.code.deobfuscators.MaxtoCode {
|
|||
Bits key1, key2;
|
||||
CreateKeys(data, index, out key1, out key2);
|
||||
byte[] newKey = new byte[16 * 6];
|
||||
byte[] tmpData = new byte[28 * 2];
|
||||
//byte[] tmpData = new byte[28 * 2];
|
||||
for (int i = 0; i < 16; i++) {
|
||||
int rolCount = rots[i];
|
||||
key1.Rol(rolCount);
|
||||
|
|
|
@ -22,7 +22,7 @@ using System.IO;
|
|||
|
||||
namespace de4dot.code.deobfuscators.MaxtoCode {
|
||||
class McKey {
|
||||
PeHeader peHeader;
|
||||
//PeHeader peHeader;
|
||||
byte[] data;
|
||||
|
||||
public byte this[int index] {
|
||||
|
@ -30,7 +30,7 @@ namespace de4dot.code.deobfuscators.MaxtoCode {
|
|||
}
|
||||
|
||||
public McKey(MyPEImage peImage, PeHeader peHeader) {
|
||||
this.peHeader = peHeader;
|
||||
//this.peHeader = peHeader;
|
||||
try {
|
||||
this.data = peImage.ReadBytes(peHeader.GetMcKeyRva(), 0x2000);
|
||||
}
|
||||
|
|
|
@ -304,7 +304,7 @@ namespace de4dot.code.deobfuscators.MaxtoCode {
|
|||
for (int i = 0; i < numMethods; i++, offset += structSize) {
|
||||
uint methodBodyRva = ReadEncryptedUInt32(offset);
|
||||
uint totalSize = ReadEncryptedUInt32(offset + 4);
|
||||
uint methodInstructionRva = ReadEncryptedUInt32(offset + 8);
|
||||
/*uint methodInstructionRva =*/ ReadEncryptedUInt32(offset + 8);
|
||||
|
||||
// Read the method body header and method body (instrs + exception handlers).
|
||||
// The method body header is always in the first one. The instrs + ex handlers
|
||||
|
|
|
@ -127,7 +127,7 @@ namespace de4dot.code.deobfuscators {
|
|||
}
|
||||
|
||||
public static byte[] Decompress(byte[] inData, int sig) {
|
||||
int mode = BitConverter.ToInt32(inData, 4);
|
||||
/*int mode =*/ BitConverter.ToInt32(inData, 4);
|
||||
int compressedLength = BitConverter.ToInt32(inData, 8);
|
||||
int decompressedLength = BitConverter.ToInt32(inData, 12);
|
||||
bool isDataCompressed = BitConverter.ToInt32(inData, 16) == 1;
|
||||
|
|
|
@ -47,7 +47,7 @@ namespace de4dot.code.deobfuscators.Skater_NET {
|
|||
}
|
||||
|
||||
class Deobfuscator : DeobfuscatorBase {
|
||||
Options options;
|
||||
//Options options;
|
||||
|
||||
StringDecrypter stringDecrypter;
|
||||
EnumClassFinder enumClassFinder;
|
||||
|
@ -69,7 +69,7 @@ namespace de4dot.code.deobfuscators.Skater_NET {
|
|||
|
||||
public Deobfuscator(Options options)
|
||||
: base(options) {
|
||||
this.options = options;
|
||||
//this.options = options;
|
||||
StringFeatures = StringFeatures.AllowNoDecryption | StringFeatures.AllowStaticDecryption;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ namespace de4dot.code.deobfuscators.SmartAssembly {
|
|||
class StringDecrypter {
|
||||
int stringOffset;
|
||||
byte[] decryptedData;
|
||||
StringDecrypterVersion stringDecrypterVersion;
|
||||
//StringDecrypterVersion stringDecrypterVersion;
|
||||
|
||||
public bool CanDecrypt {
|
||||
get { return decryptedData != null; }
|
||||
|
@ -45,7 +45,7 @@ namespace de4dot.code.deobfuscators.SmartAssembly {
|
|||
decryptedData = stringDecrypterInfo.Decrypt();
|
||||
}
|
||||
|
||||
stringDecrypterVersion = StringDecrypterInfo.DecrypterVersion;
|
||||
//stringDecrypterVersion = StringDecrypterInfo.DecrypterVersion;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -25,15 +25,15 @@ namespace de4dot.code.deobfuscators.Spices_Net {
|
|||
if (Read32(data, 0) == SPICES_QCLZ_SIG)
|
||||
return QuickLZ.Decompress(data, SPICES_QCLZ_SIG);
|
||||
|
||||
int headerLength, decompressedLength, compressedLength;
|
||||
int headerLength, decompressedLength/*, compressedLength*/;
|
||||
if ((data[0] & 2) != 0) {
|
||||
headerLength = 9;
|
||||
compressedLength = (int)Read32(data, 1);
|
||||
/*compressedLength = (int)*/Read32(data, 1);
|
||||
decompressedLength = (int)Read32(data, 5);
|
||||
}
|
||||
else {
|
||||
headerLength = 3;
|
||||
compressedLength = data[1];
|
||||
//compressedLength = data[1];
|
||||
decompressedLength = data[2];
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ namespace de4dot.code.deobfuscators.dotNET_Reactor.v4 {
|
|||
|
||||
PatchDwords(peImage, methodsDataReader, patchCount);
|
||||
while (methodsDataReader.Position < methodsData.Length - 1) {
|
||||
uint token = methodsDataReader.ReadUInt32();
|
||||
/*uint token =*/ methodsDataReader.ReadUInt32();
|
||||
int numDwords = methodsDataReader.ReadInt32();
|
||||
PatchDwords(peImage, methodsDataReader, numDwords / 2);
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ namespace de4dot.code.deobfuscators.dotNET_Reactor.v4 {
|
|||
}
|
||||
|
||||
PatchDwords(peImage, methodsDataReader, patchCount);
|
||||
int count = methodsDataReader.ReadInt32();
|
||||
/*int count =*/ methodsDataReader.ReadInt32();
|
||||
dumpedMethods = new DumpedMethods();
|
||||
while (methodsDataReader.Position < methodsData.Length - 1) {
|
||||
uint rva = methodsDataReader.ReadUInt32();
|
||||
|
|
|
@ -85,12 +85,12 @@ namespace de4dot.code.renamer {
|
|||
}
|
||||
|
||||
public class ParamInfo {
|
||||
MParamDef paramDef;
|
||||
//MParamDef paramDef;
|
||||
public string oldName;
|
||||
public string newName;
|
||||
|
||||
public ParamInfo(MParamDef paramDef) {
|
||||
this.paramDef = paramDef;
|
||||
//this.paramDef = paramDef;
|
||||
this.oldName = paramDef.ParameterDef.Name;
|
||||
this.newName = paramDef.ParameterDef.Name;
|
||||
}
|
||||
|
|
|
@ -1647,7 +1647,7 @@ namespace de4dot.code.renamer {
|
|||
|
||||
string newMethodName;
|
||||
if (overridePrefix != "") {
|
||||
var overrideInfo = memberInfos.Method(overrideMethod);
|
||||
/*var overrideInfo =*/ memberInfos.Method(overrideMethod);
|
||||
var overriddenMethod = GetOverriddenMethod(overrideMethod);
|
||||
if (overriddenMethod == null)
|
||||
newMethodName = GetRealName(overrideMethod.MethodDef.Overrides[0].MethodDeclaration.Name.String);
|
||||
|
|
|
@ -86,7 +86,7 @@ namespace de4dot.mdecrypt {
|
|||
FuncPtrInfo<ReturnNameOfMethod> returnNameOfMethodInfo = new FuncPtrInfo<ReturnNameOfMethod>();
|
||||
|
||||
IntPtr origCompileMethod;
|
||||
IntPtr jitterTextFreeMem;
|
||||
//IntPtr jitterTextFreeMem;
|
||||
|
||||
IntPtr callMethod;
|
||||
CallMethod callMethodDelegate;
|
||||
|
@ -203,7 +203,7 @@ namespace de4dot.mdecrypt {
|
|||
|
||||
public unsafe void InstallCompileMethod() {
|
||||
var hJitterDll = GetJitterDllHandle();
|
||||
jitterTextFreeMem = GetEndOfText(hJitterDll);
|
||||
/*jitterTextFreeMem =*/ GetEndOfText(hJitterDll);
|
||||
|
||||
var getJitPtr = GetProcAddress(hJitterDll, "getJit");
|
||||
var getJit = (GetJit)Marshal.GetDelegateForFunctionPointer(getJitPtr, typeof(GetJit));
|
||||
|
@ -249,7 +249,7 @@ namespace de4dot.mdecrypt {
|
|||
int numSections = *(ushort*)(p + 2);
|
||||
int sizeOptionalHeader = *(ushort*)(p + 0x10);
|
||||
p += 0x14;
|
||||
uint sectionAlignment = *(uint*)(p + 0x20);
|
||||
//uint sectionAlignment = *(uint*)(p + 0x20);
|
||||
p += sizeOptionalHeader;
|
||||
|
||||
var textName = new byte[8] { (byte)'.', (byte)'t', (byte)'e', (byte)'x', (byte)'t', 0, 0, 0 };
|
||||
|
|
Loading…
Reference in New Issue