diff --git a/de4dot.code/DumpedMethodsRestorer.cs b/de4dot.code/DumpedMethodsRestorer.cs index 5932e405..4f677d05 100644 --- a/de4dot.code/DumpedMethodsRestorer.cs +++ b/de4dot.code/DumpedMethodsRestorer.cs @@ -38,7 +38,7 @@ namespace de4dot.code { } public virtual RawMethodRow ReadRow(uint rid) { - var dm = dumpedMethods.get(rid); + var dm = dumpedMethods.get(0x06000000 | rid); if (dm == null) return null; return new RawMethodRow(dm.mdRVA, dm.mdImplFlags, dm.mdFlags, dm.mdName, dm.mdSignature, dm.mdParamList); @@ -58,14 +58,14 @@ namespace de4dot.code { } public bool HasMethodBody(uint rid) { - return dumpedMethods.get(rid) != null; + return dumpedMethods.get(0x06000000 | rid) != null; } public MethodBody GetMethodBody(uint rid, RVA rva, IList parameters) { - var dm = dumpedMethods.get(rid); + var dm = dumpedMethods.get(0x06000000 | rid); if (dm == null) return null; - return MethodBodyReader.Create(module, dm.code, dm.extraSections, parameters); + return MethodBodyReader.Create(module, dm.code, dm.extraSections, parameters, dm.mhFlags, dm.mhMaxStack, dm.mhCodeSize, dm.mhLocalVarSigTok); } } }