don't quote me on that but i read somewhere that microsoft has a strict policy of NIH in their codebase - everything gets reimplemented from scratch unless it's completely unfeasible.
The only problem might be the software patents that their code leverages.
If the licensed code was written by a patent licensee, then to replicate it in-house you’d also need to license the patent yourself.
In other words, the patent licensee may have a license to write and distribute their specific piece of software, but not to sublicense that to other people to write their own software, just to use the parent company's patent license. That is actually probably a common patent-license scenario, microsoft doesn't automatically get sublicensing rights just because they bought software developed by a licensee.
BSD license, because Berkeley was literally paid to port TCP/IP to Unix (and C) on basis that the resulting code would be available for incorporation by others free of charge.
The only problem might be the software patents that their code leverages.