Thanks jtv, that is really useful code and very much appreciated. Definitely going to incorporate that into my future projects.
One catch for me is the tool I am using only spits out AES CBC 128 given it is only worried about some minor obsfucation so I still need to somehow crack my issue. If you have any ideas I am all ears. Thanks again