Where are the Main network magic bytes stored in bitcoin's source code?
See the file chainparams.cpp in the constructor for class CMainParams:

pchMessageStart[0] = 0xf9;
pchMessageStart[1] = 0xbe;
pchMessageStart[2] = 0xb4;
pchMessageStart[3] = 0xd9;