3

I've the following scenario:

I've written some programming code which I own, but I lost the source code, however I've binary which was created by the compiler.

Can I simply decode my own binary code back to the source code if I know how to do it?


Here are the technical details to reproduce that scenario on the computer:

  1. Write a dummy program:

    $ echo "void start() { }" > foo.mq4
    
  2. I've downloaded the compiler (without accepting any agreement):

    $ curl -O https://download.mql5.com/cdn/web/metaquotes.software.corp/mt5/mql.exe
    
  3. Compile the program (which generated encrypted foo.ex4 binary file):

    $ mql.exe /mql4 foo.mq4
    MQL4/MQL5 Compiler build 1162 (02 Jul 2015)
    Copyright 2001-2015, MetaQuotes Software Corp.
    foo.mq4 : information: Compiling 'foo.mq4'
    Result: 0 error(s), 0 warning(s)
    
  4. I lost my source code:

    $ rm -v foo.mq4
    removed ‘foo.mq4’
    
  5. I'm trying to decompile the binary file using a tool to recover my source code:

    $ ./decompiler foo.ex4
    

Is that perfectly fine to do that, or not? Or it depends, if so, on what?

kenorb
  • 617
  • 7
  • 23
  • One thing it very certainly depends on is which jurisdiction applies. – Philipp Sep 10 '15 at 15:47
  • In your very simple example there are no libraries linked in. There may be (probably is) terms in the compiler EULA that prohibit reverse engineering libraries supplied with the compiler. – Spehro Pefhany Nov 15 '16 at 21:19

1 Answers1

2

I certainly don't see why this would not be legal. If you wrote a novel in English and paid someone to translate it into Spanish you could translate it back if you want.

The copyright scenario is they have copyright in the compiler; you own the copyright in the input and output of it. The compiler's creators have no claim on the output because there is none of their creativity in it.

Dale M
  • 208,266
  • 17
  • 237
  • 460
  • Unless you use publishing company which prevents your from doing so in their Publishing Agreement. – kenorb Sep 10 '15 at 21:01
  • @kenorb not relevant, assume a self or unpublished work – Dale M Sep 10 '15 at 21:04
  • In here I believe by compiling the program, I automatically accept the agreement. So potentially I could not have rights to decompile the binary, as I didn't create that kind of output on my own, but by using copyrighted program. – kenorb Sep 10 '15 at 21:08
  • What law in particular are you worried about? – Dale M Sep 10 '15 at 21:09
  • Not any particular. Just if this is a legal scenario to do, unless it depends on the agreement which I didn't read/found associated with the compiler, so I've to dig it out from somewhere and read it. However there is no any info about any license in place when running the compiler. So I could only assume that you're right. – kenorb Sep 10 '15 at 21:12
  • 1
    I think your last statement merits further support: Can a copyrighted compiler assert copyright over its output? I think the answer is no because the output is always a "derivative work." But perhaps the best answer on that sort of question was provided by you so can you confirm/clarify? – feetwet Sep 11 '15 at 18:52
  • @kenorb How do you figure that by compiling the program you automatically accept the agreement? Are you imagining some jurisdiction (other than the United States) where ordinary use is covered by copyright law? – David Schwartz Sep 17 '15 at 12:01
  • @DavidSchwartz I don't know, I believe it's the same way as you going to some website and in their policy you can find something like: 'by using this service you're agree to our terms ...'. – kenorb Sep 17 '15 at 12:06
  • 1
    @kenorb I don't see how that could apply to using a work you already lawfully possess and that you obtained possession of without agreeing to anything. That would be like buying a book, reading it, and then finding that the back page said, "by reading this book ...". By distributing the work without any EULA, I would think they authorized the ordinary use of the work by lawful recipients. – David Schwartz Sep 17 '15 at 12:17
  • Actually I think your analogy is wrong. The translator will have copyright in the translation (so two copyrights will apply to the translation - yours and the theirs). The difference is that a compiler can't own copyright, so I think the OP will be OK. – Martin Bonner supports Monica Mar 01 '16 at 14:10