Is that legal in Europe?
Europe tends to be pretty good through, copyright wise.
In fact I'd be surprised if this code isn't taken off GitHub by a DCMA from Microsoft, as soon as it hits their lawyers' radars.
It's not illegal in itself. But you are easily opening yourself up to claims that the code you have written has been "tainted" by the disassembled code you have read and has therefore become a derivative work, which is going to be very to defend hard against.
Also note that even if it is decided that you have made a derivative work you might still successfully launch a fair use defense on the grounds on interoperability, see e.g. Sega v. Accolade[1].
That said, doing a proper clean-room reverse engineering with two teams kept separate is a much safer approach.