-
-
Save BobuSumisu/08e7d4319dc579d1918b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
int __cdecl decrypt(int src, int count, int dest, unsigned int key) | |
{ | |
unsigned int r1; // eax@1 | |
unsigned int r3; // edx@1 | |
unsigned int r2; // ecx@1 | |
int pos; // esi@2 | |
char byte; // bl@4 | |
char done; // zf@4 | |
r1 = key; | |
r2 = key; | |
r3 = key; | |
if ( count > 0 ) | |
{ | |
pos = dest; | |
while ( 1 ) | |
{ | |
r1 += (r1 >> 3) + 3; | |
r2 += (r2 >> 5) + 5; | |
key += -9 - (key << 9); | |
byte = *(_BYTE *)(src - dest + pos++) ^ ((_BYTE)key + -7 - ((_BYTE)r3 << 7) + (_BYTE)r3 + r2 + (_BYTE)r1); | |
done = count-- == 1; | |
*(_BYTE *)(pos - 1) = byte; | |
if ( done ) | |
break; | |
r3 += -7 - (r3 << 7); | |
} | |
} | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment