Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / June 2006

Tip: Looking for answers? Try searching our database.

A Failure about ildasm/ilasm MSIL

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ThomasLiu83@gmail.com - 12 Jun 2006 05:07 GMT
Dear friends,

I'm a newer in MSIL , nowadays I have a problem about
disassemble/assemble .net MSIL.

I found a dll plugin ,i want to dissamble it for studing , so i ildasm
it to prog.il, and then i ilasm it ,but it not works and failure.i do
not konw why it failed.

here is the command:
ilasm /resource=prog.src prog.il /DLL

and it failed~
Barry Kelly - 12 Jun 2006 07:28 GMT
> I'm a newer in MSIL , nowadays I have a problem about
> disassemble/assemble .net MSIL.
>
> I found a dll plugin

Can you tell us what it is?

>,i want to dissamble it for studing ,

The .NET Reflector tool (http://www.aisto.com/roeder/DotNet/) is an
easier tool to work with if you just want to look inside the assembly.

However, you're trying to reassemble, so you're performing
modifications. Be aware that current obfuscation techniques can
currently create identifiers in Unicode that, by default, don't
round-trip because ILDASM outputs in ANSI by default. You need to use
the /unicode flag to ILDASM if you want to preserve these identifiers.

Also, ILDASM is only really expert about CLI assembly sections. Windows
.EXE files are in PE format, which can include resources that can be
read by the native Win32 APIs, which ILDASM may not extract correctly.

The .NET reflector tool above is a good example of an obfuscated
assembly. It uses a Win32 .rsrc section which (last time I checked)
contains an XOR encrypted .DLL assembly, using a simple key. As well as
that, the assemblies are strong named. If you simply run:

 ildasm /unicode /all /out:reflector.il reflector.exe

followed by

 ilasm reflector.il /resource=reflector.res

... it won't work. The .res file extracted by ILDASM is only the start
of the actual .rsrc section in the object file, which is actually a good
750KB or so in size. Opening up the section using the Win32 resource
APIs allows reading in the extra parts of the .rsrc - but that won't
help you for round-tripping Reflector.exe.

> so i ildasm
> it to prog.il, and then i ilasm it ,but it not works and failure.i do
[quoted text clipped - 4 lines]
>
> and it failed~

What was the error message from running this at the command prompt?

-- Barry

Signature

http://barrkel.blogspot.com/

ThomasLiu83@gmail.com - 12 Jun 2006 08:53 GMT
Dear Barry,

Thank you for you post and Sorry that i have not say the problem
clearly.

> Can you tell us what it is?
it is a commercial .net control for drawing  chart in WinForm
application--Dundas Chart for .net windows form .

> However, you're trying to reassemble, so you're performing
> modifications.
In my original intention , i would modify someplace of the IL . In
fact, i did not make any modifications , only dissamble the .dll then
re-assemble the IL code, and it failed, print error message:

Class 554:      DC01.co
Class 555:      Dundas.Charting.WinControl.AnnotationPathPoint
Class 556:      UNKNOWN_OWNER
Error: Reference to undefined class 'UNKNOWN_OWNER'
Could not create output file, error code=0x80004005

***** FAILURE *****

So i am very confused! why that?
perhapse it use the command :
command: > ilasm /owner a.il /DLL  ??
but now ilasm do not suppurt the option "/owner"....

> > I'm a newer in MSIL , nowadays I have a problem about
> > disassemble/assemble .net MSIL.
[quoted text clipped - 47 lines]
>
> -- Barry

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.