- 注册时间
- 2011-3-6
- 最后登录
- 1970-1-1
该用户从未签到
|
unit WriteProcessMem;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
checkbox1: TCheckBox;
Label1: TLabel;
Label2: TLabel;
procedure checkbox1Click(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.checkbox1Click(Sender: TObject);
const
MemAdd: dword = $10006EBC;
MemData: dword = $E93F911F00; //错误时停在这里,估计是$E93F911F00这个值太大了,请问怎么解决
MemAdd1: dword = $10200000;
MemData1: dword = $B8000000008B4D10E9B56EE0FF90;
MemAdd2: dword = $10006F02;
MemData2: dword = $E9F9911F00;
MemAdd3: dword = $10200100;
MemData3: dword = $B8000000008B4D10E9FB6DE0FF90;
MemAdd4: dword = $10006B62;
MemData4: dword = $E9B1951F00;
MemAdd5: dword = $10200118;
MemData5: dword = $B80A0000008B4D10E9436AE0FF90;
MemAdd6: dword = $10006EBC;
MemData6: dword = $8B401C8B4D10;
MemAdd7: dword = $10006F02;
MemData7: dword = $8B40208B4D10;
MemAdd8: dword = $10006B62;
MemData8: dword = $8B40248B4D10;
var
hw: HWND;
pid: dword;
h: THandle;
tt: Cardinal;
begin
hw := FindWindow(nil, 'Tantra Launcher');
if hw = 0 then
MessageBox(Handle, PChar('δ·¢ÏÖ´°¿Ú....'), PChar('´íÎó'),MB_ICONERROR or MB_OK);
GetWindowThreadProcessId(hw, @pid);
h := OpenProcess(PROCESS_ALL_ACCESS, false, pid);
if h = 0 then
MessageBox(Handle, PChar('ÎÞ·¨È¡µÃ½ø³Ì¾ä±ú....'), PChar('´íÎó'),MB_ICONERROR or MB_OK);
if checkbox1.Checked=true then //Èç¹ûÑ¡Ôñ¿ò±»Ñ¡ÔñΪÕæ,Ôò..
begin
WriteProcessMemory(h, Pointer(MemAdd), @MemData, sizeof(MemData), tt);
WriteProcessMemory(h, Pointer(MemAdd1), @MemData1, sizeof(MemData1), tt);
WriteProcessMemory(h, Pointer(MemAdd2), @MemData2, sizeof(MemData2), tt);
end;
if checkbox1.Checked=False then
begin
WriteProcessMemory(h, Pointer(MemAdd3), @MemData3, sizeof(MemData3), tt);
WriteProcessMemory(h, Pointer(MemAdd4), @MemData4, sizeof(MemData4), tt);
WriteProcessMemory(h, Pointer(MemAdd5), @MemData5, sizeof(MemData5), tt);
end;
MessageBeep(0);
CloseHandle(h);
close;
end;
end.
MemData: dword = $E93F911F00; //错误时停在这里,估计是$E93F911F00这个值太大了,请问怎么解决啊。。 |
|