Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Delphi] WriteProcessMemory?

Extreme Coder - Delphi
Loyal Member
Joined
Sep 8, 2007
Messages
1,381
Reaction score
39
here is my attempt at writeprocessmemory after following an example from Torry Delphi pages
Code:
unit Unit4;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls,GunZLib;

  const
  Address = $777042EB;
  Value = $90; //NOP

type
  TForm4 = class(TForm)
    Button1: TButton;
    procedure Button1Click(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Strings : TbountyGunZ;
  Form4: TForm4;
  ProcessID : Integer;
  ThreadID : Integer;
  WindowName : Integer;
  HandleWindow : Integer;
  Data : Pchar;
  Written : Cardinal;
implementation

{$R *.dfm}

procedure ByPassSerial();
begin

WindowName := FindWindow(nil,'EpicGunZ Launcher'); // Find our GunZClient
ThreadId := GetWindowThreadProcessId(WindowName, @ProcessId);
HandleWindow := OpenProcess(PROCESS_ALL_ACCESS, False, ProcessId);
GetMem(Data,1);
Data^ := chr(Value);
  WriteProcessMemory(HandleWindow, ptr(Address),Data,2, Written); // Nop the serial Key
 freemem(Data);
CloseHandle(HandleWindow);
end;

procedure TForm4.Button1Click(Sender: TObject);
begin
try
begin
ByPassSerial;
end;
except
begin
showmessage('epic phail');
end;

end;
end;

end.

What im trying to do is trying to NOP at the given address, but it doesnt work :S
 
Extreme Coder - Delphi
Loyal Member
Joined
Sep 8, 2007
Messages
1,381
Reaction score
39
I run the code while the Target Application is running 'EpicGunZ Launcher',
basically i wana NOP the program on the entrypoint so i can get a error and so the program closes. But it seems to not work
 
Experienced Elementalist
Joined
Oct 1, 2007
Messages
210
Reaction score
26
I deff thought this was a new thread, it is from the first january 2010 lol.
 
Experienced Elementalist
Joined
May 29, 2006
Messages
241
Reaction score
20
you first ask permission to the portion of memory ;)
first use VirtualProtectEX
and after use WriteProcessMemory
 
Back
Top