I would publish the code, it isn't like dll injection is some kind of secret. If somebody wanted to use it for malicious purposes all it takes is a quick google and there are multiple guides with sample code, etc.
Edit: If I remember right the Gametime+ code uses dll injection to grab hands from UB.