This answer provided a way to create a binary file in linux, is there such a convenient tool for windows?
                
                A: 
                
                
              Recompile those tools on windows? Shouldn't be too hard to do against a cygwin or mingw base environment.
                  crazyscot
                   2010-09-18 15:57:35
                
              Not by compiling ...
                  COMer
                   2010-09-18 16:42:35
                It is an error start from scratch a PE. Leave it to the linker. Compile a simple program, open it with a PE Editor and modify all that you want. Check this http://www.woodmann.com/collaborative/tools/index.php/Category:RCE_Tools
                  dgarcia
                   2010-09-20 14:39:32
                
                
                A: 
                
                
              
            You can start from here: http://www.phreedom.org/solar/code/tinype/ , then modify one of the files using a PE editor (e.g. CFF Explorer).
Programmatically, in Python you can use pefile to read/write the PE structure.
                  Vlad
                   2010-10-11 00:28:00