After sniffing http traffic mystery solved! There shouldn't be any spaces after filename="xxx" string, also binary transfer encoding is not needed. So here is working function:
Function UploadXML(strFileName As String, Optional strUserName As String, Optional strPassword As String) As String...