fork download
  1. #include <Windows.h>
  2.  
  3. #pragma comment(linker, "/SECTION:.text,RWE")
  4.  
  5. void show(void)
  6. {
  7. __asm
  8. {
  9. nop
  10. nop
  11. nop
  12. nop
  13. }
  14. MessageBox(NULL, TEXT("OLOLO"), TEXT("KEK"), MB_OK);
  15. __asm
  16. {
  17. nop
  18. nop
  19. nop
  20. nop
  21. }
  22. }
  23.  
  24. PDWORD FindMarker(void *addr)
  25. {
  26. PDWORD ptr = (PDWORD)addr;
  27. while (*ptr != 0x90909090)
  28. ptr += 1;
  29. return ptr;
  30. }
  31.  
  32. int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPSTR lpCmdLine, int nCmdShow)
  33. {
  34. PDWORD StartMarker = 0, EndMarker = 0;
  35.  
  36. show();
  37.  
  38. PDWORD(* volatile f)(void *) = FindMarker;
  39. StartMarker = f(show);
  40. EndMarker = f(StartMarker + 1);
  41.  
  42. TCHAR buffer[127];
  43. wsprintf(buffer, TEXT("%x, %x"), StartMarker, EndMarker);
  44. MessageBox(NULL, buffer, NULL, MB_OK);
  45.  
  46. while (StartMarker != EndMarker)
  47. {
  48. *StartMarker ^= 0xDEADCAFE;
  49. StartMarker += 1;
  50. }
  51. }
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