From f78333e3fe86ef0903362837e1e7df65d5fbb5e5 Mon Sep 17 00:00:00 2001 From: xtremegamer1 Date: Mon, 31 Oct 2022 03:32:01 -0600 Subject: [PATCH] Fixed typo and fixed nor vs nand fuckup --- src/vmprofiles/nand.cpp | 4 ++-- src/vmprofiles/nor.cpp | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/vmprofiles/nand.cpp b/src/vmprofiles/nand.cpp index 0638a5a..16553f5 100644 --- a/src/vmprofiles/nand.cpp +++ b/src/vmprofiles/nand.cpp @@ -21,10 +21,10 @@ profiler_t nand = { return instr.mnemonic == ZYDIS_MNEMONIC_NOT && instr.operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER; }, - // AND REG, REG + // OR REG, REG [](const zydis_reg_t vip, const zydis_reg_t vsp, const zydis_decoded_instr_t& instr) -> bool { - return instr.mnemonic == ZYDIS_MNEMONIC_AND && + return instr.mnemonic == ZYDIS_MNEMONIC_OR && instr.operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER && instr.operands[1].type == ZYDIS_OPERAND_TYPE_REGISTER; }, diff --git a/src/vmprofiles/nor.cpp b/src/vmprofiles/nor.cpp index 53bedbb..fd04544 100644 --- a/src/vmprofiles/nor.cpp +++ b/src/vmprofiles/nor.cpp @@ -21,10 +21,10 @@ profiler_t nor = { return instr.mnemonic == ZYDIS_MNEMONIC_NOT && instr.operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER; }, - // OR REG, REG + // AND REG, REG [](const zydis_reg_t vip, const zydis_reg_t vsp, const zydis_decoded_instr_t& instr) -> bool { - return instr.mnemonic == ZYDIS_MNEMONIC_OR && + return instr.mnemonic == ZYDIS_MNEMONIC_AND && instr.operands[0].type == ZYDIS_OPERAND_TYPE_REGISTER && instr.operands[1].type == ZYDIS_OPERAND_TYPE_REGISTER; }, @@ -51,7 +51,7 @@ profiler_t nor = { }}}, [](zydis_reg_t& vip, zydis_reg_t& vsp, hndlr_trace_t& hndlr) -> std::optional { - vinstr_t res{mnemonic_t::nand}; + vinstr_t res{mnemonic_t::nor}; res.imm.has_imm = false; // MOV [VSP+OFFSET], REG