Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: serch bat program  (Read 12606 times)

0 Members and 1 Guest are viewing this topic.

mat123

    Topic Starter


    Hopeful

    Thanked: 16
    • Yes
    • Yes
    • Yes
  • Experience: Familiar
  • OS: Windows XP
serch bat program
« on: May 23, 2010, 04:42:01 PM »
i am making a bat to exe decompliler  but it has problems could you help me fix them

dir /s C:\%~n1.bat|find "Directory of" > dir.txt
for /f %%a in (dir.txt) do (
cd "%%c"
start notepad %~n1.bat
)



Sidewinder



    Guru

    Thanked: 139
  • Experience: Familiar
  • OS: Windows 10
Re: serch bat program
« Reply #1 on: May 24, 2010, 06:45:26 AM »
i am making a bat to exe decompliler  but it has problems could you help me fix them

I was able to fix the syntax. I have no idea what a bat to exe decompliler is.

Code: [Select]
@echo off
dir /s c:\%~n1.bat | find "Directory of" > dir.txt
for /f "tokens=1-2*" %%a in (dir.txt) do (
  cd /d "%%c"
  start notepad %~n1.bat
)

 8)
The true sign of intelligence is not knowledge but imagination.

-- Albert Einstein

mat123

    Topic Starter


    Hopeful

    Thanked: 16
    • Yes
    • Yes
    • Yes
  • Experience: Familiar
  • OS: Windows XP
Re: serch bat program
« Reply #2 on: May 24, 2010, 06:03:44 PM »
thank you sidewinder
what  a bat to exe decompiler does is it converts bat file compiled to an exe back to a bat file



marvinengland



    Hopeful

    Thanked: 11
    search bat program
    « Reply #3 on: June 01, 2010, 07:29:25 PM »
    I am making a exe to bat decompliler  but it has problems could you help me fix them?


    http://fixunix.com/ms-dos/539963-converting-exe-file-bat-file.html


    C:\test>type   matt524.bat

    Code: [Select]
    @echo off

    rem Convert exe to bat

    rem http://fixunix.com/ms-dos/539963-converting-exe-file-bat-file.html


    rem How to convert exe file to bat file?
    Rem Simple, here's an example:


    @echo off
    REM tested
    ren myfile.exe myfile.bat

    rem another example:
    echo off
    REM results cause problems in some OS's
    ren Buddist.exe Christian.bat


    Output:


    C:\test> matt524.bat

    C:\test>dir Christian.bat myfile.bat
     Volume in drive C has no label.
     Volume Serial Number is 0652-E41D

     Directory of C:\test

    06/01/2010  07:50 PM                 8 Christian.bat

     Directory of C:\test

    06/01/2010  07:47 PM                 9 myfile.bat
                   2 File(s)             17 bytes
                   0 Dir(s)  295,503,876,096 bytes free

    C:\test>
    USA

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: serch bat program
    « Reply #4 on: June 01, 2010, 07:45:18 PM »
    Excellent! Now I have an easy way to convert my JPEG files to PNG files, despite the completely different formats they use!

    wait a second! IT DOESN'T WORK!

    Why oh why doesn't it work!

    It wouldn't be because converting between two or more heterogeneous file types is a bit more involved then simply changing the moniker used to refer to them?
    I was trying to dereference Null Pointers before it was cool.

    Salmon Trout

    • Guest
    Re: serch bat program
    « Reply #5 on: June 02, 2010, 12:18:49 AM »
    Using Marvin's method, when I go to Germany, I don't need to exchange any currency, I can just rename all my pounds to euros! (Why hasn't this idiot troll been banned?)

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: serch bat program
    « Reply #6 on: June 02, 2010, 07:42:07 AM »
    Quote
    what  a bat to exe decompiler does is it converts bat file compiled to an exe back to a bat file

    Perhaps I'm over thinking this. If FileA.bat is converted to FileA.exe, why is a "decompiler" necessary? FileA.bat is the original batch file; there is no need to decompile anything.

    @Marvin: Thank you so much on your lucid and enlightening post about converting file types by using the ren utility. I was able to convert a modest collection of mp3 files to mp4 files and am now able to not only listen to Mott The Hoople, but to watch them perform as well. Is technology great or what?

     ;D
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    BC_Programmer


      Mastermind
    • Typing is no substitute for thinking.
    • Thanked: 1140
      • Yes
      • Yes
      • BC-Programming.com
    • Certifications: List
    • Computer: Specs
    • Experience: Beginner
    • OS: Windows 11
    Re: serch bat program
    « Reply #7 on: June 02, 2010, 07:49:41 AM »
    Perhaps I'm over thinking this. If FileA.bat is converted to FileA.exe, why is a "decompiler" necessary? FileA.bat is the original batch file; there is no need to decompile anything.

    If you don't have the original batch file.
    I was trying to dereference Null Pointers before it was cool.

    marvinengland



      Hopeful

      Thanked: 11
      Re: serch bat program
      « Reply #8 on: June 02, 2010, 11:41:16 AM »
      @Marvin: Thank you so much on your lucid and enlightening post about converting file types by using the ren utility. I was able to convert a modest collection of mp3 files to mp4 files and am now able to not only listen to Mott The Hoople, but to watch them perform as well. Is technology great or what?


      When Matt's decomplier is up and running we can create the source code for "C" programs and other complied programs. The final decomplier will be published shortly by Matt and the experts here at Computer Hope.

      The ren command has a few bugs with the exe to bat procedure. Wait for Matt's Decomplier

      Matt has another project with snake oil that will repair computer software and hardware.
      USA

      Salmon Trout

      • Guest
      Re: serch bat program
      « Reply #9 on: June 02, 2010, 11:47:18 AM »
      It is way past time that the idiot marvinengland was banned for his stupid trollery. How nice if it could be permanent.


      marvinengland



        Hopeful

        Thanked: 11
        Re: serch bat program
        « Reply #10 on: June 02, 2010, 12:08:27 PM »
        @Marvin: Thank you so much on your lucid and enlightening post about converting file types by using the ren utility. I was able to convert a modest collection of mp3 files to mp4 files and am now able to not only listen to Mott The Hoople, but to watch them perform as well. Is technology great or what?


        Thanks Sidewinder for your post.

        Sidewinder is one of a few Computer Hope members with a Sense of Humor.

        Satire is wasted on most Computer Hope members.
        USA

        BC_Programmer


          Mastermind
        • Typing is no substitute for thinking.
        • Thanked: 1140
          • Yes
          • Yes
          • BC-Programming.com
        • Certifications: List
        • Computer: Specs
        • Experience: Beginner
        • OS: Windows 11
        Re: serch bat program
        « Reply #11 on: June 02, 2010, 05:06:14 PM »
        When Matt's decomplier is up and running we can create the source code for "C" programs and other complied programs. The final decomplier will be published shortly by Matt and the experts here at Computer Hope.

        The ren command has a few bugs with the exe to bat procedure. Wait for Matt's Decomplier

        Matt has another project with snake oil that will repair computer software and hardware.


        you poor, insolent troll.

        I was trying to dereference Null Pointers before it was cool.

        Helpmeh



          Guru

        • Roar.
        • Thanked: 123
          • Yes
          • Yes
        • Computer: Specs
        • Experience: Familiar
        • OS: Windows 8
        Re: serch bat program
        « Reply #12 on: June 02, 2010, 05:17:40 PM »
        Everyone above this line has been trolled.

        Quote
        ren Buddist.exe Christian.bat
        Where's MagicSpeed?
        Quote from: 'matt'
        He's playing a game called IRL. Great graphics, *censored* gameplay.

        marvinengland



          Hopeful

          Thanked: 11
          Re: serch bat program
          « Reply #13 on: June 02, 2010, 06:23:00 PM »
          "You poor, insolent troll."

          Re: search bat program


          When BC has no reasonable response, then BC must insult and name call.
          USA

          Merlyn

          • Guest
          Re: serch bat program
          « Reply #14 on: June 02, 2010, 06:24:34 PM »
          Quote
          When BC has no reasonable response, then BC must insult and name call.

          Haha, I am new to this forum and i think that i already know BC... Maybe not? :P

          BC_Programmer


            Mastermind
          • Typing is no substitute for thinking.
          • Thanked: 1140
            • Yes
            • Yes
            • BC-Programming.com
          • Certifications: List
          • Computer: Specs
          • Experience: Beginner
          • OS: Windows 11
          Re: serch bat program
          « Reply #15 on: June 02, 2010, 06:33:42 PM »
          Haha, I am new to this forum and i think that i already know BC... Maybe not? :P
          I have no reasonable response, so I'll do what I always do (apparently) and insult! you... you... asparagus face!

          yeah. I went there.

          ...


          ...


          I apologize. I don't know what came over me. Your face in no way resembles an asparagus. Although I really can't tell for sure, seeing as I can't see your face. largely though it's safe to assume that nobody's face resembled a fiber-rich vegetable.

          Come to think of it, I haven't had asparagus in so long, I can't even remember if I like it or not.
          I was trying to dereference Null Pointers before it was cool.

          Merlyn

          • Guest
          Re: serch bat program
          « Reply #16 on: June 02, 2010, 06:35:19 PM »
          HAHA! *high 5* You actually made me laugh! You asparagus face >.< What are you smoking? :D

          Helpmeh



            Guru

          • Roar.
          • Thanked: 123
            • Yes
            • Yes
          • Computer: Specs
          • Experience: Familiar
          • OS: Windows 8
          Re: serch bat program
          « Reply #17 on: June 02, 2010, 06:40:10 PM »
          Haha, I am new to this forum and i think that i already know BC... Maybe not? :P
          Well, know Bill (Marvin), the troll. He has evaded bans numerous times, and serves almost no useful purpose (other than mild entertainment as BC insults him).
          Where's MagicSpeed?
          Quote from: 'matt'
          He's playing a game called IRL. Great graphics, *censored* gameplay.

          Merlyn

          • Guest
          Re: serch bat program
          « Reply #18 on: June 02, 2010, 06:41:58 PM »
          HAHA!  ;D

          I love this forum already :)

          marvinengland



            Hopeful

            Thanked: 11
            Re: serch bat program
            « Reply #19 on: June 02, 2010, 07:56:50 PM »
            HAHA!  ;D

            I love this forum already :)
             

            The original poster, Matt, started this thread planning on writing the code for a "Decomplier."
            Matt plans to take an executable (. exe ) file and find the original bat code.

            Matt ask the Computer Hope  experts to help him with the exe to bat project.

            None the Computer Hope experts have offered any help.

            USA

            Helpmeh



              Guru

            • Roar.
            • Thanked: 123
              • Yes
              • Yes
            • Computer: Specs
            • Experience: Familiar
            • OS: Windows 8
            Re: serch bat program
            « Reply #20 on: June 02, 2010, 07:58:14 PM »
             

            The original poster, Matt, started this thread planning on writing the code for a "Decomplier."
            Matt plans to take an executable (. exe ) file and find the original bat code.

            Matt ask the Computer Hope  experts to help him with the exe to bat project.

            None the Computer Hope experts have offered any help.


            More trolling from Marvin.
            Where's MagicSpeed?
            Quote from: 'matt'
            He's playing a game called IRL. Great graphics, *censored* gameplay.

            Merlyn

            • Guest
            Re: serch bat program
            « Reply #21 on: June 02, 2010, 07:59:29 PM »
            HAHA!!

            Who's the B***H now!?! :P

            marvinengland



              Hopeful

              Thanked: 11
              Re: serch bat program
              « Reply #22 on: June 02, 2010, 08:08:30 PM »
              HAHA!!

              Who's the B***H now!?!

              We merely stated facts about this Thread.  There is nothing wrong with stating facts:

              The original poster, Matt, started this thread planning on writing the code for a "Decomplier."
              Matt plans to take an executable (. exe ) file and find the original bat code.

              Matt ask the Computer Hope  experts to help him with the exe to bat project.

              None the Computer Hope experts have offered any help.
              USA

              Merlyn

              • Guest
              Re: serch bat program
              « Reply #23 on: June 02, 2010, 08:10:12 PM »
              S
              O
              R
              R
              Y

              Mr. Tough-Guy

              BC_Programmer


                Mastermind
              • Typing is no substitute for thinking.
              • Thanked: 1140
                • Yes
                • Yes
                • BC-Programming.com
              • Certifications: List
              • Computer: Specs
              • Experience: Beginner
              • OS: Windows 11
              Re: serch bat program
              « Reply #24 on: June 02, 2010, 08:23:10 PM »
              The original poster, Matt, started this thread planning on writing the code for a "Decomplier."
              Matt plans to take an executable (. exe ) file and find the original bat code.

              Matt ask the Computer Hope  experts to help him with the exe to bat project.


              he doesn't "plan" to do this. It already works. He just needed help with the syntax.

              Quote

              None the Computer Hope experts have offered any help.

              Sidewinder fixed the syntax. The batch then worked. additionally, he mentioned how he didn't know what a exe to batch decompiler was. Matt123 kindly explained what it was for sidewinders benefit, at which point you came in singing the praises and magical abilities of the ren command, also implicit was how you think everybody and their mother should use ren to convert all sorts of incompatible file types. While certainly a humourous sidebar to the original thread, it hardly adds any content, let alone useful content. Basically what you did was no better then posting:
              Quote from: Billrich
              haha you noobs you canz convert using ren command see it's eezy:

              Code: [Select]
              ren program.exe batchfile.bat

              I pwnz!

              you experts never doze any help to any of my peeps that come in here, you all bustas.

              Actually, that's a lie, it was better. I just wanted to see what your post sounded like in gangsta. It certainly doesn't exclude any content.

              Well, know Bill (Marvin), the troll. He has evaded bans numerous times, and serves almost no useful purpose (other than mild entertainment as BC insults him).

              no useful purpose? nonsense! His posts are so frequent and illustriously ill-guided that even if he is purposely trolling it's still fun to respond! And since this thread was over already (question asked, problem solved) there was no topic to truly derail, which was certainly his intention. his methods are rather simple:

              1. say something totally wrong, and usually entirely irrelevant, or in some cases simply post a random command output. (his favourite seems to be to provide the poster with a listing of his C: drive, not sure how this helps anybody)
              2. wait for responses claiming how wrong or misguided he is (at this point, the hope is that the thread will spiral out of control into nostalgia about how much of a troll Billrich is, as it did here)
              3. At this point, he strikes! having made no posts other then the completely wrong post with no useful content, he provides the coup de gras in the form of a post outlining that no other expert has provided any help! The best part is that it's largely inaccurate, as it is in this case. Which merely means that he only looked at the thread title and didn't actually look at any of the previous posts.

              4. ???

              5. PROFIT!


              There is nothing wrong with stating facts:

              Good. Then we agree.

              You are a troll.

              Well that was fun! Now, on to more productive pursuits.

              I was trying to dereference Null Pointers before it was cool.

              Merlyn

              • Guest
              Re: serch bat program
              « Reply #25 on: June 02, 2010, 08:27:07 PM »
              *Sizzle* ?


              NICE GOING BC!!! Add me on MSN :D

              Salmon Trout

              • Guest
              Re: serch bat program
              « Reply #26 on: June 03, 2010, 12:04:51 AM »
              Nothing that marvinengland posted is a "reasonable response". He has only posted stupid nonsense which has nothing to do with the topic asked about by the (probably long-gone) original poster.

              marvinengland



                Hopeful

                Thanked: 11
                Re: serch bat program
                « Reply #27 on: June 03, 2010, 01:33:11 AM »
                i am making an exe to bat decompliler  but it has problems could you help me fix them

                dir /s C:\%~n1.bat|find "Directory of" > dir.txt
                for /f %%a in (dir.txt) do (
                cd "%%c"
                start notepad %~n1.bat
                )

                The above code or corrected code by SW does nothing :

                Code: [Select]
                @echo off
                dir /s c:\%~n1.bat | find "Directory of" > dir.txt
                for /f "tokens=1-2*" %%a in (dir.txt) do (
                  cd /d "%%c"
                  start notepad %~n1.bat
                )


                Where is the output?

                Decomplier?  Decomplie with start notepad %~n1.bat?

                __________________________________

                When Matt's decomplier is up and running we can create the source code for "C" programs and other complied programs. The final decomplier will be published shortly by Matt and the experts here at Computer Hope.


                Matt has another project with snake oil that will repair computer software and hardware.
                « Last Edit: June 03, 2010, 02:06:06 AM by marvinengland »
                USA

                marvinengland



                  Hopeful

                  Thanked: 11
                  Re: serch bat program
                  « Reply #28 on: June 03, 2010, 07:54:51 AM »
                  Well, know Marvin.  He has evaded bans numerous times.

                  The Decomplier  was discussed on another thread:

                  http://fixunix.com/ms-dos/539963-converting-exe-file-bat-file.html
                  USA

                  mat123

                    Topic Starter


                    Hopeful

                    Thanked: 16
                    • Yes
                    • Yes
                    • Yes
                  • Experience: Familiar
                  • OS: Windows XP
                  Re: serch bat program
                  « Reply #29 on: June 03, 2010, 08:03:54 AM »
                  Marvin bat to exe compilers have a bat file in them
                  when you run the exe the bat file is put in a temporary folder this finds it opens it up in notepad
                  to be edited



                  marvinengland



                    Hopeful

                    Thanked: 11
                    Re: serch bat program
                    « Reply #30 on: June 03, 2010, 09:43:08 AM »
                    Marvin bat to exe compilers have a bat file in them
                    when you run the exe the bat file is put in a temporary folder this finds it opens it up in notepad
                    to be edited

                    The reason to complie a batch file to an .exe file is to hide the batch code?

                    But now you say the .exe file can be edited with your decomplier and the original batch code is available. 

                    I doubt it.

                    Please show your output.

                    USA

                    Salmon Trout

                    • Guest
                    Re: serch bat program
                    « Reply #31 on: June 03, 2010, 11:27:50 AM »
                    Marvin bat to exe compilers have a bat file in them
                    when you run the exe the bat file is put in a temporary folder this finds it opens it up in notepad
                    to be edited

                    Sometimes it is run from memory

                    Helpmeh



                      Guru

                    • Roar.
                    • Thanked: 123
                      • Yes
                      • Yes
                    • Computer: Specs
                    • Experience: Familiar
                    • OS: Windows 8
                    Re: serch bat program
                    « Reply #32 on: June 03, 2010, 03:28:17 PM »
                    Sometimes it is run from memory
                    It all depends on what converter you used.
                    Where's MagicSpeed?
                    Quote from: 'matt'
                    He's playing a game called IRL. Great graphics, *censored* gameplay.

                    marvinengland



                      Hopeful

                      Thanked: 11
                      Search bat program
                      « Reply #33 on: June 03, 2010, 04:13:57 PM »
                      It all depends on what converter you used.

                      Does Helmeh mean the compiler that changed the original batch file to an exe file?

                      Or does Helpmeh mean the "DECompiler"  that changes the exe file to the original batch file?
                      USA

                      Helpmeh



                        Guru

                      • Roar.
                      • Thanked: 123
                        • Yes
                        • Yes
                      • Computer: Specs
                      • Experience: Familiar
                      • OS: Windows 8
                      Re: Search bat program
                      « Reply #34 on: June 03, 2010, 04:36:35 PM »
                      Does Helmeh mean the compiler that changed the original batch file to an exe file?

                      Or does Helpmeh mean the "DECompiler"  that changes the exe file to the original batch file?
                      Try reading. If you do, you may realize that neither of those options are what I mean.
                      Where's MagicSpeed?
                      Quote from: 'matt'
                      He's playing a game called IRL. Great graphics, *censored* gameplay.

                      marvinengland



                        Hopeful

                        Thanked: 11
                        Re: serch bat program
                        « Reply #35 on: June 03, 2010, 06:47:31 PM »
                        I am making a exe to bat decompliler  but it has problems could you help me fix them




                        http://technet.microsoft.com/en-us/library/cc750056.aspx

                        All the following from the above link.


                        "Compiling Batch Files
                        Batch Files are easy to modify, which can create problems. BAT2EXEC  is a compiler for batch files, and it turns your batch file into a exe file. Compiled batch files execute faster and create a source code that is protected from change. Before you compile a batch file, be sure to save the original under another name. Once you have compiled the file using BAT2EXEC, you cannot uncompile it to make changes."
                        USA

                        BC_Programmer


                          Mastermind
                        • Typing is no substitute for thinking.
                        • Thanked: 1140
                          • Yes
                          • Yes
                          • BC-Programming.com
                        • Certifications: List
                        • Computer: Specs
                        • Experience: Beginner
                        • OS: Windows 11
                        Re: serch bat program
                        « Reply #36 on: June 03, 2010, 08:43:36 PM »


                        http://technet.microsoft.com/en-us/library/cc750056.aspx

                        All the following from the above link.


                        "Compiling Batch Files
                        Batch Files are easy to modify, which can create problems. BAT2EXEC  is a compiler for batch files, and it turns your batch file into a exe file. Compiled batch files execute faster and create a source code that is protected from change. Before you compile a batch file, be sure to save the original under another name. Once you have compiled the file using BAT2EXEC, you cannot uncompile it to make changes."
                        try using bat2exec on a batch file today. Note the date:

                        "BAT2EXEC (Douglas Boling, PC Magazine, August 1990)"

                        How many batch files posted here would work on DOS 6? a optimistic estimate would be mybe a quarter of a percent.

                        It only works for batch files that work in Pure DOS- that is, no for /f, no forfiles, no command extensions whatsoever. You'd be hard pressed to find more then a handful of batch files that will actually work with that compiler today.

                        Additionally since the result is also a DOS COM executable it won't work on 64-bit operating systems and doesn't support anything provided by cmd- including long file names. Additionally the number of additional limitations imposed on the function of a batch file when it is converted to a 64K flat model restrict it's usefulness even further.

                        Good luck creating something useful within such severe limitations. In fact, even the relatively simple batch file you posted earlier wouldn't work:

                        Code: [Select]
                        @echo off

                        rem Convert exe to bat

                        rem http://fixunix.com/ms-dos/539963-converting-exe-file-bat-file.html


                        rem How to convert exe file to bat file?
                        Rem Simple, here's an example:


                        @echo off
                        REM tested
                        ren myfile.exe myfile.bat

                        rem another example:
                        echo off
                        REM results cause problems in some OS's
                        ren Buddist.exe Christian.bat


                        Know why? Of course not. That's why you think bat2exec is even close to what is being discussed. If you add a "dir Christian.bat" to the end of that batch (in order to confirm output, as you are so readily able to point out in other peoples batches but appear to neglect in your own) you will get the message "File not found".

                        If even the most basic batch consisting of a few rename commands doesn't work properly what hope is there for batches that actually do something useful?
                        I was trying to dereference Null Pointers before it was cool.

                        marvinengland



                          Hopeful

                          Thanked: 11
                          Re: serch bat program
                          « Reply #37 on: June 04, 2010, 05:53:02 PM »


                          http://technet.microsoft.com/en-us/library/cc750056.aspx



                          I did not write the following code. I provided a link  to the code.  The code demonstrated the futility of a "decompiler."  The code and link did not claim a valid decompiler.

                          rem Convert exe to bat

                          http://fixunix.com/ms-dos/539963-converting-exe-file-bat-file.html

                          How to convert exe file to bat file?
                          Simple, here's an example:


                          Code: [Select]
                          @echo off
                          REM tested
                          ren myfile.exe myfile.bat

                          rem another example:
                          echo off
                          REM results cause problems in some OS's
                          ren Buddist.exe Christian.bat
                          USA

                          marvinengland



                            Hopeful

                            Thanked: 11
                            Re: serch bat program
                            « Reply #38 on: June 05, 2010, 03:52:36 PM »
                            http://www.program-transformation.org/Transform/LegalityOfDecompilation



                            Legality Of Decompilation
                            Program-Transformation.Org: The Program Transformation WikiIf decompilation is possible to a certain extent, is it then also allowed?
                            Decompilation can be used for a number of reasons (see WhyDecompilation for more), including:
                                Recovery of lost source code (by accident or via a disgruntled employee),
                                Migration of assembly language applications to a new hardware platform,
                                Translation of code written in obsolete languages no longer supported by compiler tools,
                                Determination of the existence of viruses or malicious code in the program, and
                                Recovery of someone else's source code (to determine an algorithm for example).
                            However, not all uses of decompilers are legal uses.
                            Throughout the world, computer programs are protected by copyright law. Copyright protects the expression of an idea in the form of a program, hence protecting the developer's (or company's) investment in writing the software. Copyright law provides a bundle of exclusive rights to the software developer; among others, the right to reproduce and make adaptations to the developed computer program. It is a breach of these rights to make reproductions or adaptations without permission of the copyright holder. Further, license agreements may also bind the user to operate the program in a certain way and to avoid using decompilation or disassembly techniques on that program.
                            Different countries have different exceptions to the copyright owner's rights or precedent has been established in court proceedings. This means that these uses are allowed by law. The most common ones are:
                                Decompilation/disassembly for the purposes of interoperability (to another piece of software or hardware) where the interface specification has not been made available,
                                Decompilation/disassembly for the purposes of error correction where the owner of the copyright is not available to make the correction, and
                                To determine parts of the program that are not protected by copyright (e.g. algorithms), without breach of other forms of protection (e.g. patents or trade secrets).
                            Not all countries implement the same laws, you should contact your lawyer if in doubt.
                            USA