You cannot add muscle eating 500kcal/day. It's just an impossibility.
From your brief history (weight appearing out of nowhere, occasional alcohol, occasional fast food, etc) me thinks you need more control over what goes in and when as well as keeping a detailed log