Sha256: f6304ae54e89a8419252ff93e29b4303eb3f7c3368b16fc17ae77012ea2648d1

Contents?: true

Size: 589 Bytes

Versions: 6

Compression:

Stored size: 589 Bytes

Contents

#!/usr/bin/env ruby
#    This file is part of Metasm, the Ruby assembly manipulation suite
#    Copyright (C) 2006-2009 Yoann GUILLOT
#
#    Licence is LGPL, see LICENCE in the top-level directory


#
# quick demonstration that the disassembler's backtracker works
#

require 'metasm'
Metasm.require 'samples/metasm-shell'

puts <<EOS.encode.decode
.base_addr 0

; compute jump target
mov ebx, 0x12345678
mov eax, ((toto + 12) ^ 0x12345678)
xor eax, ebx
sub eax, 12

; jump
call eax

; trap
add eax, 42
; die, you vile reverser !
db 0e9h

; real target
toto:
mov eax, 28h
pop ebx
ret

EOS

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
metasm-1.0.5 samples/dasm-backtrack.rb
metasm-1.0.4 samples/dasm-backtrack.rb
metasm-1.0.3 samples/dasm-backtrack.rb
metasm-1.0.2 samples/dasm-backtrack.rb
metasm-1.0.1 samples/dasm-backtrack.rb
metasm-1.0.0 samples/dasm-backtrack.rb