Split out the packet parsing from the main function body in rmdec.c