title: Recover NodeJS code from executable (.exe)
body: <p>Some friend gave me a program he bought years ago. There is not much to look at except for an executable and a useless readme file (really nothing worth sharing and I'm not allowed to share the .exe-file). Unfortunately we can't get a hold of the initial developer either. When the program was given to me, I was told that it was written in python. So I attempted decompiling the <code>.exe</code> with various libs I found googling. None of them seemed to work but <strong>Pydecipher</strong> had following output in its logfile:</p>
  <pre><code>2021-05-17 08:26:34,828: [*] Unpacking /home/me/Repos/myrepo/executable.exe
  2021-05-17 08:26:34,828: [*] Checking PortableExecutable magic for file executable.exe
  2021-05-17 08:26:46,090: [*] Determined executable.exe type to be PortableExecutable
  2021-05-17 08:26:46,090: [*] This PE had the following VersionInfo resource: {
      &quot;CompanyName&quot;: &quot;Node.js&quot;,
      &quot;ProductName&quot;: &quot;Node.js&quot;,
      &quot;FileDescription&quot;: &quot;Node.js: Server-side JavaScript&quot;,
      &quot;FileVersion&quot;: &quot;10.21.0&quot;,
      &quot;ProductVersion&quot;: &quot;10.21.0&quot;,
      &quot;OriginalFilename&quot;: &quot;node.exe&quot;,
      &quot;InternalName&quot;: &quot;node&quot;,
      &quot;LegalCopyright&quot;: &quot;Copyright Node.js contributors. MIT license.&quot;
  }
  2021-05-17 08:26:46,267: [+] Dumped this PE's overlay data to pydecipher_output_executable/overlay_data
  2021-05-17 08:26:56,782: [*] Found the following strings (and their surrounding bytes, for context) in this PE, which may indicate the version of Python used to freeze the executable:
  [('1.0', 'tial-scale=1.0, minimum-scale=1.0,
  ...
  </code></pre>
  <p>I found <a href="https://www.reddit.com/r/node/comments/ak0tn8/is_it_possible_to_decompile_a_nodejs_app_that_was/" rel="nofollow noreferrer">this thread</a> where the most useful answers were</p>
  <blockquote>
  <p>Short answer. If you’re good enough.</p>
  </blockquote>
  <p>and</p>
  <blockquote>
  <p>I believe the js code must be in there somewhere. meaning you could try to use unix command strings to extract it</p>
  </blockquote>
  <p>Unix-commands didn't quite help me so far. So first of all, can I rely on the assumption that I'm dealing with NodeJS? And if so, what are steps I could take in order to recover the code? Is it even possible?</p>
  <p><strong>UPDATE</strong></p>
  <p>It certainly was written in NodeJS</p>