Currently hex2bin is defunct. whenever a 0A is in the hexdump, it adds an extra 0D corrupting the executable.
in hex2bin.c where it says:
.....
if (outfname && !freopen(outfname,"wb",stdout)) {
fprintf(stderr,E_OpenWrite,argv[0],outfname);
exit(1);
}
total=mainloop();
.....
change to:
if (outfname && !freopen(outfname,"wb",stdout)) {
fprintf(stderr,E_OpenWrite,argv[0],outfname);
exit(1);
}
if (_setmode(fileno(stdout), O_BINARY) == -1) {
fprintf(stderr,E_SetMode,argv[0]);
exit(1);
}
total=mainloop();