Link to home
Start Free TrialLog in
Avatar of KemalG
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
Avatar of robert_marquardt
robert_marquardt

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Gwena
Gwena

I'm not sure exactly what you want to do but if you want access to the data in the exe file as it runs then here is some stuff you might be able to use :-)

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: TObject);
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 :-)

Avatar of KemalG

ASKER

I could'n Change The Section