This is a very simple mouse button remapping application that uses a win32 mouse API that has been included in Windows since XP. It's a relatively limited application as a result, but it does what it says on the tin very efficiently.
This software hijacks button input for all connected mice, so if you use it to map buttons on one device (like a), but still want to use OEM software for mice and other devices, make sure to disable the application from its system tray icon as needed.
The hooks this software uses are pretty limited. Specifically, XMBC can't detect (and therefore can't map) more than five mouse buttons (left, middle, right, backward and forward). It's also impossible to determine which input device is being intercepted, so there's no way to limit the effects of a given profile to a single input device.