diff --git a/dis.rb b/dis.rb index 2eef6a3..4be0f1b 100755 --- a/dis.rb +++ b/dis.rb @@ -230,8 +230,8 @@ def get_data(addr) dump.each_line do |line| addr = line.hex - if exe.is_pie && ebx_thunk - if line =~ /call\s+#{"%x"%ebx_thunk}/ + if ebx_thunk + if line =~ /call\s+(0x)?#{"%x"%ebx_thunk}/ ebx = addr + 5 elsif line =~ /add\s+\$0x(\h+),%ebx/ #puts "%x => %x" % [ebx, ebx + $1.hex] @@ -266,7 +266,7 @@ def get_data(addr) operands.split(',').each do |operand| if operand =~ /(-?0x\h+)\((%rip|%ebx)\)/ if $2 == '%ebx' - if exe.is_pie + if exe.is_pie || ebx_thunk a = ebx + $1.hex end else