I see you are not able to read something on winsock. but
this is part of exercise......as you will NOT know lot more than that....
the best way to do winsock is......
find out what you know (manually go through) and sync up with what you do not know (win sock script)
first thing before the script
run manually everything and think what are the thing changing....ask the developer if any dynamic value generated ??
then record the script....use lot of comments
after go to each buffer and look for those variable...
remember hex buffer size is in reverse...first line in the buffer you need to read 4 digit after the ASCII number \x means next 2 digit is HEX
mostly you need to work on send buffer
remember sometime port number change so you need to make sure go back to original port.
this is generally happened during start of the script....during login as login system sometime different then actual system you are testing.