fork download
  1. #include <Windows.h>
  2.  
  3. #pragma comment(linker, "/SECTION:.text,RWE")
  4.  
  5.  
  6. void show(void)
  7. {
  8. __asm
  9. {
  10. __declspec(align(4))
  11. nop
  12. nop
  13. nop
  14. nop
  15. }
  16. MessageBox(NULL, TEXT("OLOLO"), TEXT("KEK"), MB_OK);
  17. __asm
  18. {
  19. nop
  20. nop
  21. nop
  22. nop
  23. }
  24. }
  25.  
  26. PDWORD FindMarker(void *addr)
  27. {
  28. PDWORD ptr = (PDWORD)addr;
  29. while (*ptr != 0x90909090)
  30. ptr += 1;
  31. return ptr;
  32. }
  33.  
  34. int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
  35. {
  36. PDWORD StartMarker = 0, EndMarker = 0;
  37. HANDLE hFile = NULL;
  38. HANDLE hFileMapping = NULL;
  39. LPVOID lpMapView = NULL;
  40.  
  41. PDWORD(*volatile f)(void *) = FindMarker;
  42.  
  43. StartMarker = f(show);
  44. EndMarker = f(StartMarker + 1);
  45.  
  46. TCHAR buffer[127];
  47. wsprintf(buffer, TEXT("%x, %x"), StartMarker, EndMarker);
  48. MessageBox(NULL, buffer, NULL, MB_OK);
  49.  
  50. while (++StartMarker != EndMarker)
  51. {
  52. *StartMarker ^= 0xDEADCAFE;
  53. }
  54. show();
  55. }
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Standard input is empty
compilation info
prog.cpp:1:21: fatal error: Windows.h: No such file or directory
compilation terminated.
stdout
Standard output is empty