summaryrefslogtreecommitdiff
path: root/lib/interception/interception_win.cc
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:22 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-06-26 20:33:22 +0000
commit10fcf738d732204a1f1e28878d68a27c5f12cf3b (patch)
tree7c66ecc62314115c1e895c238381883363acafd8 /lib/interception/interception_win.cc
parent4658ff5fee0369e08fe69bce90019fad154d9330 (diff)
Diffstat (limited to 'lib/interception/interception_win.cc')
-rw-r--r--lib/interception/interception_win.cc7
1 files changed, 6 insertions, 1 deletions
diff --git a/lib/interception/interception_win.cc b/lib/interception/interception_win.cc
index e4f3d358f40c..b2902d57f542 100644
--- a/lib/interception/interception_win.cc
+++ b/lib/interception/interception_win.cc
@@ -477,7 +477,7 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
switch (*(u8*)address) {
case 0xA1: // A1 XX XX XX XX XX XX XX XX :
// movabs eax, dword ptr ds:[XXXXXXXX]
- return 8;
+ return 9;
}
switch (*(u16*)address) {
@@ -495,6 +495,11 @@ static size_t GetInstructionSize(uptr address, size_t* rel_offset = nullptr) {
case 0x5741: // push r15
case 0x9066: // Two-byte NOP
return 2;
+
+ case 0x058B: // 8B 05 XX XX XX XX : mov eax, dword ptr [XX XX XX XX]
+ if (rel_offset)
+ *rel_offset = 2;
+ return 6;
}
switch (0x00FFFFFF & *(u32*)address) {