Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #pragma warning(disable:4996)
- #ifdef _MSC_VER
- #define _CRT_SECURE_NO_WARNINGS
- #endif
- #include <iostream>
- #include <windows.h>
- #include <SDKDDKVer.h>
- using namespace std;
- bool OFFEON = false; // DEFINIR LIGADO E DESLIGADO
- void OpenConsole()
- {
- AllocConsole();
- freopen("CONIN$", "r", stdin);
- freopen("CONOUT$", "w", stdout);
- freopen("CONOUT$", "w", stderr);
- SetConsoleTitle(L"TESTE");
- }
- DWORD PEGAADDRESS() { // PEGA ENDEREÇO FINAL DA VIDA
- DWORD Address = (int)GetModuleHandle(L"Torchlight.exe") + 0x00A2B6A4;
- printf("0x%X \n", Address);
- Address = *(DWORD*)Address;
- printf("0x%X \n", Address);
- Address = *(DWORD*)(Address + 0x1c);
- printf("0x%X \n", Address);
- Address = (Address + 0x394);
- printf("0x%X \n", Address);
- return Address;
- }
- DWORD WINAPI IniComds(LPVOID blabla) {
- DWORD EVIDA = 0; //PEGA ENDEREÇO FINAL
- while (true) {
- if (GetAsyncKeyState(VK_F1) & 1) {
- if (EVIDA == 0) {
- EVIDA = PEGAADDRESS();
- }
- OFFEON = !OFFEON;
- printf("Valor? %f \n", *(FLOAT*)EVIDA);
- if (OFFEON == 0) { cout << "OFF"; }
- else { cout << "ON"; }
- }
- if (OFFEON && EVIDA != 0) {
- *(FLOAT*)EVIDA = 9999;
- }
- }
- return 0;
- }
- BOOL APIENTRY DllMain(HMODULE hModule,
- DWORD dReason,
- LPVOID lpReserved
- )
- {
- if (dReason == DLL_PROCESS_ATTACH) {
- OpenConsole();
- CreateThread(NULL, NULL, IniComds, NULL, NULL, NULL);
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement