procedure TForm1.Button1Click(Sender: TObject);
var
i, j, k, n1, n2, asc, t: Integer;
user, fmt, computername, s, version: String;
v: Variant;
begin
user := u.Text;
n1 := 1;
n2 := 1;
if checkbox1.Checked then
for i := 1 to Length(user) do
begin
asc := Ord(user[i]);
n1 := n1 + asc;
case i mod 4 of
1: n2 := n2 - asc * i;
2: n2 := n2 + asc xor i;
3: n2 := n2 * asc - i;
0: n2 := n2 mod asc + i;
end;
end;
v := CreateOleObject('WScript.Shell');
computername := v.ExpandEnvironmentStrings('%computername%');
j := Length(computername);
version := 'MyPrettyLife@z.baidu.com 200909010037';
k := Length(version);
fmt := f.Text;
s := '';
for i := 1 to Length(fmt) do
begin
if fmt[i] = '-' then
begin
s := s + '-';
continue;
end;
t := Ord(computername[j - i mod j]) xor i;
t := t shl (i mod 3);
if i mod 2 = 1 then
t := t or n1
else
t := t or n2;
t := Abs(t) xor $1000 xor Ord(version[i mod k + 1]);
t := Abs(t);
asm
mov eax, t
push eax
add t, 100
xor t, 0
nop
nop
nop
and t, 100
pop eax
mov t, eax
end;
if fmt[i] = 'a' then
begin
s := s + Chr(t mod 26 + 65);
continue;
end;
if fmt[i] = '1' then
begin
s := s + Chr(t mod 10 + 48);
continue;
end;
end;
if s = se.Text then
ShowMessage('嘿嘿,厲害!')
else
ShowMessage('錯了,再來!')
end;