procedure TForm1.Button1Click(Sender: TObject);
var
s1:string;
s2:WideString;
i:integer;
code:WORD;
b:Byte;
begin
s1:='D6EC 0AB0 A4A8 5026 6116 37E4 745B 364D';
s2:='';
code:=0;
for i:=1 to Length(s1) do
if s1 in ['0'..'9','A'..'F','a'..'f'] then
begin
b:=ord(s1);
case s1 of
'0'..'9':
b:=b-$30;
'A'..'F':
b:=b-$37;
'a'..'f':
b:=b-$57
end;
code:=code shl 4 + b
end
else
begin
s2:=s2+WideChar(code);
code:=0
end;
if code>0 then
s2:=s2+WideChar(code);
MessageBoxW(Form1.Handle,Pointer(s2),'',mb_ok)
end;