You are reading the data into the pointer rather than the buffer. Fix it like this:
ClientSocket.ReceiveBuf(pointer(a)^,Len,0);
It would be much easier to read directly into an AnsiString variable mind you.
var
str: AnsiString;
....
SetLength(str, Len);
ClientSocket.ReceiveBuf(pointer(str)^,Len,0);