Where can you download Star Wars Knights of the Old Republic legally?

You don't download games legally. You buy them.