Last active
June 3, 2020 07:51
-
-
Save nguyendown/51533ae3d35007b18a155c0de8ff16a0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ml /coff woke.asm /link /subsystem:console | |
.386 | |
.model flat, stdcall | |
option casemap :none | |
include \masm32\include\kernel32.inc | |
include \masm32\include\windows.inc | |
includelib \masm32\lib\kernel32.lib | |
.code | |
start: | |
mov eax, 2 | |
call SetThreadExecutionState | |
mov eax, -1 | |
call Sleep | |
end start |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// cl a.c /link /subsystem:windows /dynamicbase "kernel32.lib" "user32.lib" | |
#include <windows.h> | |
void WinMainCRTStartup() { | |
SetThreadExecutionState(ES_DISPLAY_REQUIRED | ES_CONTINUOUS); | |
Sleep(INFINITE); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment