-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdecryption.asm
48 lines (41 loc) · 1.17 KB
/
decryption.asm
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#pragma once
static std::string ReadFNamePool(int key)
{
uint64_t NamePoolChunk = read<uint64_t>(g_pid, g_base_address + 0xCCB6E80 + (8 * (uint32_t)((int)(key) >> 16)) + 16) + (unsigned int)(4 * (uint16_t)key);
int nameLength = read<uint16_t>(g_pid, NamePoolChunk) >> 6;
char buff[1024];
if ((uint32_t)nameLength)
{
for (int x = 0; x < nameLength; ++x)
{
buff[x] = read<char>(g_pid, NamePoolChunk + 4 + x);
}
char* v2 = buff; int v4 = nameLength, v5 = 0, v7; __int64 v6 = 30i64; char v8;
if (v4)
{
do
{
v7 = v5 | v6;
++v2;
++v5;
v8 = ~(BYTE)v7;
v6 = (unsigned int)(2 * v7);
*(BYTE*)(v2 - 1) ^= v8;
} while (v5 < v4);
} buff[nameLength] = '\0'; return std::string(buff);
}
else return "";
}
static std::string GetNameFromFName(int key)
{
uint64_t NamePoolChunk = read<uint64_t>(g_pid, g_base_address + 0xCCB6E80 + (8 * (uint32_t)((int)(key) >> 16)) + 16) + (unsigned int)(4 * (uint16_t)key);
if (read<uint16_t>(g_pid, NamePoolChunk) < 64)
{
auto a1 = read<DWORD>(g_pid, NamePoolChunk + 4);
return ReadFNamePool(a1);
}
else
{
return ReadFNamePool(key);
}
}