本人X64ASM 第一个功能性程序发布

这次是一个鼠标控制程序,控制上下左右,左键右键中键。我不知道WINDOWS默认有没有这项功能…其实是一个同学要这个功能的软件,我正好正在学X64ASM就写了一个(结果他的32位系统用不了),权当练手了。

控制方法:

上下左右控制移动

PAGE UP加长每次位移

PAGE DOWN减少每次位移(类似于移动速度变化)

HOME恢复默认设置

END退出程序

1左键单击

2中键单击(滚轮)

3右键单击

下载地址:Google Document

下面是源码:(引用文件parapi.inc未给出)

;——————————————————————————–

;程序设计:中国·Parthas

;版权所有:Parthas 2006-2010

;禁止任何修改与盗版

;请访问64位汇编语言官方站 Http://Www.X64Asm.Com

;电子邮件 xywhpanda@gmail.Com Tel:138******** QQ:497242884

;官方论坛:Http://Www.X64Asm.Com/AsmBbs 官方QQ群总群:97339661

;——————————————————————————–

;编译命令 Ml64.exe /c FristWindow.Asm

;连接命令 Link.exe /SubSystem:Windows /Entry:Entry  /Out:FristWindow.Exe

;——————————————————————————–

;包含文件

include parapi.inc

;——————————————————————————–

;代码

.CODE

;——————————————————————————–

;——————————————————————————–

;程序入口点

Entry PROC

@Initialize:

mov Increment,10H

sub rsp,10H

mov rcx,SM_CXSCREEN

call GetSystemMetrics

add rsp,10H

shr rax,1

mov X,rax

sub rsp,10H

mov rcx,SM_CYSCREEN

call GetSystemMetrics

add rsp,10H

shr rax,1

mov Y,rax

sub rsp,18H

mov rcx,X

mov rdx,Y

call SetCursorPos

add rsp,18H

@MainFunction:

sub rsp,10H

mov rcx,VK_UP

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @SubY

sub rsp,10H

mov rcx,VK_DOWN

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @AddY

sub rsp,10H

mov rcx,VK_LEFT

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @SubX

sub rsp,10H

mov rcx,VK_RIGHT

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @AddX

sub rsp,10H

mov rcx,VK_END

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @Exit

sub rsp,10H

mov rcx,VK_PGUP

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @AddIncrement

sub rsp,10H

mov rcx,VK_PGDN

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @SubIncrement

sub rsp,10H

mov rcx,VK_F12

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @Initialize

sub rsp,10H

mov rcx,VK_1

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @LClick

sub rsp,10H

mov rcx,VK_2

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @MClick

sub rsp,10H

mov rcx,VK_3

call GetAsyncKeyState

add rsp,10H

test rax,01B

jne @RClick

sub rsp,8H

mov rcx,1H

call Sleep

add rsp,8H

jmp  @MainFunction

@AddX:

mov rax,Increment

add X,rax

jmp  @SetCurPos

@AddY:

mov rax,Increment

add Y,rax

jmp  @SetCurPos

@SubX:

mov rax,Increment

sub X,rax

jmp  @SetCurPos

@SubY:

mov rax,Increment

sub Y,rax

jmp  @SetCurPos

@AddIncrement:

add Increment,1H

jmp  @MainFunction

@SubIncrement:

sub Increment,1H

jmp  @MainFunction

@LClick:

sub rsp,28H

mov rcx,

MOUSEEVENTF_LEFTDOWN

add rcx,MOUSEEVENTF_LEFTUP

mov rdx,X

mov r8,Y

call mouse_event

add rsp,28H

jmp  @MainFunction

@RClick:

sub rsp,28H

mov rcx,

MOUSEEVENTF_RIGHTDOWN

add rcx,MOUSEEVENTF_RIGHTUP

mov rdx,X

mov r8,Y

call mouse_event

add rsp,28H

jmp  @MainFunction

@MClick:

sub rsp,28H

mov rcx,MOUSEEVENTF_MIDDLEDOWN

add rcx,MOUSEEVENTF_MIDDLEUP

mov rdx,X

mov r8,Y

call mouse_event

add rsp,28H

jmp  @MainFunction

@SetCurPos:

sub rsp,18H

mov rcx,X

mov rdx,Y

call SetCursorPos

add rsp,18H

jmp          @MainFunction

@Exit:

sub rsp,8H

call ExitProcess

add rsp,8H

Entry ENDP

;——————————————————————————–

;程序结束

END

Leave a Reply

Your email address will not be published. Required fields are marked *