code cleanup
use argparse in utils-process
only subtract from length when ptr is non-null
do not overwrite registry key root handles etc