Advertisement
Guest User

Untitled

a guest
Oct 9th, 2018
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. main:
  2.     stack_reserve: equ 40      ; 32 + 8
  3.     sub     rsp, stack_reserve ; shadow space for callees + 8 bytes for stack alignment
  4.  
  5.     ;; calculate the random number
  6.     rdtsc   ; read TSC (Time Stamp Counter) into edx:eax
  7.     mov     rcx, rax
  8.     call    srand
  9.     call    rand
  10.  
  11.     ;; rand = (rand % 100) + 1
  12.     mov     ecx, 100
  13.     mul     ecx
  14.     inc     edx
  15.     mov     [target], ecx
  16.     mov     rcx, scan_fmt
  17.     call    printf
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement