能力值:
( LV2,RANK:10 )
2 楼
in bones.asm
.386
.model flat, stdcall
option casemap :none
include bones.inc
.code
start:
invoke GetModuleHandle, NULL
mov hInstance, eax
invoke InitCommonControls
invoke DialogBoxParam, hInstance, IDD_MAIN, 0, offset DlgProc, 0
invoke ExitProcess, eax
DlgProc proc hWin:DWORD,uMsg:DWORD,wParam:DWORD,lParam:DWORD
mov eax,uMsg
.if eax == WM_INITDIALOG
invoke LoadIcon,hInstance,200
invoke SendMessage, hWin, WM_SETICON, 1, eax
invoke CheckDlgButton,hWin,IDC_CHECKBOX,BST_UNCHECKED
mov bValue,0
.elseif eax == WM_COMMAND
mov eax,wParam
.if eax == IDB_EXIT
invoke SendMessage, hWin, WM_CLOSE, 0, 0
.endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1
.if eax == IDC_CHECKBOX
;.if bValue==0
;invoke CheckDlgButton,hWin,IDC_CHECKBOX,BST_CHECKED
;invoke IsDlgButtonChecked,hWin,IDC_CHECKBOX
;Invoke SendMessage, hWin, BM_GETCHECK, 0, 0
;.if eax==1
;.if BM_GETCHECK
;.if BM_SETCHECK
;.if BS_CHECKBOX
;.if BS_AUTOCHECKBOX
;.if BST_CHECKED
;.if BST_UNCHECKED
invoke Poke, PokeAddr1, addr PokeBuf1, 4 ;1
;.endif
;mov bValue,1
;invoke CheckDlgButton,hWin,IDC_CHECKBOX,BST_UNCHECKED
;.if BST_UNCHECKED
;invoke Poke, PokeAddr1, addr PokeBuf2, 4 ;1
;.endif
;.endif
.endif
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;1
.elseif eax == WM_CLOSE
invoke EndDialog, hWin, 0
.endif
xor eax,eax
ret
DlgProc endp
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Poke PROC Gwin:DWORD, Gvalue:DWORD, Gsize:DWORD
LOCAL windhand:DWORD
LOCAL phandle:DWORD
LOCAL pid:DWORD
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
.if eax == IDC_CHECKBOX ;1
Invoke FindWindow, NULL, addr wndName
mov windhand,eax
.if eax==FALSE
invoke MessageBox, NULL,addr MsgError, addr MsgCaption, MB_OK
Invoke CloseHandle, phandle
xor eax,eax
ret
.endif
Invoke GetWindowThreadProcessId, windhand, addr pid
Invoke OpenProcess,PROCESS_ALL_ACCESS, 0, pid
mov phandle,eax
Invoke WriteProcessMemory, phandle, Gwin, Gvalue, Gsize, NULL
Invoke CloseHandle, phandle
.endif
xor eax,eax
ret
Poke ENDP
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
end start
;///////////////////////////////////////////////////
能力值:
( LV2,RANK:10 )
3 楼
in bones.inc
//////////////////////////////////
include windows.inc
include user32.inc
include kernel32.inc
include comctl32.inc ;windows common controls
includelib user32.lib
includelib kernel32.lib
includelib comctl32.lib ;windows common controls
DlgProc PROTO :DWORD,:DWORD,:DWORD,:DWORD
Poke PROTO :DWORD,:DWORD,:DWORD
.const
IDD_MAIN equ 1000
IDB_EXIT equ 1001
IDC_CHECKBOX equ 1002 ;2 use this with xxx.rc
PokeAddr1 equ 00403CAEh ;1
.data
MsgCaption db "prog test trainer",0
MsgError db "game not found",0
wndName db '?????????宿傲兽诎?',0
PokeBuf1 dd 90909090h ;1
PokeBuf2 dd 3C8644FFh ;1
.data?
hInstance dd ?
bValue dd ?
;////////////////////////////
能力值:
( LV2,RANK:10 )
4 楼
in bones.rc
;/////////////////////
;This Resource Script was generated by WinAsm Studio.
#define IDD_MAIN 1000
#define IDB_EXIT 1001
#define IDC_CHECKBOX 1002
200 ICON DISCARDABLE "bones.ico"
IDD_MAIN DIALOGEX 10,10,335,203
CAPTION "Form1"
FONT 8,"Tahoma"
STYLE 0x90c80804
EXSTYLE 0x00000000
BEGIN
CONTROL "&Exit",IDB_EXIT,"Button",0x10010000,253,182,52,15,0x00000000
CONTROL "&CHECKBOX",IDC_CHECKBOX,"Button",0x50010003,100,175,134,22,0x00000000
END
;/////////////////////////////////////////
in bones.wap
[PROJECT]
Type=0
ReleaseCommandLine=
DebugCommandLine=
AutoIncFileVersion=0
RCSilent=0
[MAKE]
CompileRC=/v
RCToObj=
Assemble=/c /coff /Cp /nologo
Link=/SUBSYSTEM:WINDOWS /RELEASE /VERSION:4.0
Out=
ActiveBuild=0
DebAssemble=/Zi /Zd /c /coff /Cp /nologo
DebLink=/SUBSYSTEM:WINDOWS /DEBUG /DEBUGTYPE:CV /VERSION:4.0 /INCREMENTAL:NO
DebOut=
[SHOWFILE]
3=-6
4=-25
5=562
6=509
1=3
2=1
7=1
[FILES]
1=bones.asm
2=bones.inc
3=bones.rc
能力值:
( LV2,RANK:10 )
6 楼
I want to dobut get trouble)
1. if click checkbox ,the checkbox is CHECKED to do:
invoke Poke, PokeAddr1, addr PokeBuf1, 4
to lock then game score
and if findwindow is false then set BST_UNCHECKED
2.if click checkbox again ,the checkbox is UNCHECKED to do:
;invoke Poke, PokeAddr1, addr PokeBuf2, 4 ;1
to unlock then game score 我是想知道怎样写才会:
1。如果 点击CHECKBOX,打钩,然后运行invoke Poke, PokeAddr1, addr PokeBuf1, 4。。。。。。(功能是改变机械码),如果找不到就不打钩。
2。 如果 再点击CHECKBOX,不打钩,然后运行invoke Poke, PokeAddr1, addr PokeBuf1, 4。。。。。。。。。。。。。(功能是改变机械码)。
能帮忙看看吗?thanks.
//////////////////////////////////////////////////////////////
akyprian 帮助下已解决了................................