-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
arch:x86x86 issuesx86 issues
Description
# clang -nostdlib -static -o magic magic.s
.intel_syntax noprefix
.global magic
.type magic, @function
magic:
mov edx, edi
xor eax, eax
mov ecx, edx
bswap ecx
test cl, cl
js .L_loop
jmp .L_end
.L_loop:
shr edx, 1
cmc
rcl eax, 1
jno .L_loop
add eax, 0x6AF6F607
sete al
.L_end:
ret
.size magic, .-magiccabal run exe:macaw-x86-dump -- discover magic
-- snip --
translation error Unsupported instruction at 0x401010: II {iiLockPrefix = NoLockPrefix, iiAddrSize = Size64, iiOp = "cmc", iiArgs = [], iiPrefixes = Prefixes {_prLockPrefix = NoLockPrefix, _prSP = SegmentPrefix {unwrapSegmentPrefix = 0}, _prREX = 0b00000000, _prVEX = Nothing, _prASO = False, _prOSO = False, _prNoTrack = False}, iiRequiredPrefix = Nothing, iiOpcode = [245], iiRequiredMod = Nothing, iiRequiredReg = Nothing, iiRequiredRM = Nothing}
Program adapted from the binsec tutorial.
Metadata
Metadata
Assignees
Labels
arch:x86x86 issuesx86 issues