Function at 0x140001000
Capabilities:
Execute command

Disassembly:
push rsi
sub rsp, 0x70
mov rax, qword [0x140005008]
xor rax, rsp
mov qword [rsp + 0x30], rax
lea r9, str.WatchdogEvent
xor r8d, r8d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rsi, rax
test rax, rax
jne 0x14000106a
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Failed_to_create_watchdog_event
call fcn.140001320
mov rcx, rax
lea rdx, [0x1400014f0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea eax, [rsi + 1]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400015b0
add rsp, 0x70
pop rsi
ret
lea r8, str.MainProgramEvent
mov qword [rsp + 0x88], rbp
xor edx, edx
mov ecx, 0x100002
call qword [sym.imp.KERNEL32.dll_OpenEventA]
mov rbp, rax
test rax, rax
jne 0x1400010c2
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cerr]
lea rdx, str.Main_program_not_running
call fcn.140001320
mov rcx, rax
lea rdx, [0x1400014f0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [rbp + 1]
jmp 0x140001302
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Watchdog_running._Press_CtrlC_to_exit.
call fcn.140001320
mov rcx, rax
lea rdx, [0x1400014f0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, 0x2710
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
je 0x1400012b1
mov qword [rsp + 0x80], rbx
mov qword [rsp + 0x90], rdi
mov qword [rsp + 0x68], r12
movabs r12, 0x7fffffffffffffff
mov qword [rsp + 0x60], r13
movabs r13, 0x7fffffffc46535ff
mov qword [rsp + 0x58], r14
movabs r14, 0x311cdad160000
mov qword [rsp + 0x50], r15
movabs r15, 0x112e0be826d694b3
movaps xmmword [rsp + 0x40], xmm6
movsd xmm6, qword [0x1400033f8]
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rbx, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
cmp rbx, 0x989680
jne 0x14000117e
imul rax, rax, 0x64
jmp 0x14000119c
cqo
idiv rbx
mov rcx, rax
imul rax, rdx, 0x3b9aca00
imul rcx, rcx, 0x3b9aca00
cqo
idiv rbx
add rax, rcx
lea rdi, [rax + 0x3b9aca00]
cmp rax, r13
jl 0x1400011b0
mov rdi, r12
nop dword [rax + rax]
call qword [sym.imp.MSVCP140.dll__Query_perf_frequency]
mov rbx, rax
call qword [sym.imp.MSVCP140.dll__Query_perf_counter]
cmp rbx, 0x989680
jne 0x1400011ce
imul rbx, rax, 0x64
jmp 0x1400011ef
cqo
idiv rbx
mov rcx, rax
imul rax, rdx, 0x3b9aca00
cqo
idiv rbx
mov rbx, rax
imul rax, rcx, 0x3b9aca00
add rbx, rax
cmp rbx, rdi
jge 0x140001266
call qword [sym.imp.MSVCP140.dll__Xtime_get_ticks]
imul rcx, rax, 0x64
xorps xmm0, xmm0
mov rax, rdi
sub rax, rbx
lea r8, [rcx + r14]
cvtsi2sd xmm0, rax
comisd xmm0, xmm6
seta r9b
test r9b, r9b
jne 0x140001221
lea r8, [rcx + rax]
add rax, rcx
lea rdx, [rcx + r14]
test r9b, r9b
lea rcx, [rsp + 0x20]
cmove rdx, rax
mov rax, r15
imul rdx
sar rdx, 0x1a
mov rax, rdx
shr rax, 0x3f
add rdx, rax
imul eax, edx, 0x3b9aca00
mov qword [rsp + 0x20], rdx
sub r8d, eax
mov dword [rsp + 0x28], r8d
call qword [sym.imp.MSVCP140.dll__Thrd_sleep]
jmp 0x1400011b0
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, 0x2710
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x140001160
movaps xmm6, xmmword [rsp + 0x40]
mov r15, qword [rsp + 0x50]
mov r14, qword [rsp + 0x58]
mov r13, qword [rsp + 0x60]
mov r12, qword [rsp + 0x68]
mov rdi, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x80]
lea rcx, str.shutdown__a
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov rcx, qword [sym.imp.MSVCP140.dll_class_std::basic_ostream_char__struct_std::char_traits_char___std::cout]
lea rdx, str.Main_program_has_terminated._Shutting_down...
call fcn.140001320
mov rcx, rax
lea rdx, [0x1400014f0]
call qword [sym.imp.MSVCP140.dll_public:_class_std::basic_ostream_char__struct_std::char_traits_char______ptr64___cdecl_std::basic_ostream_char__struct_std::char_traits_char__::operator___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64____cdecl___class_std::basic_ostream_char__struct_std::char_traits_char______ptr64_____ptr64]
lea rcx, str.shutdown__s__f__t_0
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll_system]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
mov rbp, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x30]
xor rcx, rsp
call fcn.1400015b0
add rsp, 0x70
pop rsi
ret