Serialize SMB message into buffer