Why does the Hamming window attenuate the FFT?
You can figure the change in energy applied to your signal by analyzing the energy in your window.  The Hamming window's energy (or scaling) is well known and Google will tell you what it is.  You are doing something different. Can you post your code for further help?

From your code, ans your image, it really appears that you applied the window to your transformed data.  The window (in this case) is applied to the time data before the transform.  The window will reduce sidelobes from strong frequency components.  Take note that taper windows cause the so-called "spectral leakage" where energy leaks into other frequency bins