NSIS plugins are regular DLLs that export functions with typical def-files like this:
LIBRARY MY_NSIS_PLUGIN EXPORTS AddUser PRIVATE CreateHive PRIVATE ...
They should be put to “C:\Program Files\NSIS\Plugins\x86-ansi” directory for NSIS v3.x. From nsi-script their functions can be called like this:
Function MyFunc ... MY_NSIS_PLUGIN::CreateHive ... FunctionEnd