From Source to Binaries – The Journey of a C Program
In this chapter, we will learn the basics of how compilers package EXE binaries from C code and techniques for system processes to execute. These basic concepts will build your understanding of how Windows compiles C into programs and links them across system components. You will also understand the program structure and workflow that malware analysis and evasion detection should follow.
In this chapter, we’re going to cover the following main topics:
- The simplest Windows program in C
- C compiler – assembly code generation
- Assembler – transforming assembly code into machine code
- Compiling code
- Windows linker – packing binary data into Portable Executable (PE) format
- Running compiled PE executable files as dynamic processes