Skip to content
This repository has been archived by the owner on Mar 10, 2024. It is now read-only.

rhotav/Dis2Msil

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dis2MSIL

Dis2MSIL is disassembler for MSIL ByteCode

This project is the developed and edited version of the "SDILReader" project on CodeProject.

Usage

You can disassemble the bytecodes to be given as String or Byte[] using the MethodBodyReader class.

public MethodBodyReader(Module module, string strilArray)
public MethodBodyReader(Module module, byte[] ilArray)

The "module" parameter here is required for metadata Tokens that need to be resolved.

For Bytecodes Of Type String

string testIl = "02-28-1C-00-00-0A-00-00-02-03-7D-11-00-00-04-2A";
string fileName = args[0];
MethodBodyReader mr = new MethodBodyReader(Assembly.LoadFrom(fileName).EntryPoint.Module, testIl);
Console.Write(mr.GetBodyCode());

Screenshot_2

For Bytecodes Of Type Byte[]

byte[] testIlByte = { 0x02, 0x28, 0x1C, 0x00, 0x00, 0x0A, 0x00, 0x00, 0x02, 0x03, 0x7D, 0x11, 0x00, 0x00, 0x04, 0x2A };
string fileName = args[0];
MethodBodyReader mrByte = new MethodBodyReader(Assembly.LoadFrom(fileName).EntryPoint.Module, testIlByte);
Console.Write(mrByte.GetBodyCode());

Screenshot_2

About

Disassemble bytecodes as MSIL

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages