mirror of
https://github.com/boykopovar/AnyPS5.git
synced 2026-10-28 12:05:06 +00:00
Each in-place substitution went through X64InstructionRewriter::Rewrite, which copies the whole code segment and decodes every instruction in it to adjust references. The converter only accepts equal-length replacements, so the adjustment is always zero and the copy and scan are wasted: conversion time grew by one segment scan per substitution. Copy the replacement bytes into the segment instead.