;**************************************************************************** ; Funny resident prank program, which hooks timer tick and slows whole PC ; down... ; Exellent to make praktical jokes... ; Allows disabling of the program, when YOU need to use the computer... :-) ; It is even able to slow the Windows 3.x ... but then it must be loaded ; before the windows starts... ; CIS: Some problems were detected during the disabling... :-( ;**************************************************************************** ; Coded by ThunderLord, aka oPCoder... ; http://www.geocities.com/ResearchTriangle/7060/ ;**************************************************************************** IDEAL MODEL tiny delay EQU 0010h ; Amount of delay BIOSData EQU 040h ; BIOS data segment address LowTimer EQU 006Ch ; Address of low timer word PIC8259 EQU 0020h ; 8259 PIC chip port address EOI EQU 0020h ; End of interrupt value cr EQU 13 lf EQU 10 Red EQU 4 White EQU 7 DATASEG exCode DB 0 welcome DB cr,lf,"The CPU Tapper Utility" DB cr,lf,"Programmed by THuNDeRLoRD 1997",0 welcomeLen DW $ - welcome - 1 slogan DB "PHuCK aLL LaMeRS - THey WaSTe CPU PoWeR",0 sloganLen DW $ - slogan - 1 installed DB "CPU Tapper is installed...",0 installedLen DW $ - installed - 1 ninstalled DB "CPU Tapper was NOT installed!!!",0 ninstalledLen DW $ - ninstalled - 1 ainstalled DB "CPU Tapper is Allready installed!!!",0 ainstalledLen DW $ - ainstalled - 1 pass DB "Validate your identity:",0 passLen DW $ - pass - 1 denied DB "Access denied",0 deniedLen DW $ - denied - 1 disabled DB "CPU Tapper disabled...",0 disabledLen DW $ - disabled - 1 install DB "install",0 password DB 10 DUP (0),0 passCount DB 10 realPass DB "elev",0 timerSeg DW 0 ; Saved vector for original timerOfs DW 0 ; Int 1Ch ISR CODESEG ORG 100h ; Standard .COM start address (origin) EXTRN StrWrite:proc, StrWrite2:proc, NewLine:proc EXTRN ParamCount:proc, GetParams:proc, GetOneParam:proc EXTRN StrCompare:proc, ScBlink:proc, ScInit:proc, ScGotoXY:proc EXTRN ScReadXY:proc, ScPokeStr:proc, StrLength:proc, ScClrRect:proc EXTRN ScSetBack:proc, ScSetFore:proc, ScBright:proc Start: jmp JumpToCode ;Jumps over the TSR code ;**************************************************************************** ; Start of the TSR SlowMotion routine ;**************************************************************************** PROC SlowMo jmp short JumpOver ;jump over the variables status DW 0FFFFh ;status byte inProgress DB 0 ;In-progress flag (0=no, 1=yes) difference DW 10 ;Relative pause time ctimerSeg DW 0 ;Saved vector for original ctimerOfs DW 0 ; Int 1Ch ISR JumpOver: cmp [byte cs:inProgress], 0 ; Check in-progress flag jne @@99 ; Jump if SlowMo is running inc [byte cs:inProgress] ; Else, set flag = 1 sti ; Allow interrupts to occur push ax ; Save modified registers push ds push dx mov al, EOI ; al = end-of-interrupt value out PIC8259, al ; Issue end of interrupt mov ax, BIOSData ; Address BIOS data area mov ds, ax ; with ds mov ax, [word LowTimer] ; Get low word of timer value @@10: mov dx, [word LowTimer] ; Get new timer value into dx sub dx, ax ; Subtract new-old timer cmp dx, [cs:difference] ; Compare to difference jb @@10 ; Loop until difference passes ;----- Disable interrupts while we clean up and exit after the pause cli ; Disable interrupts dec [byte cs:inProgress] ; Reset in-progress flag pop dx ; Restore saved registers pop ds pop ax @@99: iret ; Interrupt return ENDP SlowMo ;**************************************************************************** ; End of the TSR code ;**************************************************************************** JumpToCode: push cs pop es ;make CS=ES call GetParams ;get commandline parameters call ScInit ;initialise screen mov di, offset welcome xor ch, ch mov cl, [byte welcomeLen] ;assign CX to length call StrWrite2 ;type welcome message call ParamCount ;get number of params or dl, dl jz AskPass xor cx, cx ;get 1'st parameter call GetOneParam ;get the addres of Para to DI mov si, offset install call StrCompare ;compare strings at SI and DI jne Temp jmp Installer ;Install the TSR Temp: jmp Lamer AskPass: mov al, Red ;Set Attributes call ScSetBack mov al, White call ScSetFore call ScBright call ScReadXY ;get current cur position push dx ;save current cur position mov ch, 09 ;coordinates of rectangle mov cl, 26 mov dh, 13 mov dl, 52 call ScClrRect ;Draw rectangle xor ch, ch mov cl, [byte passLen] ;cx <-- length of the string mov dh, 11 ;position of the message mov dl, 28 mov si, offset pass ;message to display call ScPokeStr ;put the string on screen pop dx ;restore the cur position call ScGotoXY ;put the cur in old position mov cx, 10 NextKey: mov ah, 8 ;DOS filtered char w/o echo int 21h ;call DOS cmp al, 13 ;test AL for Enter jz Entered mov bx, cx sub bx, 10 neg bx mov [password + bx], al ;copy the input key loop NextKey Lamer: mov di, offset slogan xor ch, ch mov cl, [byte sloganLen] ;assign CX to length call NewLine call StrWrite2 ;type lamer message call NewLine ;new line mov [exCode], 1 ;Lamer alert :-) jmp Exit ;jump to exit Entered: mov di, offset password mov si, offset realPass call StrCompare jne Lamer ;**************************************************************************** ; Disable routine ;**************************************************************************** mov ax, 351Ch ; Get interrupt 1C vector int 21h ; Call DOS for vector: ES - segment ; BX - offset cmp [word es:Status], 0FFFFh ;check status jne Not_Installed push ds mov ax, [es:ctimerSeg] ;get the old INT 1C vector mov ds, ax ; segment into DS mov ax, [es:ctimerOfs] ; offset into DX mov dx, ax mov ax, 251Ch ; Set interrupt 1C vector int 21h ; Set new interrupt vector pop ds ; Restore ds call NewLine mov di, offset disabled mov cx, [disabledLen] call StrWrite2 jmp exit Not_Installed: call NewLine mov di, offset ninstalled mov cx, [ninstalledLen] ;display message call StrWrite2 ;display message mov [exCode],2 ;exit code 2 jmp exit Installer: push es ; Save es register mov ax, 351Ch ; Get interrupt 1C vector int 21h ; Call DOS for vector: ES - segment ; BX - offset cmp [word es:Status], 0FFFFh ;check status jne New_Install call NewLine mov di, offset ainstalled mov cx, [ainstalledLen] ;display message call StrWrite2 ;display message mov [exCode],2 ;exit code 2 jmp Exit ;**************************************************************************** ; Installer routine ;**************************************************************************** New_Install: push es ; Save es register mov ax, 351Ch ; Get interrupt 1C vector int 21h ; Call DOS for vector mov [timerSeg], es ; Save segment value mov [cs:ctimerSeg], es mov [timerOfs], bx ; Save offset value mov [cs:ctimerOfs], bx pop es ; Restore es push ds ; Save ds register mov ax, 251Ch ; Set interrupt 1C vector push cs ; Make ds = cs to address pop ds ; the new ISR, placing full mov dx, offset SlowMo ; address into ds:dx int 21h ; Set new interrupt vector pop ds ; Restore ds call NewLine mov di, offset installed mov cx, [installedLen] call StrWrite2 ;*** TSR exit function *** mov dx, offset JumpToCode ; New free mem address int 27h ; Terminate, stay resident Exit: mov ah, 04Ch ; DOS function: Exit program mov al, [exCode] ; Return exit code value int 21h ; Call DOS. Terminate program END Start ; End of program / entry point