We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3e0b576 commit 7946d7aCopy full SHA for 7946d7a
src/SlimDetours/Instruction.c
@@ -767,15 +767,15 @@ BOOL
767
detour_does_code_end_function(
768
_In_ PBYTE pbCode)
769
{
770
- ULONG Opcode = fetch_opcode(pbCode);
771
-
772
// When the OS has patched a function entry point, it will incorrectly
773
// appear as though the function is just a single branch instruction.
774
if (detour_is_code_os_patched(pbCode))
775
776
return FALSE;
777
}
778
- if ((Opcode & 0xfffffc1f) == 0xd65f0000 || // br <reg>
+
+ ULONG Opcode = fetch_opcode(pbCode);
+ if ((Opcode & 0xffbffc1f) == 0xd61f0000 || // ret/br <reg>
779
(Opcode & 0xfc000000) == 0x14000000) // b <imm26>
780
781
return TRUE;
0 commit comments