Well if you are stuck down to $400, you are best go go with an AMD A10-6800k or similar, they have a few units almost the exact same with similar names but it makes little difference as long as the "k" is on the end. This is to save money cause you won't want to buy a GPU. After buying Windows, RAM, the CPU, storage, PSU, case, and a disk drive you won't really have enough money for a GPU so if you want to play games this is your only real option.
If you have $500, that changes things a bit where you could get an AMD FX 6300 and still have about $100 left for a decent low end GPU. Please note these estimates don't include keyboard, mouse, speakers, or display. If you need all that stuff then you are better to get a laptop cause your budget won't allow you to get everything and actually play games on low settings.
For overclocking we can discuss that more once you are more positive on your budget and you select which way you want to go.