Patch binary with the use of patterns