Extract path_of and value_of outside of guess_patch, for reuse.
Add resource dumper.