decode raw-script