-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtimesync.asm
More file actions
39 lines (30 loc) · 732 Bytes
/
timesync.asm
File metadata and controls
39 lines (30 loc) · 732 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
; FASM source code
; http://flatassembler.net/
; Automatic time synchronization tool for Windows XP and newer
; timesync.asm
; (c) SysTools 2022
; http://systools.losthost.org/
format PE GUI 4.0
include 'win32ax.inc'
entry @start
section '.text' readable executable writeable code data
@start:
invoke W32TimeSetConfig, 1, 1, _str, _len
test eax, eax
jnz @f
invoke W32TimeSyncNow, 0, 1, 3
@@:
invoke ExitProcess, 0
_str du 'time.windows.com,0x1',0
_len = $ - _str
align 4
data import
library\
kernel32,'kernel32.dll',\
w32time,'w32time.dll'
import kernel32,\
ExitProcess,'ExitProcess'
import w32time,\
W32TimeSetConfig,'W32TimeSetConfig',\
W32TimeSyncNow,'W32TimeSyncNow'
end data