procedure TForm1.Button1Click(Sender: TObject);
var
key:array[1..5] of integer;
s,stmp:string;
i,tmp:integer;
b:boolean;
begin
key[1]:=$70;
key[2]:=$65;
key[3]:=$64;
key[4]:=$69;
key[5]:=$79;
b:=length(sn.text)=12;
if b then
begin
s:=copy(sn.text,1,2);
for i:=1 to 5 do
begin
stmp:=copy(sn.text,i*2+1,i*2+2);
tmp:=strtoint(stmp[i]) xor key[i];
tmp:=tmp+strtoint(s);
if ord(name.text[i])<>tmp then
break;
end;{for}
b:=i=5;
if b then
awf.Visible:=b;
end;{if}
end;