How to use AntiDebugLIB V2.3 Professional Version

How to use AntiDebugLIB V2.3 Professional Version Programming Guide 1.AntiDebugLIB Files

2.Programme Developing Environment OS: Windows XP/2003/Vista/2008/7(X86)

IDE:Microsoft Visual Studio 2008 / C++Builder / Delphi / VB6.0.

3.Illustration The follow steps will start from scratch to create a demo project to demonstrate usage of AntiDebugLIB.You can download “antidebug_demo” here firstly, rebuild it directly and get the first impression.You should refer to the article "How to build antidebug_demo project?" to solve the building problems.

3.1 Programme Design (1) Open “Microsoft Visual Studio 2008”，select “File | New | Project” menu command ,popup “New Project” window，select Project types:“Visual C++ | MFC”，select Templates:“Visual Studio installed templates |MFC Application”,confirm the project's name is “antidebug_demo”,and select directory.

(2) In the popup “MFC Application AppWinzard - Application Type” dialog box，select the type of application to “Single document”.

(3) The follow steps,keep the default setting,at last click [Finish] button.

(4) Add two menu command:"Display Hello World !" and "Display Hello AntiDebug !" (5) Map menu command function by Event Handler Wizard: void CAntidebug_demoDoc::OnDisplayHelloWorld. void CAntidebug_demoDoc::OnDisplayHelloAntidebug.

Insert the following code: (6) After finished,antidebug_demo can display two MessageBox :"Hello World! " and "Hello AntiDebug ! ",it's free and no License. 3.2 Encrypte Programme

(1) Copy antidebug.h and antidebug.lib into the antidebug_demo project directory(\antidebug_demo\).

(2) Select “Project | Protertys” menu command，Only set "Win32 Release".

Add "antidebug.lib setupapi.lib NETAPI32.LIB" into Linker's input Additional Dependencies edit box. Set "Buffer Security Check" to "NO(/GS)". Set "Data Execution Prevention(DEP)" to "Default" or "Image is not compatible with DEP(/NXCOMPAT：NO)". Set "Randomized Base Address" to "Disable Image Randomization ". Set "UAC Execution Level " to "requireAdministrator". (3) Add codes into antidebug_demoDoc.h file: (4) Add codes into antidebug_demoDoc.cpp file: (5) Revise non-sharing function code. (6) Select “Build | Rdbuild Solution” menu command to encrypt the antidebug_demo.Now,if you want to display "Hello AntiDebug !" MessageBox,must have the License which is generated by ADL_register.exe. (7) Custom Function

As to the very important key codes ,we recommend you strongly to use AntiDebugLIB's custom function to create self-engendered functions quickly,then the key codes become a secret except you. There are three functions offered by AntiDebugLIB can do this job: GJ_encrypt_custom_function. GJ_load_custom_founction. GJ_free_custom_founction.

GJ_encrypt_custom_function (or GJ_encrypt_custom_function_demo) is only used in another private project，the custom function is debuged and encrypted in that project.When GJ_encrypt_custom_function (or GJ_encrypt_custom_function_demo) return TRUE,it will generate "founction_name.h" file.The encrypted code of custom function is included in it.Then include this header file into the releasing project,invoke GJ_load_custom_founction (or GJ_load_custom_founction_demo) to decrypt the custom function code and execute,when the custom function is not invoked again,invoke GJ_free_custom_founction to clear the code of custom function.

Now,we create another project named custom_function_demo in the same way just like antidebug_demo project does. The void __stdcall custom_function(...) function is the function that we want to encrypt.We can invoke void encrypt_custom_function function to encrypt it and get a custom_function.h file which includes the encrypted code of custom_function(...).

After we get the custom_function.h,we insert the clause #include "..\\antidebug_demo\\custom_function_demo\\custom_function.h" into antidebug_demoDoc.cpp which belongs to antidebug_demo project.

(8) Encryption Macro There are four encryption macros to help the developers encrypt their code rapidly. Only Registered Version supports the encryption macro. (9) Insert some essential codes into Antidebug_demo's about dialog window for user to create the Serial Number expediently. (10) At last antidebug_demo.exe should be Encrypted by Eagle Protector. Finally,Antidebug_demo can display three MessageBox :one free "Hello World ! " MessageBox, two non-free "Hello AntiDebug ! "and "Hello Cuntom function ! "MessageBox. Now,you can distribute trial versions of your applications with gjglly.sys securely.

4.Gengerate License

(1) Paste the Serial Number copyed from user's antidebug_demo's about dialog window into the ADL Register Serial Number Edit box. (2) Select antidebug_append.dat file for Appending Data. 3) Click  button. (4) Save As the LICENSE data into antidebuglib_demo.lic file and email it to the user.

5.End Above-mentioned antidebug_demo programme demonstrates the basic process and frame about how to use AntiDebugLIB to encrypt and protect application. If you have any technical problems using AntiDebugLIB or need a special feature to be included in a next release, please feel free to contact us at support@antidebuglib.com.You can download the latest version of our products from http://www.antidebuglib.com.