Added the string decryption cpp program

This commit is contained in:
ALittlePatate
2022-03-28 17:20:50 +02:00
parent 8f64a9904c
commit 5120fd4ccb

23
Tools/decrypt_string.cpp Normal file
View File

@@ -0,0 +1,23 @@
#include <iostream>
#include <defs.h>
void Decrypt(int a1, int size)
{
unsigned int i; // [esp+10h] [ebp-4h]
for (i = 0; i <= (size - 2); ++i)
*(char*)(a1 + i) ^= (char)i + 3;
*(char*)(a1 + (size - 1)) = 0;
}
int main()
{
char string[] = "Pgdhiagm+jb|/";
Decrypt((int)string, sizeof(string));
std::cout << string << std::endl;
return 0;
}