Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Windows.h>
- #include <iostream>
- using namespace std;
- DWORD ASLR(DWORD addr)
- {
- addr = (addr - 0x400000 + (DWORD)GetModuleHandle(NULL));
- return addr;
- }
- // int __cdecl sub_5279A0(int a1, const char *a2, int a3)
- DWORD aPrint = ASLR(0x5279A0);
- typedef int(__cdecl *print_type)(int a1, const char *a2, int a3);
- print_type PRINT_FUNCTION = (print_type)aPrint;
- int main()
- {
- DWORD old;
- VirtualProtect(FreeConsole, 1, PAGE_EXECUTE_READWRITE, &old);
- *(char*)(FreeConsole) = 0xC3; // you could also do *(BYTE*) cuz BYTE is a long Char so /shrug
- VirtualProtect(FreeConsole, 1, old, &old);
- AllocConsole();
- SetConsoleTitleA("VideoExploit57");
- for (;;)
- {
- if (GetAsyncKeyState(VK_F5))
- {
- PRINT_FUNCTION(0, "ItWorks", 4);
- }
- }
- return 0;
- }
- BOOL APIENTRY DllMain(HMODULE Module, DWORD Reason, void* Reserved)
- {
- switch (Reason)
- {
- case DLL_PROCESS_ATTACH:
- DisableThreadLibraryCalls(Module);
- CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)main, NULL, NULL, NULL);
- break;
- case DLL_PROCESS_DETACH:
- break;
- default: break;
- }
- return TRUE;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement