I agree that this is a bad idea. Whatever method you use to get the username and password from the executable file, somebody else can use as well. Not very secure.
But, for completeness, here's an example how to do it:
use strict;
open (EXE, "> myexefile.exe");
binmode(EXE);
print EXE getexe();
close (EXE);
my $login = `myexefile.exe`;
unlink('myexefile.exe');
sub getexe {
return
"\x4d\x5a\x90\x00\x03\x00\x00\x00\x04\x00\x00\x00\xff\xff\x00\x00
+\xb8\x00\x00\x00"
."\x00\x00\x00\x00\x40\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
+\x00\x00\x00\x00"
."\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
+\x00\x00\x00\x00"
."\xd0\x00\x00\x00\x0e\x1f\xba\x0e\x00\xb4\x09\xcd\x21\xb8\x01\x4c
+\xcd\x21\x54\x68"
."\x69\x73\x20\x70\x72\x6f\x67\x72\x61\x6d\x20\x63\x61\x6e\x6e\x6f
+\x74\x20\x62\x65"
."\x20\x72\x75\x6e\x20\x69\x6e\x20\x44\x4f\x53\x20\x6d\x6f\x64\x65
+\x2e\x0d\x0a\x24"
."\x00\x00\x00\x00\x00\x00\x00\x89\x97\xcf\x9d\xcd\xf6\xa1\xce\xcd
+\xf6\xa1\xce\xcd"
."\xf6\xa1\xce\xcd\xf6\xa0\xce\xc0\xf6\xa1\xce\x94\xd5\xb2\xce\xc4
+\xf6\xa1\xce\x9b"
."\xfe\xa7\xce\xcc\xf6\xa1\xce\xcd\xf6\xa1\xce\xcc\xf6\xa1\xce\x52
+\x69\x63\x68\xcd"
."\xf6\xa1\xce\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00
+\x00\x00\x00\x00"
## (more data here)
;
}