0 of 0

File information

Last updated

Original upload

Created by

OnelessName

Uploaded by

OnelessName

Virus scan

Safe to use

31 comments

  1. Any chance of update for newer PEX? I'm getting "Not a valid PEX file" when trying to decompile.
  2. JamesHalliday
    JamesHalliday
    • member
    • 87 kudos
    Linux version would be cool.
  3. dwharper34
    dwharper34
    • premium
    • 4 kudos
    So is there a way to decompile a .pex file into a .psc file so that it could be corrected and recompiled?

    From what you've said, the .pex files are only for something we can read to better understand what the script is doing. There is no way to recompile them.

    Your program is the first decompile program I have tried that worked! I have already endorsed it. But I need a decompiler that will create a .psc file.
    1. Sulhir
      Sulhir
      • premium
      • 91 kudos
      Most scripts you can rebuild from the information decompiled, especially if you wrote the original script. If you didn't now's a good time to learn the ins and outs of scripting so you can understand what's decompiled!
    2. Darklocq
      Darklocq
      • premium
      • 138 kudos
      This unfinished tool has been obsolete since 2013.  Use Champollion: Skyrim release here, Fallout 4 release here, source at GitHub here.  It seems to do a good job, though it has a few issues that need manual tweaking. E.g., it exports Event/EndEvent as Function/EndFunction, so you need to be able to identify on your own what should be coded as an Event not a regular Function.  It generally helps if you have source to some version of what you want to work on, or something very similar to it, or just a lot of general familarity with Papyrus scripting.  One thing that will help is taking PEX files for which you already have PSC, and exporting new PSCs with it from the PEX, then comparing the results to the original PSC.  Regardless, it'll still be much easier than trying to translate this old application's pseudo-Assembly into Papyrus source.  I'm sure it was of great value in its day, but it has clearly been surpassed.
  4. Sulhir
    Sulhir
    • premium
    • 91 kudos
    I managed to install it on my WX-64 machine. Installed to a non-protected directory (i.e. not Program Files x86), didn't run as admin, let it sit for a minute or so then hit cancel - at that point the security popup to grant the app permissions to install itself came up so I clicked yes for permissions and no for "do you really want to close the installer". Running as administrator may bypass that initial hiccup.
  5. HeirOfTheSeptems
    HeirOfTheSeptems
    • premium
    • 341 kudos
    Is there any way to have it output in the same papyrus code used for scripts in the CK?
  6. MelThorn
    MelThorn
    • member
    • 1 kudos
    Won't let me install. It says it needs installation to be on local hard drive.
    Yes, the path is correct. It still won't let me.
  7. jtzako
    jtzako
    • premium
    • 10 kudos
    I'm trying to use this but something is going wrong.

    If I take a working pex file as confirmed in-game then Decompile and then Compile the pex file (without even editing it) that pex file no longer works. (the script functions don't happen)

    Am I doing something wrong here?
    1. Zyrius93
      Zyrius93
      • member
      • 0 kudos
      TL; DR: This tool is not meant to restore the original .psc source code from a compiled .pex script. Rather it's meant to provide you with something human-readable for you to better understand the behavior of the examined script.

      A year late, and I haven't tested the download here yet. But from a technical perspective, .psc is compiled into a .pex file. The word compiled here is extremely important. It usually doesn't only mean it's translated into byte code or even binary code, but also that a lot of information is lost. Some things may be optimized to increase performance. Take c++ binaries, for example. It's impossible to decompile a C++ application and get the exact same source code back, if even something close to reality. The safest in looking at the behavior of an executable is to reverse engineer it and browse through its assembler code.

      Java, for example, can be fairly easily decompiled as its byte code is quite lossless - it even keeps the fully qualified names of classes, methods and fields, unlike C++. Names of fields are completely irrelevant to the CPU. All it needs to know is their location in memory, which usually is the start address of the object plus a specific offset. Thus all field names of C++ classes are lost. Looking at the function names, they get quite mutilated into something of the following format: __1486@myfunction@@moregibberishhere
  8. jakeoberg
    jakeoberg
    • BANNED
    • 34 kudos
    My pex shows up as the same thing with a d. No info though... Not sure how to see the text.. says done but then nothing happens
    1. AstroGazer
      AstroGazer
      • premium
      • 19 kudos
      Use notepad to view.
  9. dredd3110
    dredd3110
    • member
    • 29 kudos
    Hi OnelessName,

    Thanks you for this utility it's perfect!!
  10. steve40
    steve40
    • premium
    • 1,266 kudos
    Seems to work for short scripts, but produces rubbish when decompiling very long scripts such as the "_APBTestBirdScript01.pex" in my Skybirds mod:

    "undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined undefined, undefined "

    Edit: maybe update your mod description and provide a link to the compiler?
    1. ragnaroklucifer
      ragnaroklucifer
      • premium
      • 28 kudos
      Does your _APBTestBirdScript01 access arrays?