If you want to skip straight to the piracy, here's an open source package for you, complete with keys, hosted ironically on Microsoft servers, that uses vlmcsd: https://github.com/ekistece/vlmcsd-autokms
It's a pretty clever hack. It runs the KMS emulator locally and fakes the network connection with a TAP device from OpenVPN. Works perfectly.