While we generally think it's a better idea to make plugins from scratch, the easiest way to figure out how to do that is to use a plugin template to get a feel for the general initialization and shutdown routines necessary. Here's a list of the plugin templates various people have made.
Virindi hosts a public repository with various Decal related source code on it at http://www.virindi.net/source/.
Mag-nus has a plugin template available and you might find this VNBoards thread useful.
Wolf has a Decal.Adapter plugin template available. It's a little dated, but it should still work without major changes. Lino has also made a modified version available.