[PATCH v3 1/2] mspatcha: Implement ApplyPatchToFile and related functions.