EP_RegKeyInformation crashes the application
Posted: Fri May 04, 2012 12:33 pm
Hello everyone,
I started using Enigma Protector three days ago and I have to say that it is an excellent tool for application protection.
Unfortunately, I have a problem which I can not explain or fix. This problem crashes my application all the time.
During application start-up, if my application is registered I call the function EP_RegKeyInformation() to get the licence information. The expiration date is always correct, but the sections always wrong. When I generate the licence I define "Section1" for decryption, but the array TKeyInformation.EncryptedSections[16] has the value "true" at the elements 4,5,6,7.
The above two are the least important problems. The most important problem is that when the scope that calls EP_RegKeyInformation() is lost, my application crashes! I.e.: If EP_RegKeyInformation() is called from a function "checkLicence()", then when the checkLicence() function returns, the application crashes.
Here is a very simple example that recreates the problem/crash: http://pastebin.com/brPfp3C0
When I run the application I get the following error: Run-Time Check Failure #2 - Stack around the variable 'lName' was corrupted.
And if I run the executable using the visual studio debugger I get several of these errors:
First-chance exception at 0x013a6ab9 in EnigmaTest01_protected.exe: 0xC0000094: Integer division by zero.
First-chance exception at 0x013a6ae4 in EnigmaTest01_protected.exe: 0xC000001D: Illegal Instruction.
I really don't know what I am doing wrong. Could someone help me please? I have Enigma version 3.6 and I am using Visual Studio 2008 SP1. The build target of my project is Win32 and my OS is Windows 7 SP1 x64.
Thanks a lot for your time!
Cheers,
Bekos
I started using Enigma Protector three days ago and I have to say that it is an excellent tool for application protection.
Unfortunately, I have a problem which I can not explain or fix. This problem crashes my application all the time.
During application start-up, if my application is registered I call the function EP_RegKeyInformation() to get the licence information. The expiration date is always correct, but the sections always wrong. When I generate the licence I define "Section1" for decryption, but the array TKeyInformation.EncryptedSections[16] has the value "true" at the elements 4,5,6,7.
The above two are the least important problems. The most important problem is that when the scope that calls EP_RegKeyInformation() is lost, my application crashes! I.e.: If EP_RegKeyInformation() is called from a function "checkLicence()", then when the checkLicence() function returns, the application crashes.
Here is a very simple example that recreates the problem/crash: http://pastebin.com/brPfp3C0
When I run the application I get the following error: Run-Time Check Failure #2 - Stack around the variable 'lName' was corrupted.
And if I run the executable using the visual studio debugger I get several of these errors:
First-chance exception at 0x013a6ab9 in EnigmaTest01_protected.exe: 0xC0000094: Integer division by zero.
First-chance exception at 0x013a6ae4 in EnigmaTest01_protected.exe: 0xC000001D: Illegal Instruction.
I really don't know what I am doing wrong. Could someone help me please? I have Enigma version 3.6 and I am using Visual Studio 2008 SP1. The build target of my project is Win32 and my OS is Windows 7 SP1 x64.
Thanks a lot for your time!
Cheers,
Bekos