legally and reasonably
Yes. Microsoft is spending billions an year for Microsoft Research. It's the largest R&D center on planet, and they have made some remarkable things. Note that this isn't only about software patents, it's also hardware and true technical research. On the other hand, Google has never really done any R&D of their own. Their only own services are search engine and their advertising platform. Everything else is bought in, including youtube, google maps, gmail and so on. Hell, just recently Google banned one of their employees from publishing research on social networking on internet, even after initially approving it (and why he wrote it in the first place). He left and went to work for Facebook instead. But he still is not allowed to publish that research paper.