Batch protection impossible?????

Issues related to VMProtect
Post Reply
henrik
Posts: 5
Joined: Tue Jun 30, 2009 7:44 am

Batch protection impossible?????

Post by henrik »

We have just bought the company license of VMProtect and my boss asked me to make the first tests... and I am stuck immediately :(
We compile code using many complex macros and so there is a different number of procedures to virtualize each time.
Since the protection step must be integral part of the build process I have to know about a way to say "protect all subroutines that are marked".
Using the GUI to add the functions does not work for us.

Please help me with this issue

Thankx,
Henrik
(ACE GmbH)
Admin
Site Admin
Posts: 2584
Joined: Mon Aug 21, 2006 8:19 pm
Location: Russia, E-burg
Contact:

Post by Admin »

Try using this script:

Code: Select all

procedure OnBeforeCompilation;
var I:Integer;
begin
  with VMProtector do
   for I:=0 to InputFile.MapRecords.Count-1 do
    with InputFile.MapRecords.Items[I] do
     if (CodeType=otMarker) or (CodeType=otAPIMarker) or (CodeType=otVBMarker) then
      begin
       AddByAddress(Address,ctVirtualization,True);
      end;
end;
henrik
Posts: 5
Joined: Tue Jun 30, 2009 7:44 am

Post by henrik »

Thanks a lot :-)

Henrik
(ACE GmbH)
Post Reply