Decoder function hex - dec

great, this works.

additionally, since this is a stream of bytes, how can I extract the last four bytes also and decode all of them at the same time ?