CONVERTER
Script-to-EXE compiler — reverse-engineered from Bat_To_Exe_Converter (f2ko.de) using Ghidra 12 static analysis, then reimplemented in pure Python.

What It Does

Converts .bat .ps1 .vbs .js .py scripts into standalone Windows .exe files that run without any interpreter installed. Supports invisible mode (no console window), custom icons, and UAC elevation manifest.

How It Works — Discovered via Reverse Engineering

MECHANISM (from Ghidra decompilation)
  input.bat
      |
      v
  stub_x64.exe  --copy-->  output.exe
                                |
                    BeginUpdateResourceW()
                    UpdateResourceW(RT_RCDATA, 1, script_bytes)
                    UpdateResourceW(RT_RCDATA, 2, b"batcmd.exe /c")
                    EndUpdateResourceW()
                                |
                    [at runtime]
                    ExtractResource -> %TEMP%\~xyz.bat
                    ShellExecute("cmd.exe /c %TEMP%\~xyz.bat")
                    Sleep -> DeleteFile(%TEMP%\~xyz.bat)
  

Usage

python converter.py input.bat output.exe

python converter.py input.ps1 output.exe --invisible

python converter.py input.py output.exe --icon myicon.ico --uac-admin

Source

Full Python source available in converter.py in this Space's file browser. Windows-only (requires ctypes.windll for resource injection).

Part of the ARTEMIS ecosystem · ftrtemis