I would recommend Windows Messages for keyboard and mouse. For controllers, it depends on your target. If you are targeting the Windows Store, XInput is your only choice there. It gives you support for XBox 360 controllers. If you want to support legacy DirectInput controllers and don't want to target Windows Store, then DirectInput (or a combination of XInput and DirectInput) is an option.
Instead of using a destination rectangle to specify the position, try using a Vector2. The origin parameter makes more sense when dealing with a position, than it does with a destination rectangle. With a Vector2 position, you can be sure that your object will be centered over the position, assuming you have specified the origin correctly.
I have never had any success specifying an origin with a destination rectangle. If you need to draw the image larger than its actual source image, then you'll need to play with the scale transform. If so, be aware that the scale transform has to be accounted for in your position values and, if I remember correctly, your origin value as well. To be safe, start with leaving the origin as is and, if that doesn't work, try inverse-scaling the origin. If that doesn't work, try scaling the origin.
The origin parameter to SpriteBatch.Draw is relative to the upper left corner of the image rectangle being drawn. To draw a sprite centered on a point, set the origin value to the center of the object being drawn (e.g. a 32x32 image would use an origin of 16,16) and, for the target position, specify the position where you want the image centered (e.g. the center of the target object).
The problem is that you declare retVal as a pointer to cbuf, but you never assign it a value. Thus, retVal is an invalid pointer with a random value. When you start assigning to is cbuf properties, you start overwriting memory that does not belong to it.
The problem is that that code executes 60 times a second, so there is a very good chance that it will execute multiple times before the user lets go of a key. You need to track the input state from both the current frame and the previous frame. That way you can detect and act on a key press the first frame in which it is pressed and ignore it until its state changes again.
Have a look at the Game State Management sample in the XNA Education Catalog. There is an InputState class that handles that aspect for you.