SHARE
TWEET

Untitled

a guest Oct 21st, 2019 72 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. .text
  2. .globl _start
  3.  
  4. _start:
  5.     pop %r9
  6.     pop %r9
  7.  
  8.     mov $2, %rax
  9.     pop %rdi
  10.     mov $0, %rsi
  11.     syscall
  12.  
  13.     mov %rax, %rdi
  14.     mov $0, %rax
  15.     mov $buf, %rsi
  16.     mov $buflen, %rdx
  17.     syscall
  18.  
  19.     mov $0, %r9
  20.     mov %rax, %r11
  21.     pop %r14
  22. loop:
  23.     mov %r9, %r10
  24.     add $buf, %r10
  25.     mov %r9, %r12
  26.     add $buf2, %r12
  27.     xor %r14, %r10
  28.     mov %r10, (%r12)
  29.     inc %r9
  30.     cmp %r9, %r11
  31.     jne loop
  32.  
  33.     mov %rax, %rdx
  34.     mov $1, %rax
  35.     mov $1, %rdi
  36.     mov $buf2, %rsi
  37.     syscall
  38.  
  39.     jmp _exit
  40.  
  41. _exit:
  42.     mov $60, %rax
  43.     mov $0, %rdi
  44.     syscall
  45.  
  46. .data
  47.     file: .fill 128, 1, 0
  48.     size = . - file
  49.     buf: .fill 1000, 1, 0
  50.     buflen = . - buf
  51.     buf2 : .fill 1000, 1, 0
  52.     buf2len = . - buf2
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top