aboutsummaryrefslogtreecommitdiff
path: root/subhook_x86.c
diff options
context:
space:
mode:
authorLuke Usher <luke.usher@outlook.com>2018-01-30 12:02:37 +0000
committerLuke Usher <luke.usher@outlook.com>2018-01-30 12:02:37 +0000
commitbbdf49b5181bd6541d1d14aa8f12538a86cdb91c (patch)
tree57375a6eba1f66f3e4306008f396535b86e4c389 /subhook_x86.c
parent698d2307a4fa710174cda398a023389ff804f385 (diff)
downloadsubhook-bbdf49b5181bd6541d1d14aa8f12538a86cdb91c.zip
subhook-bbdf49b5181bd6541d1d14aa8f12538a86cdb91c.tar.gz
subhook-bbdf49b5181bd6541d1d14aa8f12538a86cdb91c.tar.bz2
Add CMP r/m16/32m, imm8 to subhook.
Fixes an issue where some Xbox functions were not getting functioning trampolines.
Diffstat (limited to 'subhook_x86.c')
-rw-r--r--subhook_x86.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/subhook_x86.c b/subhook_x86.c
index 688fb88..6280bcf 100644
--- a/subhook_x86.c
+++ b/subhook_x86.c
@@ -117,6 +117,7 @@ static size_t subhook_disasm(void *src, int32_t *reloc_op_offset) {
static struct opcode_info opcodes[] = {
/* CALL rel32 */ {0xE8, 0, IMM32 | RELOC},
/* CALL r/m32 */ {0xFF, 2, MODRM | REG_OPCODE},
+ /* CMP r/m16/32, imm8*/ {0x83, 7, MODRM | REG_OPCODE | IMM8 },
/* JMP rel32 */ {0xE9, 0, IMM32 | RELOC},
/* JMP r/m32 */ {0xFF, 4, MODRM | REG_OPCODE},
/* LEA r32,m */ {0x8D, 0, MODRM},