Thread: Disassembler

  1. #1
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246

    Disassembler

    Is it possible to create an assembly file from an exe file with VC++6?
    For example:
    Foo.exe -> VC++6 -> Foo.asm or Foo.txt
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  2. #2
    Devil's Advocate SlyMaelstrom's Avatar
    Join Date
    May 2004
    Location
    Out of scope
    Posts
    4,079
    With VC++6? Not as far as I know.

    Even the best programs that turn machine code into assembly don't do such a hot job at it, from what I've heard. If you want a lecture on Assembly, talk to Bubba.
    Sent from my iPadŽ

  3. #3
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    vc6 can barely create an exe from source.
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  4. #4
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    /FA, /Fa (Listing File)
    Home | Overview | How Do I | Compiler Options

    This option creates a listing file. The listing file always contains assembly code. The optional arguments control the generation of source code and machine code and the extension of the listing file as follows:

    Command Line Project Settings Listing Contents;
    Filename Extension
    /FA Assembly-Only Listing Assembly code; .ASM
    /FAc Assembly With Machine Code Machine and assembly code; .COD
    /FAs Assembly With Source Code Source and assembly code; .ASM
    /FAcs Assembly, Machine Code, and Source Machine, source, and assembly code; .COD
    /Fafilename Listing File Name Use /Fa to specify a directory and/or filename for the selected type of listing file. By default, the base name of the listing file is the base name of the source file.


    To find these options in the development environment, click Settings on the Project menu. Then click the C/C++ tab, and click Listing Files in the Category box. See the Listing File Type drop-down box.

    Example
    In the following example, CL produces a combined source and machine-code listing called HELLO.COD.

    CL /FAcs HELLO.CPP
    Amazing what clicking the help button and using the index does eh?

  5. #5
    Hardware Engineer
    Join Date
    Sep 2001
    Posts
    1,398
    I don't know about VC++ either...

    But, disassembly CAN be done!

    You might have to look for a disassembler.

    Assembly language is a human-readable representation of machine code. There is an exact one-to-one correspondence between an assembly instruction and the associated machine instruction. So, you can translate back and forth with 100% accuracy.

    Decompiling is a different story. That CONNOT be done precisely!

  6. #6
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    Amazing what clicking the help button and using the index does eh?
    Unfotunately my VS doesn't have help. Maybe many of my questions here are because of this. If you noticed most of the times I ask for a function for a particular job. Or a command to do something, not algorithms for example.

    As I know assembly can be converted directly to machine code and vice-versa.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  7. #7
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    if you had a legal version it would have help. You've just exposed yourself as a pirate of not just Windows but VC as well, and your questions seem to hint at attempts to pirate more software.
    Abuse reported.

  8. #8
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    Quote Originally Posted by siavoshkc
    Unfotunately my VS doesn't have help. Maybe many of my questions here are because of this. If you noticed most of the times I ask for a function for a particular job. Or a command to do something, not algorithms for example.

    As I know assembly can be converted directly to machine code and vice-versa.
    all the help files that are (or in your case are not) installed on your machine can be found online at the MSDN library. It's not as flash as having them installed on your local machine, but it still has all the same info.

    BTW I'd seriously consider upgrading your compiler. VC6 is not very standards compliant. You'd be better off with dev-cpp or even the free version of vs2005.
    "I saw a sign that said 'Drink Canada Dry', so I started"
    -- Brendan Behan

    Free Compiler: Visual C++ 2005 Express
    If you program in C++, you need Boost. You should also know how to use the Standard Library (STL). Want to make games? After reading this, I don't like WxWidgets anymore. Want to add some scripting to your App?

  9. #9
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    if you had a legal version it would have help. You've just exposed yourself as a pirate of not just Windows but VC as well, and your questions seem to hint at attempts to pirate more software.
    Where I live, it is completely legal. So don't be rude. I should pay for them but not as much as it's equal value in US$. I don't have the help because MSDN is in another CD that I've lost it.

    I want to make an .ASM from an .EXE. Not from a .CPP.

    I'll upgrade to a new version as soon as MS-VS2006 comes up.
    Last edited by siavoshkc; 02-28-2006 at 03:57 PM.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

  10. #10
    Sweet
    Join Date
    Aug 2002
    Location
    Tucson, Arizona
    Posts
    1,820
    How is that so? BTW it is live.
    Woop?

  11. #11
    semi-colon generator ChaosEngine's Avatar
    Join Date
    Sep 2005
    Location
    Chch, NZ
    Posts
    597
    Quote Originally Posted by siavoshkc
    I'll upgrade to a new version as soon as MS-VS2006 comes up.
    considering vs2005 just went live about 2 or 3 months ago, you'll be waiting....

  12. #12
    Registered User VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,607
    Make an asm from an EXE? Ok this is sounding more 'hack-ish' with every post.

    If you understood assembly, you would understand the relationship between the exe and assembly opcodes. Since this is a hack thread, I'm not going any farther.

    Fair warning though. Changing hex values in an EXE w/o understanding the full source will result in destroying the underlying program.
    Last edited by VirtualAce; 03-01-2006 at 03:12 AM.

  13. #13
    chococoder
    Join Date
    Nov 2004
    Posts
    515
    where you live (if your profile is correct) you're not allowed to have the products at all because they're banned from shipment to your country.

  14. #14
    Registered User
    Join Date
    Jan 2005
    Posts
    847
    Quote Originally Posted by jwenting
    where you live (if your profile is correct) you're not allowed to have the products at all because they're banned from shipment to your country.
    I didn't know that, is there a trade embargo?

  15. #15
    System Novice siavoshkc's Avatar
    Join Date
    Jan 2006
    Location
    Tehran
    Posts
    1,246
    where you live (if your profile is correct) you're not allowed to have the products at all because they're banned from shipment to your country.
    You don't have enough information about it and currently I am living on the laws of my own country not yours. USA banned trade to Iran, if an american sell an Iranian something it is out of law. But if somehow a USA product entered Iran (it is legal), I am free to use it. Even though if I steel the whole money of Microsoft it is non of your business I think.
    Last edited by siavoshkc; 03-01-2006 at 05:41 AM.
    Learn C++ (C++ Books, C Books, FAQ, Forum Search)
    Code painter latest version on sourceforge DOWNLOAD NOW!
    Download FSB Data Integrity Tester.
    Siavosh K C

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Interesting Question
    By Swordsman in forum A Brief History of Cprogramming.com
    Replies: 24
    Last Post: 07-10-2007, 11:19 AM
  2. Programming a Disassembler
    By Xzyx987X in forum C Programming
    Replies: 2
    Last Post: 05-03-2004, 01:19 PM