-
-
C++代码编译提示“_BYTE” : 未声明的标识符
-
发表于:
2015-5-29 11:30
15664
-
C++代码编译提示“_BYTE” : 未声明的标识符
int __cdecl sub_403410(int a1, void *a2)
{
int v2; // ebp@1
signed int v3; // edi@1
unsigned int v4; // ebx@4
int v5; // esi@5
int result; // eax@16
unsigned int v7; // [sp+Ch] [bp-Ch]@1
unsigned int v8; // [sp+10h] [bp-8h]@4
int v9; // [sp+1Ch] [bp+4h]@1
v2 = a1;
v3 = 0;
v7 = 0;
v9 = 0;
if ( v2 && a2 && strlen((const char *)v2) + 1 <= 0x64 )
{
v4 = strlen((const char *)v2);
v8 = v4;
memset(a2, 0, 0x64u);
if ( (signed int)v4 <= 0 )
{
LABEL_16:
result = 1;
}
else
{
while ( 1 )
{
v5 = v3 + v2;
v9 += *(_BYTE *)(v3 + v2);
if ( v3 % 2 == 1 )
{
v4 = v8;
*(_BYTE *)v5 = *(_BYTE *)(v3 + v2 - 1)
* (*(_BYTE *)(v3 + v2) * ((*(_BYTE *)v5 + 3 * *(_BYTE *)(v3 + v2 - 1)) ^ 0xE) + v9 / 2);
}
if ( v3 % 3 == 2 )
*(_BYTE *)v5 = *(_BYTE *)(v3 + v2 - 1) * ((*(_BYTE *)(v3 + v2 - 1) + *(_BYTE *)v5 + 13) ^ 0x11);
if ( v3 % 3 == 3 )
*(_BYTE *)v5 = ((*(_BYTE *)v5 + *(_BYTE *)(v3 + v2 - 1) / 3) ^ 0x13)
* ((*(_BYTE *)v5 + *(_BYTE *)(v3 + v2 - 1) / 3) ^ 0x13);
if ( v3 > 0 && v3 < v5 + -1 - v2 )
*(_BYTE *)v5 = v9 ^ 0xAB;
if ( v7 >= 0x64 )
break;
v7 += sprintf((char *)a2 + v7, "%x", *(_BYTE *)v5);
++v3;
if ( v3 >= (signed int)v4 )
goto LABEL_16;
}
*(_BYTE *)a2 = 0;
result = 0;
}
}
else
{
result = 0;
}
return result;
}
这是ida反汇编出来的
main函数里调用方法
strncpy(szIn, "ALFEIOEK1432693115", OUTBUFFERSIZE-1);
char * Xx;
memset(Xx, 0, 0x64u);
//Algo(szIn, szOut);
sub_403410((int)Xx, szIn);
printf("\nOutput:\t%s\n", szIn);
提示错误:error C2065: “_BYTE” : 未声明的标识符
然后附上源程序
http://pan.baidu.com/s/1kT9rOyV
004043F8 . E8 13F0FFFF call Arecover.00403410 //这是call的地方
请帮我看看,代码哪里不对?
或者看看我这帖子
http://bbs.pediy.com/showthread.php?t=200826
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课