DLL plugin code can be decompiled back to the C# code, at least to some degree. There's even free decompilers out there. Don't know if compiled macros could also be decompiled back to their C# or VB code too.
I dont think it is possible to fully decompile the dll back to c#. C# is a high level language, so there is a lot of low level code that is hidden within other functions which are linked to other dlls.
Decompiling to assembly is possible and also i believe c.
However.... the output depends upon how inteligent the decompiler is. A uccnc function for instance uc.code() will be created from many lines of actual code to allow a string value to be passed to uccnc so decompiling that function will look very different / complex.
..... anything is possible.... but how much time do you want to expend in decompiling it..... in the case of a thc.... you still need the external hardware device and code for the mcu. Windows is not realtime so some stuff can be sporatic depending upon what else is going on at the same time, hence evdn uccnc uses a buffer (a small one).
As i said earlier .... just code it to use a licence file which uses the serial number of the device and maybe also the device type (also able to be called by field)