-
-
[求助]加、解密算法
-
发表于:
2021-2-24 17:05
9652
-
下面的加密和解密算法是不是哪种常用的算法?返回值好像当校验码用的。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | unsigned int __stdcall Enc_buffer(char * pDec, char * pEnc, unsigned int len )
{
unsigned int result; / / eax
char * v4; / / edi
int v5; / / ecx
char * v6; / / esi
char v7; / / cl
char v8; / / dl
unsigned int v9; / / eax
char * pEnca; / / [esp + Ch] [ebp + Ch]
result = 0x12345678 ;
if ( len )
{
v4 = pEnc;
v5 = pDec - pEnc;
v6 = pEnc;
for ( pEnca = (char * )(pDec - pEnc); ; v5 = ( int )pEnca )
{
v7 = v6[v5];
v8 = v7 ^ result;
v9 = (v7 + 1234 ) ^ ((v7 + 7 ) * (v7 + result + 1234 ));
result = (((v9 >> 22 ) + v9) >> 16 ) ^ ((v9 >> 22 ) + v9);
if ( v4 )
* v6 = v8;
+ + v6;
if ( ! - - len )
break ;
}
}
return result;
}
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 | unsigned int __stdcall Dec_buffer(char * pEnc, char * pDec, unsigned int len )
{
unsigned int result; / / eax
char * v4; / / esi
char v5; / / cl
unsigned int v6; / / eax
result = 0x12345678 ;
if ( len )
{
v4 = pDec;
do
{
v5 = result ^ v4[pEnc - pDec];
v6 = (v5 + 1234 ) ^ ((v5 + 7 ) * (v5 + result + 1234 ));
* v4 = v5;
result = (((v6 >> 22 ) + v6) >> 16 ) ^ ((v6 >> 22 ) + v6);
+ + v4;
- - len ;
}
while ( len );
}
return result;
}
|
[招生]科锐逆向工程师培训(2024年11月15日实地,远程教学同时开班, 第51期)
最后于 2021-2-24 17:07
被lionnnn编辑
,原因: