Lordaron
12.10.2003, 15:54
Hallo Leute
ich habe ein großes problem wenn ich ein trainer in masm32 programmiere, nachdem ich ihn starte und die tasten f12 oder f11 drücken
werden die values nicht gepatcht aber das spiel wurde gefunden, was gebe ich falsch ein?
Ich habe jetzt als Bespiel das Spiel Solitär genommen!
bitte helft mir
das ist der source von .inc Datei
include /masm32/include/Comctl32.inc
include /masm32/include/windows.inc
include /masm32/include/user32.inc
include /masm32/include/kernel32.inc
includelib /masm32/lib/kernel32.lib
includelib /masm32/lib/user32.lib
includelib /masm32/lib/Comctl32.lib
DlgProc PROTO :HWND,:UINT,:WPARAM,:LPARAM
TrainerEngine Proto :BYTE
.const
IDD_DIALOG1 equ 101
IDC_GRP1 equ 1001
IDC_STC1 equ 1002
IDC_STC2 equ 1003
IDC_BTN1 equ 1004
IDC_BTN2 equ 1005
addie1 equ 952E8h
addie2 equ 952E9h
;TEngine2.Rc
ICON1 equ 201
.data
ErrorCaption db 'ERROR', 0
ErrorMessage db 'Spiel nicht gestartet',0ah
db 'Bitte Spiel starten!',0ah
db 'So You can Use the trainer',0
AboutCaption db 'About',0
AboutMessage db 'Trainer by me',0ah
db 'für Solitär',0ah
db 'CIAO',0
HelpCaption db 'Help',0
HelpMessage db 'Drücke im Spiel F12 oder', 0ah
db 'drücke F11',0
WindCap db 'Solitär',0
bytes2write db 064h
.data?
hInstance dd ?
hWnd dd ?
hGameWin dd ?
pid dd ?
pHandle dd ?
buffer1 dd ?
und das ist der source der .asm Datei
.386
.model flat, stdcall ;32 bit memory model
option casemap :none ;case sensitive
include trainer.inc
.code
start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke InitCommonControls
invoke DialogBoxParam,hInstance,IDD_DIALOG1,NULL,addr DlgProc,NULL
invoke ExitProcess,0
DlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
mov eax,uMsg
.if eax==WM_INITDIALOG
push hWin
pop hWnd
Invoke SetTimer,hWin,0,90,0
invoke LoadIcon,hInstance,ICON1 ;load icon from resource file
invoke SendMessage,hWnd,WM_SETICON,NULL,eax ;tell dialog to set it's icon
.elseif eax==WM_COMMAND
mov eax,wParam
and eax,0FFFFh
.if eax==IDC_BTN1
Invoke MessageBox,hWin,addr AboutMessage, addr AboutCaption,MB_OK
.elseif eax==IDC_BTN2
Invoke MessageBox,hWin,addr HelpMessage,addr HelpCaption,MB_OK
.endif
.elseif eax==WM_TIMER
Invoke GetAsyncKeyState, VK_F12
.if eax != 0
Invoke TrainerEngine,1
.endif
Invoke GetAsyncKeyState, VK_F11
.if eax != 0
Invoke TrainerEngine,2
.endif
.elseif eax==WM_CLOSE
invoke EndDialog,hWin,0
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
DlgProc endp
TrainerEngine PROC _Option:BYTE
Invoke FindWindow,0,addr WindCap
.if eax==0
Invoke MessageBox,hWnd,addr ErrorMessage,addr ErrorCaption,MB_OK
ret
.endif
mov hGameWin,eax
Invoke GetWindowThreadProcessId,hGameWin,offset pid
Invoke OpenProcess,PROCESS_VM_READ + PROCESS_VM_WRITE,NULL,pid
mov pHandle,eax
mov al,byte ptr[_Option]
.if al==1 ;F12 Procedure
Invoke WriteProcessMemory,pHandle,addie1,offset bytes2write,4,NULL
.elseif al==2 ;F11 Procedure
Invoke ReadProcessMemory,pHandle,addie2,offset buffer1,2,NULL
add [buffer1],10
Invoke WriteProcessMemory,pHandle,addie2,offset buffer1,2,NULL
.endif
Invoke CloseHandle,pHandle
ret
TrainerEngine endp
end start
Was mach ich falsch
mfg Lordaron
Danke!
ich habe ein großes problem wenn ich ein trainer in masm32 programmiere, nachdem ich ihn starte und die tasten f12 oder f11 drücken
werden die values nicht gepatcht aber das spiel wurde gefunden, was gebe ich falsch ein?
Ich habe jetzt als Bespiel das Spiel Solitär genommen!
bitte helft mir
das ist der source von .inc Datei
include /masm32/include/Comctl32.inc
include /masm32/include/windows.inc
include /masm32/include/user32.inc
include /masm32/include/kernel32.inc
includelib /masm32/lib/kernel32.lib
includelib /masm32/lib/user32.lib
includelib /masm32/lib/Comctl32.lib
DlgProc PROTO :HWND,:UINT,:WPARAM,:LPARAM
TrainerEngine Proto :BYTE
.const
IDD_DIALOG1 equ 101
IDC_GRP1 equ 1001
IDC_STC1 equ 1002
IDC_STC2 equ 1003
IDC_BTN1 equ 1004
IDC_BTN2 equ 1005
addie1 equ 952E8h
addie2 equ 952E9h
;TEngine2.Rc
ICON1 equ 201
.data
ErrorCaption db 'ERROR', 0
ErrorMessage db 'Spiel nicht gestartet',0ah
db 'Bitte Spiel starten!',0ah
db 'So You can Use the trainer',0
AboutCaption db 'About',0
AboutMessage db 'Trainer by me',0ah
db 'für Solitär',0ah
db 'CIAO',0
HelpCaption db 'Help',0
HelpMessage db 'Drücke im Spiel F12 oder', 0ah
db 'drücke F11',0
WindCap db 'Solitär',0
bytes2write db 064h
.data?
hInstance dd ?
hWnd dd ?
hGameWin dd ?
pid dd ?
pHandle dd ?
buffer1 dd ?
und das ist der source der .asm Datei
.386
.model flat, stdcall ;32 bit memory model
option casemap :none ;case sensitive
include trainer.inc
.code
start:
invoke GetModuleHandle,NULL
mov hInstance,eax
invoke InitCommonControls
invoke DialogBoxParam,hInstance,IDD_DIALOG1,NULL,addr DlgProc,NULL
invoke ExitProcess,0
DlgProc proc hWin:HWND,uMsg:UINT,wParam:WPARAM,lParam:LPARAM
mov eax,uMsg
.if eax==WM_INITDIALOG
push hWin
pop hWnd
Invoke SetTimer,hWin,0,90,0
invoke LoadIcon,hInstance,ICON1 ;load icon from resource file
invoke SendMessage,hWnd,WM_SETICON,NULL,eax ;tell dialog to set it's icon
.elseif eax==WM_COMMAND
mov eax,wParam
and eax,0FFFFh
.if eax==IDC_BTN1
Invoke MessageBox,hWin,addr AboutMessage, addr AboutCaption,MB_OK
.elseif eax==IDC_BTN2
Invoke MessageBox,hWin,addr HelpMessage,addr HelpCaption,MB_OK
.endif
.elseif eax==WM_TIMER
Invoke GetAsyncKeyState, VK_F12
.if eax != 0
Invoke TrainerEngine,1
.endif
Invoke GetAsyncKeyState, VK_F11
.if eax != 0
Invoke TrainerEngine,2
.endif
.elseif eax==WM_CLOSE
invoke EndDialog,hWin,0
.else
mov eax,FALSE
ret
.endif
mov eax,TRUE
ret
DlgProc endp
TrainerEngine PROC _Option:BYTE
Invoke FindWindow,0,addr WindCap
.if eax==0
Invoke MessageBox,hWnd,addr ErrorMessage,addr ErrorCaption,MB_OK
ret
.endif
mov hGameWin,eax
Invoke GetWindowThreadProcessId,hGameWin,offset pid
Invoke OpenProcess,PROCESS_VM_READ + PROCESS_VM_WRITE,NULL,pid
mov pHandle,eax
mov al,byte ptr[_Option]
.if al==1 ;F12 Procedure
Invoke WriteProcessMemory,pHandle,addie1,offset bytes2write,4,NULL
.elseif al==2 ;F11 Procedure
Invoke ReadProcessMemory,pHandle,addie2,offset buffer1,2,NULL
add [buffer1],10
Invoke WriteProcessMemory,pHandle,addie2,offset buffer1,2,NULL
.endif
Invoke CloseHandle,pHandle
ret
TrainerEngine endp
end start
Was mach ich falsch
mfg Lordaron
Danke!