As far as I know, global and static variables are stored in heap memory, while local variables are on stack memory. I think this is the case when we speak about a binary file (like PE) that is located in memory. If this is correct, I am wondering: Are local and global variables stored plainly in a disk image (binary in Disk), can we see them directly by inspecting the disk image?