You do it on Windows as you would do with any other file extension.
Create an entry for the file extension a matching class and the assigned operation and icon file in the Registry
Example for sublime-menu file extension
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.sublime-menu]
@="sublime_text.menu"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\sublime_text.menu\DefaultIcon]
@="C:\\Apps\\Sublime\\myicons.dll,10"
[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\sublime_text.menu\shell\open\command]
@="C:\\Apps\\Sublime\\sublime_text.exe \"%1\""
You can point to icon resource dlls or and *.ico file directly. You can assign anything you want.