Glossary/Terminology

Managed vs Unmanaged

In C#, accessing memory directly is considered “unmanaged memory”, while memory that is handled by the garbage collector and CLR is considered “managed”. As an example, allocating memory via Marshal.AllocHGlobal will allocate unmanaged memory that can be written to via Marshal.Copy. Creating a byte array like byte[] bruh = new byte[] { 0x00}; will create a managed byte array that the garbage compiler will handle. Working with the Windows API involves working with unmanaged memory. To provide interoperability between these things, stuff like Pinvoke is used and the System.Runtime.InteropServices namespace.

Interop Situations ****

PE Structure

Please read 0xrick’s post for a comprehensive, detailed explanation. This is very summarized

The PE Structure contains multiple parts