393ae9e...
by
=?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>
Add changelog entry
a70a751...
by
=?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>
nop-align hooks to page boundary
Some systems might prefer hooks to no straddle page boundaries. In case
hook would fall in such area, apply nop-sled to ensure it falls into a
single page.
294d92d...
by
=?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>
Properly handle hook limits
dca3c3b...
by
=?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>
Make hook installation w^x-compatible
Some systems have stricter checks for w^x pages. In order to better
accomodate those, make sure we properly flip permissions of pages
carrying hooks.
49d1bc9...
by
=?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>
Provide error logging in case of hook table allocation failure
5fb1c5a...
by
=?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>
Split hook installation into page-bound chunks
In some cases, such as running OpenLoco through Wine on ARM-based macOS,
`WriteProcessMemory` fails with odd errors. It was narrowed down to
writing to executable region straddling page boundary.
This commit modifies calls to `WriteProcessMemory` such that it will be
potentially called multiple times, but only once per page. Assumes pages
are 4k, while in reality they might be 16k - still a multiple of 4k.
96c62a6...
by
=?utf-8?q?Micha=C5=82_Janiszewski?= <email address hidden>