Markers UnReg_Crypt
The UnReg_Crypt markers allow selecting parts of the code that should be executed only in case the module is not registered, or the module is registered but the registration key does not support deciphering of the current encrypted section. The Enigma Protector supports 16 types of UnReg_Crypt markers. Each marker can be used to select any number of the code parts. The principle of work: after the module is protected and started, The Enigma Protector loader will check the presence of a valid registration key for the module. If a registration key is not found, all unreg_crypt sections will be deciphered and prepared for execution. There is another case in which these sections will be deciphered - in case a valid registration key is found, but it does not allow deciphering the current unreg_crypt section. Generally, the unreg_crypt markers are the opposite of the reg_crypt markers.
Content
Show/Hide Delphi marker content
uses
enigma_ide;
procedure Test;
begin
EP_Marker('unreg_crypt_beginXX');
EP_Marker('unreg_crypt_beginXX');
end;
unreg_crypt_beginXX.inc
asm
DB $EB, $08, $55, $4E, $52, $47, $43, $52, $42, $XX
end;
unreg_crypt_endXX.inc
asm
DB $EB, $08, $55, $4E, $52, $47, $43, $52, $45, $XX
end;
Show/Hide C++ marker content
#include "enigma_ide.h"
#pragma optimize("", off)
void test()
{
EP_Marker("unreg_crypt_beginXX");
EP_Marker("unreg_crypt_endXX");
}
#pragma optimize("", on)
unreg_crypt_beginXX.inc
__asm
{
DB 0xEB, 0x08, 0x55, 0x4E, 0x52, 0x47, 0x43, 0x52, 0x42, 0xXX
}
unreg_crypt_endXX.inc
__asm
{
DB 0xEB, 0x08, 0x55, 0x4E, 0x52, 0x47, 0x43, 0x52, 0x45, 0xXX
}
Show/Hide C++ x64 marker content
#include "enigma_ide.h"
#pragma optimize("", off)
void test()
{
EP_Marker("unreg_crypt_begin1");
EP_Marker("unreg_crypt_end1");
}
#pragma optimize("", on)
Show/Hide Visual Basic marker content
Call VarPtr("UNREG_CRYPT_BEGINXX")
Call VarPtr("UNREG_CRYPT_ENDXX")
Examples
Show/Hide Delphi marker example
uses
enigma_ide;
begin
EP_Marker('reg_crypt_begin1');
if EP_RegLoadAndCheckKey then
begin
MessageBox(0, 'Application is registered!'#13#10 +
'The registration key created with the Unlock Section #1 disabled!'#13#10 +
'Marker unreg_crypt1 is deciphered', 'Application', 0);
end else
begin
MessageBox(0, 'Application is not registered!'#13#10 +
'Marker unreg_crypt1 is deciphered', 'Application', 0);
end;
EP_Marker('reg_crypt_end1');
EP_Marker('reg_crypt_begin1');
MessageBox(0, 'Application is registered!'#13#10 +
'The registration key created with the Unlock Section #1 enabled!'#13#10 +
'Marker reg_crypt1 is deciphered', 'Application', 0);
EP_Marker('reg_crypt_end1');
{$I include/unreg_crypt_begin1.inc}
if EP_RegLoadAndCheckKey then
begin
MessageBox(0, 'Application is registered!'#13#10 +
'The registration key created with the Unlock Section #1 disabled!'#13#10 +
'Marker unreg_crypt1 is deciphered', 'Application', 0);
end else
begin
MessageBox(0, 'Application is not registered!'#13#10 +
'Marker unreg_crypt1 is deciphered', 'Application', 0);
end;
{$I include/unreg_crypt_end1.inc}
{$I include/reg_crypt_begin1.inc}
MessageBox(0, 'Application is registered!'#13#10 +
'The registration key created with the Unlock Section #1 enabled!'#13#10 +
'Marker reg_crypt1 is deciphered', 'Application', 0);
{$I include/reg_crypt_end1.inc}
end.
Show/Hide C++ marker example
#include "enigma_api.h"
#pragma optimize("", off)
BOOL TestMarkers ()
{
EP_Marker("unreg_crypt_begin1");
if (EP_RegLoadAndCheckKey()){
MessageBox(0, "Application is registered!\n\rThe registration key created with the Unlock Section #1 disabled!\n\rMarker unreg_crypt1 is deciphered", "Application", 0);
} else {
MessageBox(0, "Application is not registered!\n\rMarker unreg_crypt1 is deciphered", "Application", 0);
};
EP_Marker("unreg_crypt_end1");
EP_Marker("unreg_crypt_begin1");
MessageBox(0, "Application is registered!\n\rThe registration key created with the Unlock Section #1 enabled!\n\rMarker reg_crypt1 is deciphered", "Application", 0);
EP_Marker("unreg_crypt_end1");
#include "include\unreg_crypt_begin1.inc"
if (EP_RegLoadAndCheckKey()){
MessageBox(0, "Application is registered!\n\rThe registration key created with the Unlock Section #1 disabled!\n\rMarker unreg_crypt1 is deciphered", "Application", 0);
} else {
MessageBox(0, "Application is not registered!\n\rMarker unreg_crypt1 is deciphered", "Application", 0);
};
#include "include\unreg_crypt_end1.inc"
#include "include\reg_crypt_begin1.inc"
MessageBox(0, "Application is registered!\n\rThe registration key created with the Unlock Section #1 enabled!\n\rMarker reg_crypt1 is deciphered", "Application", 0);
#include "include\reg_crypt_end1.inc"
return TRUE;
}
#pragma optimize("", on)
Show/Hide Visual Basic marker example
Call VarPtr("UNREG_CRYPT_BEGIN1")
MsgBox "Application is unregistered or key does not unlock Section #1!"
Call VarPtr("UNREG_CRYPT_END1")
Call VarPtr("UNREG_CRYPT_BEGIN2")
MsgBox "Application is unregistered or key does not unlock Section #2!"
Call VarPtr("UNREG_CRYPT_END2")
Call VarPtr("UNREG_CRYPT_BEGIN3")
MsgBox "Application is unregistered or key does not unlock Section #3!"
Call VarPtr("UNREG_CRYPT_END3")
Call VarPtr("UNREG_CRYPT_BEGIN4")
MsgBox "Application is unregistered or key does not unlock Section #4!"
Call VarPtr("UNREG_CRYPT_END4")
Call VarPtr("UNREG_CRYPT_BEGIN5")
MsgBox "Application is unregistered or key does not unlock Section #5!"
Call VarPtr("UNREG_CRYPT_END5")
MsgBox "If you did not see any message then this application is registered and key unlocks sections #1, #2, #3, #4 and #5!"
See markers examples in the installation folder, Examples\UnRegCryptMarkers subfolder.