Tamper protection by detecting the installer emulator and debug flag