Public feed #377325

Miscellany

public text v1 · immutable
Raw Edit
·published 2007-03-01 17:36 UTC
rendered paste body
#
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