String Decryption, Ida database #1

Merged
Aham-Admin merged 1 commits from string-decrypt into master 2022-01-04 20:30:16 +00:00
2 changed files with 24 additions and 0 deletions
Showing only changes of commit d8bb050099 - Show all commits

Binary file not shown.

24
Tools/main.cpp Normal file
View File

@@ -0,0 +1,24 @@
#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;
}