Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ; nasm fakedate.asm -fbin -o FAKEDATE.COM
- BITS 16
- org 100h
- section .text
- start:
- jmp INIT
- setter:
- cmp ah, 2Ah
- jne dosjmp
- mov cx, word [cs:year]
- mov dh, byte [cs:month]
- mov dl, byte [cs:day]
- iret
- dosjmp:
- db 0xEA
- dw 0
- dw 0
- year dw 1993
- month db 10
- day db 10
- INIT:
- push cs
- pop ds
- mov ah,9
- mov dx,0
- mov dx, fakedate
- int 21h
- mov ax,3521h
- int 21h
- mov si,80h
- mov cl,byte [si]
- lp:
- dec cl
- jle load
- inc si
- cmp byte [si],20h
- je lp
- cmp byte [si],'/'
- jne next
- cmp byte [si+1],'u'
- je ul
- cmp byte [si+1],'U'
- jne load
- ul:
- call instaled
- mov dx, unist
- jne sc
- push bx
- push es
- mov dx,word [es:bx+dosjmp-setter+1]
- mov ds,word [es:bx+dosjmp-setter+3]
- mov ax,2521h
- int 21h
- push cs
- pop ds
- mov dx,unist
- mov ah,9
- int 21h
- pop ax
- pop dx
- push cs
- pop cx
- sub dx, setter
- jnc f
- sub ax,1000h
- f:
- sub cx,ax
- shl cx,4
- sub cx,dx
- cmp cx, INIT
- jne noul
- mov ds,ax
- int 27h
- next:
- cmp cl, 7
- jl load
- add si, 7
- ; DD
- mov cx, 0
- mov dx, 1
- dpos:
- mov ax, 0
- mov al, byte [si]
- sub al, '0'
- imul ax, dx
- add cl, al
- dec si
- imul dx, 10
- cmp dl, 100
- jne dpos
- mov byte [cs:day], cl
- ; MM
- mov cx, 0
- mov dx, 1
- mpos:
- mov ax, 0
- mov al, byte [si]
- sub al, '0'
- imul ax, dx
- add cl, al
- dec si
- imul dx, 10
- cmp dl, 100
- jne mpos
- mov byte [cs:month], cl
- ; YYYY
- mov cx, 0
- mov dx, 1
- ypos:
- mov ax, 0
- mov al, byte [si]
- sub al, '0'
- imul ax, dx
- add cx, ax
- dec si
- imul dx, 10
- cmp dx, 10000
- jne ypos
- mov word [cs:year], cx
- load:
- call instaled
- jne notinst
- mov ah,9
- mov dx, already
- int 21h
- mov dx, ulinst
- sc:
- mov ah,9
- int 21h
- noul: int 20h
- notinst:
- mov word [dosjmp+1],bx
- mov word [dosjmp+3],es
- mov dx, setter
- mov ax,2521h
- int 21h
- mov dx, inst
- mov ah,9
- int 21h
- mov dx, ulinst
- int 21h
- mov dx, INIT
- int 27h
- instaled:
- mov ax,word [es:bx]
- cmp ax,word [cs:setter]
- jne no
- mov ax,word [es:bx+2]
- cmp ax,word [cs:setter+2]
- jne no
- mov ax,word [es:bx+4]
- cmp ax,word [cs:setter+4]
- jne no
- mov ax,word [es:bx+6]
- cmp ax,word [cs:setter+6]
- jne no
- mov ax,word [es:bx+8]
- cmp ax,word [cs:setter+8]
- jne no
- mov ax,word [es:bx+10]
- cmp ax,word [cs:setter+10]
- no: ret
- section .data
- wten dw 10
- fakedate db 'FakeDate by Lee Killough, modified by Evan Ramos',0ah,0dh,'$'
- already db 'FakeDate is already installed.',0ah,0dh,'$'
- ulinst db 'Type FakeDate /u to uninstall.',0ah,0dh,'$'
- inst db 'FakeDate installed.',0ah,0dh,'$'
- unist db 'FakeDate uninstalled.',0ah,0dh,'$'
Advertisement
Add Comment
Please, Sign In to add comment