Update threads.c

Hey I had to change the way the esp and ebp were assigned, but the way I have it now has been working when I test it. I tried to change the align to a more manual version that should run on the cs machines. I've been testing it on my own machine, and it's been working with his tests at least...