各位大哥,帮小弟看看下面的程序错在那里,怎样改:算法很简单,就想搞明白为什么不可以
#include <string.h>
#include <stdio.h>
#include <stdlib.h>
void main()
{
int len,i;
int EBP_40,a2,EBP_44,EBP_38,EBP_4C,EBP_48,EBP_54,EBP_50;
int EDI=0x64F4F0;
char name[50]={0};
printf("Please input your name:");
scanf("%s",name);
_asm
{
lea EDX,offset[name]
ADD dword ptr[EBP-3C],EDX //
ADD DWORD PTR SS:[EBP-3C],EDX
MOV EAX,EDX
ADD EAX,5
MOV DWORD PTR SS:[EBP-48],EAX
XOR EAX,EAX
MOV ECX,EDI
ADD ECX,4
MOV DWORD PTR SS:[EBP-4C],ECX
XOR ECX,ECX
ADD DWORD PTR SS:[EBP-44],EDX
ADD DWORD PTR SS:[EBP-44],EDI
IMUL EDI,EDI,3
MOV DWORD PTR SS:[EBP-40],EDI
XOR EDI,EDI
MOVSX ECX,BYTE PTR SS:[EBP+EAX-BC]
CMP ECX,61
JL L024
NOP
NOP
NOP
NOP
SUB ECX,20
L024:
MOV ESI,ECX
ADD EBX,ESI
IMUL EBX,ECX
DEC EDX
L028:
MOVSX ECX,BYTE PTR DS:[EDI+EBP-BC]
MOVSX ESI,BYTE PTR DS:[EDI+EBP-BB]
CMP ECX,61
JGE L046
NOP
NOP
NOP
NOP
L036:
CMP ESI,61
JGE L048
NOP
NOP
NOP
NOP
JMP L049
NOP
NOP
NOP
L046:
SUB ECX,20
JMP L036
L048:
SUB ESI,20
L049:
INC EDI
ADD EBX,ESI
IMUL EBX,ECX
DEC EDX
JNZ L028
MOV DWORD PTR SS:[EBP-38],EBX
XOR ECX,ECX
XOR EDX,EDX
XOR EBX,EBX
XOR EAX,EAX
CMP DWORD PTR SS:[EBP-2C],32
JGE k4n2.0040122F
L061:
MOVSX EAX,BYTE PTR SS:[EBP+ECX-BC]
ADD EAX,ECX
ADD EBX,EAX
INC ECX
CMP ECX,DWORD PTR SS:[EBP-2C]
JNZ L061
ROL EAX,1
XOR EAX,1E240
MOV DWORD PTR SS:[EBP-50],EAX
XOR ECX,ECX
XOR EDX,EDX
XOR EBX,EBX
XOR EAX,EAX
L074:
MOVSX EAX,BYTE PTR SS:[EBP+ECX-BC]
IMUL EDX,EAX,6
XOR EAX,EDX
ADD EBX,EAX
INC ECX
CMP ECX,DWORD PTR SS:[EBP-2C]
JNZ L074
ADD EBX,DWORD PTR SS:[EBP-50]
MOV DWORD PTR SS:[EBP-54],EBX
}
printf("Your password is: %lX%lu-%lu%lX-%lu%lu-%lX%lX\n",
EBP_50,EBP_54,EBP_48,EBP_4C,EBP_38,EBP_44,EBP_3C,EBP_40);
printf("KeyGen by RoBa Enjoy Cracking!\n");
}
还有下面的错误提示可不以可说说为什么?
-Configuration: k4n2 - Win32 Debug--------------------
Compiling...
k4n2.cpp
c:\documents and settings\administrator\桌面\k4n2.cpp(15) : error C2415: improper operand type
c:\documents and settings\administrator\桌面\k4n2.cpp(15) : error C2415: improper operand type
c:\documents and settings\administrator\桌面\k4n2.cpp(15) : error C2041: illegal digit 'C' for base '10'
c:\documents and settings\administrator\桌面\k4n2.cpp(17) : error C2041: illegal digit 'C' for base '10'
c:\documents and settings\administrator\桌面\k4n2.cpp(24) : error C2041: illegal digit 'C' for base '10'
c:\documents and settings\administrator\桌面\k4n2.cpp(31) : error C2425: '-' : non-constant expression in 'second operand'
c:\documents and settings\administrator\桌面\k4n2.cpp(45) : error C2425: '-' : non-constant expression in 'second operand'
c:\documents and settings\administrator\桌面\k4n2.cpp(46) : error C2425: '-' : non-constant expression in 'second operand'
c:\documents and settings\administrator\桌面\k4n2.cpp(80) : error C2041: illegal digit 'C' for base '10'
c:\documents and settings\administrator\桌面\k4n2.cpp(81) : error C2400: inline assembler syntax error in 'second operand'; found 'constant'
c:\documents and settings\administrator\桌面\k4n2.cpp(82) : error C2400: inline assembler syntax error in 'opcode'; found 'constant'
c:\documents and settings\administrator\桌面\k4n2.cpp(83) : error C2425: '-' : non-constant expression in 'second operand'
c:\documents and settings\administrator\桌面\k4n2.cpp(87) : error C2041: illegal digit 'C' for base '10'
c:\documents and settings\administrator\桌面\k4n2.cpp(90) : error C2041: illegal digit 'E' for base '10'
c:\documents and settings\administrator\桌面\k4n2.cpp(97) : error C2425: '-' : non-constant expression in 'second operand'
c:\documents and settings\administrator\桌面\k4n2.cpp(102) : error C2041: illegal digit 'C' for base '10'
c:\documents and settings\administrator\桌面\k4n2.cpp(129) : error C2065: 'EBP_3C' : undeclared identifier
执行 cl.exe 时出错.
k4n2.obj - 1 error(s), 0 warning(s)
小弟在此先谢过了。
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课