Advertisement
LordEzz7

SourceCode - KingEzz

Sep 19th, 2018
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 1.10 KB | None | 0 0
  1. #include <Windows.h>
  2. #include <iostream>
  3.  
  4. using namespace std;
  5.  
  6.  
  7.  
  8. DWORD ASLR(DWORD addr)
  9. {
  10.     addr = (addr - 0x400000 + (DWORD)GetModuleHandle(NULL));
  11.     return addr;
  12. }
  13. // int __cdecl sub_5279A0(int a1, const char *a2, int a3)
  14.  
  15.  
  16. DWORD aPrint = ASLR(0x5279A0);
  17. typedef int(__cdecl *print_type)(int a1, const char *a2, int a3);
  18.  
  19. print_type PRINT_FUNCTION = (print_type)aPrint;
  20.  
  21. int main()
  22. {
  23.     DWORD old;
  24.     VirtualProtect(FreeConsole, 1, PAGE_EXECUTE_READWRITE, &old);
  25.     *(char*)(FreeConsole) = 0xC3; // you could also do *(BYTE*) cuz BYTE is a long Char so /shrug
  26.     VirtualProtect(FreeConsole, 1, old, &old);
  27.     AllocConsole();
  28.     SetConsoleTitleA("VideoExploit57");
  29.  
  30.     for (;;)
  31.     {
  32.         if (GetAsyncKeyState(VK_F5))
  33.         {
  34.             PRINT_FUNCTION(0, "ItWorks", 4);
  35.         }
  36.     }
  37.     return 0;
  38. }
  39.  
  40.  
  41. BOOL APIENTRY DllMain(HMODULE Module, DWORD Reason, void* Reserved)
  42. {
  43.     switch (Reason)
  44.     {
  45.     case DLL_PROCESS_ATTACH:
  46.         DisableThreadLibraryCalls(Module);
  47.         CreateThread(NULL, NULL, (LPTHREAD_START_ROUTINE)main, NULL, NULL, NULL);
  48.         break;
  49.     case DLL_PROCESS_DETACH:
  50.         break;
  51.     default: break;
  52.     }
  53.  
  54.     return TRUE;
  55. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement