E-strings and N = 4 topological Yang-Mills theories