-
-
[旧帖]
大神指点下,下面这段解密字符串的应该如何理解?
0.00雪花
-
发表于:
2015-10-15 20:08
2674
-
[旧帖] 大神指点下,下面这段解密字符串的应该如何理解?
0.00雪花
// C-Zkkov-KW
void *__fastcall des(char *a1)
{
char *v1; // r12@1
const void *v2; // r15@1
__int64 v3; // rbx@1
void *v4; // rdi@1
size_t v5; // rax@3
void *v6; // rax@3
void *v7; // r14@3
size_t v8; // rax@3
const char v9; // al@3
__int64 v10; // rbx@3
signed int i; // er15@4
char v12; // cl@11
v1 = a1;
v2 = pthread_getspecific((unsigned int)g_tls_index);
v3 = (unsigned int)(*(_DWORD *)v2 + 1);
v4 = (void *)*((_QWORD *)v2 + v3);
if ( v4 )
free(v4);
v5 = strlen(v1);
v6 = malloc(v5 + 1);
v7 = v6;
*((_QWORD *)v2 + v3) = v6;
*(_QWORD *)v2 = (unsigned int)v3 % 0xA;
pthread_setspecific((unsigned int)g_tls_index, v2);
v8 = strlen(v1);
__bzero(v7, v8 + 1);
v9 = *v1;
v10 = 0LL;
if ( *v1 )
{
for ( i = 1; ; ++i )
{
if ( v9 == 35 )
{
*((_BYTE *)v7 + v10) = 47;
goto LABEL_16;
}
if ( v9 == 47 )
{
*((_BYTE *)v7 + v10) = 35;
goto LABEL_16;
}
if ( (unsigned __int8)(v9 - 97) <= 0x19u )
break;
if ( (unsigned __int8)(v9 - 65) <= 0x19u )
{
v12 = -101;
goto LABEL_14;
}
*((_BYTE *)v7 + v10) = v9;
LABEL_16:
v10 = (unsigned int)i;
if ( (unsigned int)i >= strlen(v1) )
return v7;
v9 = v1[i];
}
v12 = -37;
LABEL_14:
*((_BYTE *)v7 + v10) = v12 - v9;
goto LABEL_16;
}
return v7;
}
[培训]内核驱动高级班,冲击BAT一流互联网大厂工作,每周日13:00-18:00直播授课