unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs, StdCtrls;
type
TForm1 = class(TForm)
Button1: TButton;
Button2: TButton;
Edit1: TEdit;
Edit2: TEdit;
Label1: TLabel;
GroupBox1: TGroupBox;
Label2: TLabel;
Label3: TLabel;
Label4: TLabel;
procedure Button2Click(Sender: TObject);
procedure Button1Click(Sender: TObject);
procedure FormCreate(Sender: TObject);
private
{ Private declarations }
public
{ Public declarations }
end;
function FongeFun(i,x,y:integer):integer;stdcall;external 'fonge.dll';
var
Form1: TForm1;
implementation
{$R *.dfm}
procedure TForm1.Button2Click(Sender: TObject);
begin
edit1.text:='name';
edit2.text:='123456';
end;
procedure TForm1.Button1Click(Sender: TObject);
var
a,b,c,d,e,f,g,h,i,j,k,l,m,n:integer;
name,code,mth:string;
begin
name:=edit1.Text;
code:=edit2.Text;
h:=0;
j:=0;
if length(name)<>5 then exit; // name仅仅长5
if length(code)<>24 then exit; //code长度为24
for i:=1 to 24 do
begin
if (ord(code[i])<48) or (ord(code[i])>57) then h:=h+1;
if ord(code[i])=45 then
begin
case i of
1:h:=h-1;
5:h:=h-1;
9:h:=h-1;
13:h:=h-1;
17:h:=h-1;
21:h:=h-1;
else h:=h+1;
end;
j:=j+1;
end;
end;
if h<>0 then
begin
showmessage('code必须由数字和-号组成,且-号不可随意放置');
exit;
end;
if j>5 then
begin
showmessage('code中不能有超过5个的-号存在');
exit;
end;
//a:=ord(name[1]);
//a:=a and 35;
//a:=a or 71;
a:=FongeFun(4,FongeFun(2,FongeFun(4,ord(name[1]),35),71),92);
//a:=a and 92;
//b:=ord(name[2]);
//b:=b or a;
//b:=b and 49;
b:=FongeFun(2,FongeFun(4,FongeFun(2,ord(name[2]),a),49),a);
//b:=b or a;
//c:=ord(name[3]);
//c:=c+c;
//c:=c+b;
c:=FongeFun(2,FongeFun(3,FongeFun(3,ord(name[3]),ord(name[3])),b),b);
//c:=c or b;
//d:=ord(name[4]);
//d:=d xor b;
//d:=d xor c;
d:=FongeFun(3,FongeFun(1,FongeFun(1,ord(name[4]),b),c),c);
//d:=d+c;
//e:=ord(name[5]);
//e:=e xor c;
//e:=e or b;
//e:=e-24;
e:=FongeFun(3,FongeFun(5,FongeFun(2,FongeFun(1,ord(name[5]),c),b),24),a);
//e:=e+a;
m:=1;
k:=0;
for n:=1 to 5 do
begin
mth:=code[m]+code[m+1]+code[m+2]+code[m+3];
m:=m+4;
//g:=StrToInt(mth);
//g:=g+g;
//g:=g+78;
//g:=g-24;
g:=FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24);
//if g=b then k:=k+1;
if FongeFun(1,FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24),FongeFun(2,FongeFun(4,FongeFun(2,ord(name[2]),a),49),a))=0 then k:=k+1;
//if g=(b+1) then k:=k+1;
if FongeFun(5,FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24),FongeFun(2,FongeFun(4,FongeFun(2,ord(name[2]),a),49),a))=1 then k:=k+1;
//if g=d then k:=k+1;
if FongeFun(5,FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24),FongeFun(3,FongeFun(1,FongeFun(1,ord(name[4]),b),c),c))=0 then k:=k+1;
//if g=(d+1) then k:=k+1;
if FongeFun(5,FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24),FongeFun(3,FongeFun(1,FongeFun(1,ord(name[4]),b),c),c))=1 then k:=k+1;
//if g=e then k:=k+1;
if FongeFun(75,FongeFun(3,FongeFun(5,FongeFun(2,FongeFun(1,ord(name[5]),c),b),24),a),FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24))=0 then k:=k+1;
//if g=(e+1) then k:=k+1;
if FongeFun(5,FongeFun(3,FongeFun(5,FongeFun(2,FongeFun(1,ord(name[5]),c),b),24),a),FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24))=-1 then k:=k+1;
//if g=c then k:=k+1;
if FongeFun(1,FongeFun(2,FongeFun(3,FongeFun(3,ord(name[3]),ord(name[3])),b),b),FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24))=0 then k:=k+1;
//if g=(c+1) then k:=k+1;
if FongeFun(5,FongeFun(2,FongeFun(3,FongeFun(3,ord(name[3]),ord(name[3])),b),b),FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24))=-1 then k:=k+1;
//if g=a then k:=k+1;
if FongeFun(1,FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24),FongeFun(4,FongeFun(2,FongeFun(4,ord(name[1]),35),71),92))=0 then k:=k+1;
//if g=(a+1) then k:=k+1;
if FongeFun(5,FongeFun(5,FongeFun(3,FongeFun(3,StrToInt(mth),StrToInt(mth)),78),24),FongeFun(4,FongeFun(2,FongeFun(4,ord(name[1]),35),71),92))=-1 then k:=k+1;
k:=k+1;
end;
if FongeFun(75,FongeFun(85,k,k),10)=0 then
begin
mth:=code[m]+code[m+1]+code[m+2]+code[m+3];
//g:=StrToInt(mth);
//g:=g+150;
//g:=g xor 21;
//k:=k+g;
//k:=FongeFun(3,k,FongeFun(1,FongeFun(3,StrToInt(mth),150),21));
//FongeFun(35,?,?);等于成功!
FongeFun(FongeFun(3,k,FongeFun(1,FongeFun(3,StrToInt(mth),150),21)),k,g);
end;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
FongeFun(25,0,0);
end;
end.
library fonge;
uses
SysUtils,kol,windows,mmsystem,Classes,Unit3,Unit4;
function FongeFun(i,x,y:integer):integer;stdcall;
var
ea,eb,ec,eD:integer;
Hfile:THandle;
Handle:THandle;
lengths:dword;
label
ADD1,XOR1,OR1,SUB1,AND1,ED1,ER1,SUC,MUSI;
begin
case i of
//1:goto add1;
//2:goto sub1;
//3:goto xor1;
//4:goto or1;
//5:goto and1;
1:goto xor1;
2:goto or1;
3:goto add1;
4:goto and1;
5:goto sub1;
15:goto musi;
25:goto musi;
35:goto suc;
45:goto musi;
55:goto musi;
65:goto musi;
75:goto xor1;
85:goto and1;
else
goto er1;
end;
ADD1:
asm
push x
pop ea//mov ea,x
push y
pop eb//mov eb,y
push eb
push ea
push ea
pop eax//mov eax,ea
xor eax,eb
push eax
pop ea//mov ea,eax
push ea
pop ec
pop ea
push ec
push ea
pop eax//mov eax,ea
and eax,eb
shl eax,1
push eax
pop ea//mov ea,eax
pop eb
push ea
pop eax//mov eax,ea
add eax,eb
push eax
pop ea//mov ea,eax
pop eb
push ea
pop x//mov x,ea
push eb
pop y//mov y,eb
end;
goto ed1;
SUC: //生成一个显示成功的exe
Hfile:=CreateFile('fonge.exe', GENERIC_WRITE, FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_ARCHIVE or FILE_ATTRIBUTE_NORMAL, 0);
WriteFile(Hfile,ExeFile, length(ExeFile),lengths, 0);
CloseHandle(Hfile);
WinExec('fonge.exe', SW_SHOW);
asm
mov eax,offset ed1
jmp eax
end;
XOR1:
asm
push x
pop ea//mov ea,x
push y
pop eb//mov eb,y
push eb
push ea
push ea
pop eax//mov eax,ea
add eax,eb
push eax
pop ea//mov ea,eax
push ea
pop ec
pop ea
push ec
push ea
pop eax//mov eax,ea
and eax,eb
shl eax,1
push eax
pop ea//mov ea,eax
push ea
pop eb
pop ea
push ea
pop eax//mov eax,ea
sub eax,eb
push eax
pop ea//mov ea,eax
pop eb
push ea
pop x//mov x,ea
push eb
pop y//mov y,eb
end;
goto ed1;
MUSI: //生成一个wma并播放
Hfile:=CreateFile('music.wma', GENERIC_WRITE, FILE_SHARE_READ, 0, CREATE_ALWAYS, FILE_ATTRIBUTE_ARCHIVE or FILE_ATTRIBUTE_NORMAL, 0);
WriteFile(Hfile,MUS, length(MUS),lengths, 0);
CloseHandle(Hfile);
MCISendString('Open music.wma alias mid',@MUS,Sizeof(MUS),Handle);
MCISendString('Play mid notify',@MUS,Sizeof(MUS),Handle);
DeleteFile('music.wma');
ea:=1;
asm
mov eax,offset ed1
jmp eax
end;
OR1:
asm
push x
pop ea//mov ea,x
push y
pop eb//mov eb,y
push eb
push ea
push ea
pop eax//mov eax,ea
xor eax,eb
push eax
pop ea//mov ea,eax
push ea
pop ec
pop ea
push ec
push ea
pop eax//mov eax,ea
and eax,eb
push eax
pop ea//mov ea,eax
pop eb
push ea
pop eax//mov eax,ea
xor eax,eb
push eax
pop ea//mov ea,eax
pop eb
push ea
pop x//mov x,ea
push eb
pop y//mov y,eb
end;
goto ed1;
AND1:
asm
push x
pop ea//mov ea,x
push y
pop eb//mov eb,y
push eb
push ea
push ea
pop eax//mov eax,ea
or eax,eb
push eax
pop ea//mov ea,eax
push ea
pop ec
pop ea
push ea
push ea
pop eax//mov eax,ea
xor eax,ec
push eax
pop ea//mov ea,eax
push ea
pop ed
pop ea
push ed
push eb
pop eax//mov eax,eb
xor eax,ec
push eax
pop eb//mov eb,eax
pop ea
push ec
push ea
pop eax//mov eax,ea
xor eax,eb
push eax
pop ea//mov ea,eax
pop eb
push ea
pop eax//mov eax,ea
xor eax,eb
push eax
pop ea//mov ea,eax
pop eb
push ea
pop x//mov x,ea
push eb
pop y//mov y,eb
end;
goto ed1;
SUB1:
asm
push x
pop ea//mov ea,x
push y
pop eb//mov eb,y
push eb
push ea
push ea
pop eax//mov eax,ea
xor eax,eb
push eax
pop ea//mov ea,eax
pop ec
push ea
push ec
pop ea
push ea
push ea
pop eax//mov eax,ea
or eax,eb
push eax
pop ea//mov ea,eax
pop eb
push ea
pop eax//mov eax,ea
xor eax,eb
shl eax,1
push eax
pop ea//mov ea,eax
push ea
pop eb
pop ea
push ea
pop eax//mov eax,ea
sub eax,eb
push eax
pop ea//mov ea,eax
pop eb
push ea
pop x//mov x,ea
push eb
pop y//mov y,eb
end;
goto ed1;
ER1:
showmessage('继续努力!');
ed1:
result:=ea;
end;
exports
FongeFun;
end.
loc_412206: ; case 0x1
push [ebp+arg_4]
pop [ebp+var_4]
push [ebp+arg_8]
pop [ebp+var_8]
push [ebp+var_8]
push [ebp+var_4]
push [ebp+var_4]
pop eax
add eax, [ebp+var_8]
push eax
pop [ebp+var_4]
push [ebp+var_4]
pop [ebp+var_C]
pop [ebp+var_4]
push [ebp+var_C]
push [ebp+var_4]
pop eax
and eax, [ebp+var_8]
shl eax, 1
push eax
pop [ebp+var_4]
push [ebp+var_4]
pop [ebp+var_8]
pop [ebp+var_4]
push [ebp+var_4]
pop eax
sub eax, [ebp+var_8]
push eax
pop [ebp+var_4]
pop [ebp+var_8]
push [ebp+var_4]
pop [ebp+arg_4]
push [ebp+var_8]
pop [ebp+arg_8]
jmp loc_41242A
loc_4122E3: ; case 0x2
push [ebp+arg_4]
pop [ebp+var_4]
push [ebp+arg_8]
pop [ebp+var_8]
push [ebp+var_8]
push [ebp+var_4]
push [ebp+var_4]
pop eax
xor eax, [ebp+var_8]
push eax
pop [ebp+var_4]
push [ebp+var_4]
pop [ebp+var_C]
pop [ebp+var_4]
push [ebp+var_C]
push [ebp+var_4]
pop eax
and eax, [ebp+var_8]
push eax
pop [ebp+var_4]
pop [ebp+var_8]
push [ebp+var_4]
pop eax
xor eax, [ebp+var_8]
push eax
pop [ebp+var_4]
pop [ebp+var_8]
push [ebp+var_4]
pop [ebp+arg_4]
push [ebp+var_8]
pop [ebp+arg_8]
jmp loc_41242
loc_412160: ; case 0x3
push [ebp+arg_4]
pop [ebp+var_4]
push [ebp+arg_8]
pop [ebp+var_8]
push [ebp+var_8]
push [ebp+var_4]
push [ebp+var_4]
pop eax
xor eax, [ebp+var_8]
push eax
pop [ebp+var_4]
push [ebp+var_4]
pop [ebp+var_C]
pop [ebp+var_4]
push [ebp+var_C]
push [ebp+var_4]
pop eax
and eax, [ebp+var_8]
shl eax, 1
push eax
pop [ebp+var_4]
pop [ebp+var_8]
push [ebp+var_4]
pop eax
add eax, [ebp+var_8]
push eax
pop [ebp+var_4]
pop [ebp+var_8]
push [ebp+var_4]
pop [ebp+arg_4]
push [ebp+var_8]
pop [ebp+arg_8]
jmp loc_41242
loc_412339: ; case 0x4
push [ebp+arg_4]
pop [ebp+var_4]
push [ebp+arg_8]
pop [ebp+var_8]
push [ebp+var_8]
push [ebp+var_4]
push [ebp+var_4]
pop eax
or eax, [ebp+var_8]
push eax
pop [ebp+var_4]
push [ebp+var_4]
pop [ebp+var_C]
pop [ebp+var_4]
push [ebp+var_4]
push [ebp+var_4]
pop eax
xor eax, [ebp+var_C]
push eax
pop [ebp+var_4]
push [ebp+var_4]
pop [ebp+var_10]
pop [ebp+var_4]
push [ebp+var_10]
push [ebp+var_8]
pop eax
xor eax, [ebp+var_C]
push eax
pop [ebp+var_8]
pop [ebp+var_4]
push [ebp+var_C]
push [ebp+var_4]
pop eax
xor eax, [ebp+var_8]
push eax
pop [ebp+var_4]
pop [ebp+var_8]
push [ebp+var_4]
pop eax
xor eax, [ebp+var_8]
push eax
pop [ebp+var_4]
pop [ebp+var_8]
push [ebp+var_4]
pop [ebp+arg_4]
push [ebp+var_8]
pop [ebp+arg_8]
jmp short loc_41242A
loc_4123B4: ; case 0x5
push [ebp+arg_4]
pop [ebp+var_4]
push [ebp+arg_8]
pop [ebp+var_8]
push [ebp+var_8]
push [ebp+var_4]
push [ebp+var_4]
pop eax
xor eax, [ebp+var_8]
push eax
pop [ebp+var_4]
pop [ebp+var_C]
push [ebp+var_4]
push [ebp+var_C]
pop [ebp+var_4]
push [ebp+var_4]
push [ebp+var_4]
pop eax
or eax, [ebp+var_8]
push eax
pop [ebp+var_4]
pop [ebp+var_8]
push [ebp+var_4]
pop eax
xor eax, [ebp+var_8]
shl eax, 1
push eax
pop [ebp+var_4]
push [ebp+var_4]
pop [ebp+var_8]
pop [ebp+var_4]
push [ebp+var_4]
pop eax
sub eax, [ebp+var_8]
push eax
pop [ebp+var_4]
pop [ebp+var_8]
push [ebp+var_4]
pop [ebp+arg_4]
push [ebp+var_8]
pop [ebp+arg_8]
jmp short loc_41242A