[C] 纯文本查看 复制代码 int __fastcall main(int argc, const char **argv, const char **envp)
{
char *v4; // rsi
char src[8]; // [rsp+10h] [rbp-260h] BYREF
__int64 v6; // [rsp+18h] [rbp-258h]
_QWORD v7[2]; // [rsp+20h] [rbp-250h]
char salt[2]; // [rsp+30h] [rbp-240h] BYREF
char v9; // [rsp+32h] [rbp-23Eh]
char v10[8]; // [rsp+40h] [rbp-230h] BYREF
__int64 v11; // [rsp+48h] [rbp-228h]
char s[8]; // [rsp+50h] [rbp-220h] BYREF
__int64 v13; // [rsp+58h] [rbp-218h]
char v14[256]; // [rsp+60h] [rbp-210h] BYREF
char dest[8]; // [rsp+160h] [rbp-110h] BYREF
__int64 v16; // [rsp+168h] [rbp-108h]
__int64 v17; // [rsp+170h] [rbp-100h]
__int64 v18; // [rsp+178h] [rbp-F8h]
_BYTE v19[128]; // [rsp+180h] [rbp-F0h] BYREF
_DWORD v20[18]; // [rsp+200h] [rbp-70h] BYREF
char *v21; // [rsp+248h] [rbp-28h]
int v22; // [rsp+250h] [rbp-20h]
int v23; // [rsp+254h] [rbp-1Ch]
__int64 v24; // [rsp+258h] [rbp-18h]
int v25; // [rsp+260h] [rbp-10h]
int v26; // [rsp+264h] [rbp-Ch]
int v27; // [rsp+268h] [rbp-8h]
int i; // [rsp+26Ch] [rbp-4h]
v25 = 0;
v24 = 0LL;
memset(v20, 0, 0x40uLL);
memset(v19, 0, sizeof(v19));
*(_QWORD *)dest = 0LL;
v16 = 0LL;
v17 = 0LL;
v18 = 0LL;
memset(v14, 0, sizeof(v14));
i = 0;
v27 = 0;
v23 = 0;
v22 = 0;
v26 = 0;
*(_QWORD *)s = 0LL;
v13 = 0LL;
*(_QWORD *)v10 = 0LL;
v11 = 0LL;
*(_WORD *)salt = 0;
v9 = 0;
v7[0] = 0LL;
v7[1] = 0LL;
*(_QWORD *)src = 0LL;
v6 = 0LL;
v21 = 0LL;
v21 = (char *)argv[1];
v23 = strlen(argv[1]);
strcpy(dest, &v21[v23 - 9]);
salt[0] = bn_get_salt((unsigned int)(char)v16);
salt[1] = bn_get_salt((unsigned int)dest[7]);
v9 = 0;
v4 = crypt(dest, salt);
strcpy(s, v4);
v22 = (char)v16 % 5;
*((_BYTE *)v7 + v27) = v16;
v20[v27++] = 0;
*((_BYTE *)v7 + v27) = bgs((unsigned int)dest[7]);
v20[v27++] = 1;
for ( i = 8; 9 - v22 <= i; --i )
{
*((_BYTE *)v7 + v27) = bgs((unsigned int)dest[i]);
v20[v27++] = i;
}
}
上面是用IDA反编译看到的伪代码,这里有个疑问v16和v22都初始值为0,v22 = (char)v16 % 5;得到的也是0,那么 下面这个循环永远也不会进,这有啥意义呢?是反编译生成的伪代码有问题么?
for ( i = 8; 9 - v22 <= i; --i )
{
*((_BYTE *)v7 + v27) = bn_get_sepcial((unsigned int)dest);
v20[v27++] = i;
} |