diff --git a/src/core/cpu_patches.cpp b/src/core/cpu_patches.cpp index 39cfc239..2a9cf5e2 100644 --- a/src/core/cpu_patches.cpp +++ b/src/core/cpu_patches.cpp @@ -44,6 +44,10 @@ static Xbyak::Address ZydisToXbyakMemoryOperand(const ZydisDecodedOperand& opera ASSERT_MSG(operand.type == ZYDIS_OPERAND_TYPE_MEMORY, "Expected memory operand, got type: {}", static_cast(operand.type)); + if (operand.mem.base == ZYDIS_REGISTER_RIP) { + return ptr[rip + operand.mem.disp.value]; + } + Xbyak::RegExp expression{}; if (operand.mem.base != ZYDIS_REGISTER_NONE) { expression = expression + ZydisToXbyakRegister(operand.mem.base);