From 5120fd4ccbab2b8494f90be10ca07d87775993d9 Mon Sep 17 00:00:00 2001 From: ALittlePatate Date: Mon, 28 Mar 2022 17:20:50 +0200 Subject: [PATCH] Added the string decryption cpp program --- Tools/decrypt_string.cpp | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Tools/decrypt_string.cpp diff --git a/Tools/decrypt_string.cpp b/Tools/decrypt_string.cpp new file mode 100644 index 0000000..98d13b0 --- /dev/null +++ b/Tools/decrypt_string.cpp @@ -0,0 +1,23 @@ +#include +#include + +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; +} \ No newline at end of file