Copyright (c) 2008 Aex.Uni & Aaron J. Miller
Version 1.0

THIS IS FREE SOFTWARE, BUT IT CONTAINS ABSOLUTELY NO WARRANTY OF ANY KIND.
THIS MAY DAMAGE IMPORTANT FILES, USE AT YOUR OWN RISK.

Call from command line via Microsoft's Command Prompt or Aex.Uni's Command Prompt

PROPER SYNTAX:
	PEMOD.EXE	"file.exe" [operation] [option]

If you call PEMOD.EXE giving ONLY a filename, it will dump the PE information of that file to the
console. If you call PEMOD from the command line and add a ">" token, followed by a file name, then
PEMOD will dump the PE information specified to a file (Specified by the file name following the
token).

KEY
	*****		This means "any number"
	$$$$$		This means "any string"

VALID OPERATIONS AND THEIR CORROSPONDING OPTIONS:
	machine=
		unknown				Set the machine to 0x000
		alpha				Set the machine to 0x184
		arm				Set the machine to 0x1c0
		alpha64				Set the machine to 0x284
		i386, 386, or x86		Set the machine to 0x14c
		ia64, x64, x86-64		Set the machine to 0x200
		m68k				Set the machine to 0x268
		mips16				Set the machine to 0x266
		mipsfpu				Set the machine to 0x366
		mips16fpu			Set the machine to 0x466
		powerpc, or ppc			Set the machine to 0x1f0
		r3000, or r3k			Set the machine to 0x162
		r4000, r4k, or mips		Set the machine to 0x166
		r10000, or r10k			Set the machine to 0x168
		sh3				Set the machine to 0x1a2
		sh4				Set the machine to 0x1a6
		thumb				Set the machine to 0x1c2

	subsystem=
		unknown				Set the subsystem in the optional header to 0x0000
		native				Set the subsystem in the optional header to 0x0001
		gui, win32, or windows		Set the subsystem in the optional header to 0x0002
		cui, or console			Set the subsystem in the optional header to 0x0003
		posix				Set the subsystem in the optional header to 0x0007
		cegui, or wince			Set the subsystem in the optional header to 0x0009
		efiapp				Set the subsystem in the optional header to 0x000A
		efibsd				Set the subsystem in the optional header to 0x000B
		efird				Set the subsystem in the optional header to 0x000C
		xbox				Set the subsystem in the optional header to 0x000E
	subsystem.major=
		*****				Set the major subsystem version
	subsystem.minor=
		*****				Set the minor subsystem version
	linker.major=
		*****				Set the major linker version
	linker.minor=
		*****				Set the minor linker version
	characteristics+
	characteristics-
		relocs_stripped			Add/Remove 0x0001 flag for characteristics
		executable_image		Add/Remove 0x0002 flag for characteristics
		line_nums_stripped		Add/Remove 0x0004 flag for characteristics
		local_syms_stripped		Add/Remove 0x0008 flag for characteristics
		aggressive_ws_trim		Add/Remove 0x0010 flag for characteristics
		large_address_aware		Add/Remove 0x0020 flag for characteristics
		16bit_machine			Add/Remove 0x0040 flag for characteristics
		bytes_reversed_lo		Add/Remove 0x0080 flag for characteristics
		32bit_machine			Add/Remove 0x0100 flag for characteristics
		debug_stripped			Add/Remove 0x0200 flag for characteristics
		removable_run_from_swap		Add/Remove 0x0400 flag for characteristics
		system				Add/Remove 0x1000 flag for characteristics
		dll				Add/Remove 0x2000 flag for characteristics
		up_system_only			Add/Remove 0x4000 flag for characteristics
		bytes_reversed_hi		Add/Remove 0x8000 flag for characteristics

EXAMPLES:
	PEMOD.EXE "notepad.exe"						Dumps notepad's PE info
	PEMOD.EXE "notepad.exe" subsystem= console			Notepad will now startup with a console
	PEMOD.EXE "notepad.exe" subsystem.major= 4			Notepad will now startup on Windows NT 4.0 machines and up
	PEMOD.EXE "notepad.exe" characteristics- executable_image	Notepad will no longer startup

REASON FOR MAKING THIS:
	This was made for my operating system. The idea was to make my boot loader load a Win32 PE file -- The kernel. In doing this
	I could develop my kernel in Microsoft Visual C++ (Specifically the 2003 toolkit). However it came to my attention that the
	NTOSKRNL.EXE's subsystem was 0x0001 ("Windows Native Subsystem"), so I thought to myself "I'll probably need to get my kernel
	to use this native subsystem so that it can't be run as another process or be mistaken for an actual "end-user program".
	Anyways, I eventually made this program and added a few extra features. I have another program called "Aex.Uni PE Explorer",
	that lets you view a PE in a nice Windows GUI interface -- no editing support as of yet.
