KemalG
asked on
How can I Change Exe Header Section
Hi I want to change Exe header section and see the table properties ,I look the JDE Code library Yeah I see the Exe Section but I dont change I understand How the change Exe header for example AsProtect use the change .idata section and compres the exe but first change the exe header how is ?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I could'n Change The Section
This code grabs the dos stub but you can modify
it to grab any bytes that are in the exe file...and it
reads it from the ram at runtime..maybe this will help you read data from the beginning of the exe file... to write to these bytes you need to alter the exe on disk.... you can do this by writing directly to the disk sectors..but that's not very safe so go look at a simple unit I wrote called ExeMod.pas it's on my web site http://delphi.does.it ... you can use the code in this unit to alter the PE while you exe runs...
procedure TForm1.Button1Click(Sender
Var x: Byte;
begin
Form1.Caption := '';
For X := 80 to 115 do
begin
Form1.Caption := Form1.Caption +
Char(pointer(Hinstance+X)^
end;
end;
This just displays the dos stub message as the forms caption :-)