Public feed
#377323
;======================================;
;---General Purpose Trainer Template---;
;======================================;
;Originally written in MASM by _masta_ ;
;For Starcraft, All i did was convert ;
;to FASM and Use for diff game ;
;-Aaron "Lugz" Ankiel ;
;======================================;
include 'win32ax.inc'
PROCESS_VM_WRITE equ 020h
PROCESS_VM_OPERATION equ 008h
;Address of score in game
score_add equ 053ccc0h
; data section starts here
.data
;Startup window Caption
MBTitle db '3D RT Pinball Trainer',0
;Startup window Text
MBText db 'Hello Hit Ok To Do Make Score 100',13,10
db 'Credits : _masta_',0
; Caption for Errormessages
err_cap db "ERROR",0
; Error if Process isn't running
notrun db "Sorry, Process is not running",0
; Error if problem writing to mem
no_write db "There was a problem writing",13,10
db "to Process memory",13,10,0
; Caption for "ready"
readycap db "Ready",0
; Text for "ready"
readytxt db "Ok, variable is now changed.",0
; Add the number u are changing the address to
numchangeto dd 100
; Name of the Process window
wnd_name db "3D RT Pinball",0
; Class of the Process window
cls_name db "APP",0
; Here we save the PID ...
pid dd ?
; and here the handle to the process
p_hand dd ?
OldProt dd ?
; Heres where the code section starts
.code
;program start
start:
;Starting it up
invoke MessageBox,0,MBText,MBTitle,MB_OK
is_process_run:
;Find the window
invoke FindWindowA,cls_name,wnd_name
cmp eax,0 ; if 0, window is not existing
jz isnt_run_end; --> Process is not launched
;Determines PID with Windowhandle and saves it
invoke GetWindowThreadProcessId,eax,pid
open_the_process:
;Get handle
;activate write-access
invoke OpenProcess,PROCESS_VM_WRITE OR PROCESS_VM_OPERATION,0,pid
mov [p_hand],eax ; Save handle to p_hand
change_Address:
;Changing the address
;Write 4 Bytes ,How much ?,
; Memoryaddress, Handle to the process
invoke WriteProcessMemory,p_hand,score_add,numchangeto,4,0
cmp eax,0
jz error_on_write ; If any error while writing (eax=0) -> end
Trainer_ready:
;everything is ok
invoke MessageBoxA,0,readytxt,readycap,MB_OK
close_the_PID_Handle:
;Close handle
invoke CloseHandle,p_hand
jmp _end
error_on_write:
;if error when writing
invoke MessageBoxA,0,no_write,err_cap,MB_OK
; Close handle before quit
jmp close_the_PID_Handle
isnt_run_end:
;nothing running =(
invoke MessageBoxA,0,notrun,err_cap,MB_OK
_end:
;Exit
invoke ExitProcess,0
.end start