file your_program.exe
If it says data or garbage, the file is likely corrupt.
upx -t target.exe
If UPX-packed: upx -d target.exe then retry extraction. file your_program
If the cookie is present but misaligned: If it says data or garbage , the file is likely corrupt
The second, and arguably more common, scenario is misidentification. If UPX-packed: upx -d target