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?

2
  • One thing it very certainly depends on is which jurisdiction applies.
    – Philipp
    Commented Sep 10, 2015 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. Commented Nov 15, 2016 at 21:19

1 Answer 1

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.

10
  • Unless you use publishing company which prevents your from doing so in their Publishing Agreement.
    – kenorb
    Commented Sep 10, 2015 at 21:01
  • @kenorb not relevant, assume a self or unpublished work
    – Dale M
    Commented Sep 10, 2015 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
    Commented Sep 10, 2015 at 21:08
  • 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
    Commented Sep 11, 2015 at 18:52
  • 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. Commented Sep 17, 2015 at 12:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .