> recv(AcceptSock, recvBuff, sizeof(recvBuff), 0);
This probably contains the length, and the first part of the file.

Look at the received length of data.
Extract the file size information, and save the rest to the file.

Storing the received data fragments in a temp array is a waste of effort IMO.
You may as well just save the fragments to a file.