d04428b42e44cdb57c651dc6b6c585e2b11fe188
Replace the two-attempt read with a single read sized to the smaller of: - detourLength + 16 (the decoder's preferred window), and - bytes remaining in the current page (so ReadProcessMemory does not fail whole read). Reading only detourLength bytes could leave the instruction analyzer without enough bytes to resolve a multi-byte instruction that crosses the splice point on sparse prologues. Reading up to the page boundary gives the largest safe window. Tests: 199 passing, 4 integration/interactive skipped.
WhiteMagic
Wite Magic is a C# library to read, write and execute remote code into a target process for analysis, debuging and mod creation.
Languages
C#
100%