-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathSource.cpp
More file actions
67 lines (55 loc) · 1.42 KB
/
Copy pathSource.cpp
File metadata and controls
67 lines (55 loc) · 1.42 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#pragma once
#include <Windows.h>
#include <iostream>
#include <fstream>
#include "containers.h"
#include "Utils.h"
struct FConsoleObject
{
void* Vft;
FString Description;
};
void Main()
{
AllocConsole();
FILE* pFile;
freopen_s(&pFile, "CONOUT$", "w", stdout);
//uint8** Singletone = reinterpret_cast<uint8**>(uintptr_t(GetModuleHandle(0)) + 0xC36CDB0);
uint8** Singletone = reinterpret_cast<uint8**>(uintptr_t(GetModuleHandle(0)) + 0xEB916D8);
//uint8** Singletone = FindByWString(L"Valet.AdditionalUprightTorque"); // 0xEB916D8
std::cout << "Singletone: " << Singletone << std::endl;
auto& ConsoleObjects = *reinterpret_cast<TMap<FString, FConsoleObject*>*>(*Singletone + 8);
std::cout << "\nConsoleObjects: " << &ConsoleObjects << " Num: " << ConsoleObjects.Num() << "\n\n";
std::ofstream CVarDump("CVars.txt");
for (auto& Pair : ConsoleObjects)
{
if (Pair.Key())
{
CVarDump << Pair.Key().ToString() << "\n";
if (Pair.Value() && Pair.Value()->Description.IsValid())
{
CVarDump << "\"" << Pair.Value()->Description.ToString() << "\"\n\n";
}
else
{
CVarDump << "\"---\"\n\n";
}
}
}
CVarDump.close();
std::cout << "done!\n" << std::endl;
}
BOOL APIENTRY DllMain(HMODULE hModule, DWORD reason, LPVOID lpReserved)
{
switch (reason)
{
case DLL_PROCESS_ATTACH: {
CreateThread(0, 0, (LPTHREAD_START_ROUTINE)Main, 0, 0, 0);
break;
}
case DLL_PROCESS_DETACH: {
break;
}
}
return TRUE;
}