From 65de67b24fa02c5466702ce6137d258e051283fa Mon Sep 17 00:00:00 2001 From: Igor Pissolati Date: Mon, 20 Oct 2025 22:52:56 -0300 Subject: [PATCH] Use hard-coded values instead of calling __cpuidex --- src/analyzer/main.cpp | 20 +++++--------------- 1 file changed, 5 insertions(+), 15 deletions(-) diff --git a/src/analyzer/main.cpp b/src/analyzer/main.cpp index baa97b27..f28eec20 100644 --- a/src/analyzer/main.cpp +++ b/src/analyzer/main.cpp @@ -507,21 +507,11 @@ namespace if (leaf == 1) { - std::array regs = {0, 0, 0, 0}; - __cpuidex(regs.data(), static_cast(leaf), static_cast(sub)); - uint32_t eax = static_cast(regs[0]); - uint32_t ebx = static_cast(regs[1]); - uint32_t ecx = static_cast(regs[2]); - uint32_t edx = static_cast(regs[3]); - - // Disable SSE4.x - ecx &= ~(1u << 19); // SSE4.1 - ecx &= ~(1u << 20); // SSE4.2 - - emu.reg(x86_register::eax, eax); - emu.reg(x86_register::ebx, ebx); - emu.reg(x86_register::ecx, ecx); - emu.reg(x86_register::edx, edx); + // NOTE: We hard-code these values to disable SSE4.x + emu.reg(x86_register::eax, 0x000906EA); + emu.reg(x86_register::ebx, 0x00100800); + emu.reg(x86_register::ecx, 0xFFE2F38F); + emu.reg(x86_register::edx, 0xBFEBFBFF); return instruction_hook_continuation::skip_instruction; }