The file "hasp_windows_x64_xxxx.dll or hasp_windows_xxxx.dll" is the vendor specific runtime library.
This is used by the protected application at runtime. You should get one or both versions (32bit and 64bit) of the file in envelope'e output directory based on the type of exe being protected.
Yes, It is mandatory to be present with the protected executable.
If the application is unable to find the DLL, it should show an error message with error - "H0400 : No ApiDyLib"
Please confirm if this is the error you face when running without the DLL?
Please clarify "But when this file is absent, my exe still runs, but displays the same
error irregularly. If I press retry enough times, it may or may not
continue to work without a particular pattern."
Do you mean the application works normally after pressing Retry button multiple times?