Advertisement
Guest User

Untitled

a guest
May 28th, 2017
101
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.  ; BOOL __stdcall ExitWindowsEx(UINT uFlags,DWORD dwReserved)
  2.                  public _ExitWindowsEx@8
  3.  _ExitWindowsEx@8 proc near
  4.  
  5.  uFlags          = dword ptr  8
  6.  dwReserved      = dword ptr  0Ch
  7.  
  8.                  push    ebp
  9.                  mov     ebp, esp
  10.                  sub     esp, 40h
  11.                  push    ebx
  12.                  push    esi
  13.                  push    edi
  14.                  cmp     [ebp+uFlags], 0
  15.                  jnz     short loc_10001020
  16.                  push    offset Name     ; "EndSession"
  17.                  push    1               ; bInitialState
  18.                  push    1               ; bManualReset
  19.                  push    0               ; lpEventAttributes
  20.                  call    ds:CreateEventA
  21.  
  22.  loc_10001020:                           ; CODE XREF: ExitWindowsEx(x,x)+Dj
  23.                  cmp     [ebp+uFlags], 1
  24.                  jnz     short loc_10001037
  25.                  push    offset aShutdown ; "Shutdown"
  26.                  push    1               ; bInitialState
  27.                  push    1               ; bManualReset
  28.                  push    0               ; lpEventAttributes
  29.                  call    ds:CreateEventA
  30.  
  31.  loc_10001037:                           ; CODE XREF: ExitWindowsEx(x,x)+24j
  32.                  cmp     [ebp+uFlags], 2
  33.                  jnz     short loc_1000104E
  34.                  push    offset aReboot  ; "Reboot"
  35.                  push    1               ; bInitialState
  36.                  push    1               ; bManualReset
  37.                  push    0               ; lpEventAttributes
  38.                  call    ds:CreateEventA
  39.  
  40.  loc_1000104E:                           ; CODE XREF: ExitWindowsEx(x,x)+3Bj
  41.                  pop     edi
  42.                  pop     esi
  43.                  pop     ebx
  44.                  mov     esp, ebp
  45.                  pop     ebp
  46.                  retn    8
  47. _ExitWindowsEx@8 endp
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement