Function at 0x404e40
Capabilities:
Terminate process

Disassembly:
sub esp, 0x40c
push ebx
push ebp
push esi
push edi
push 0x1388
push 0
push 2
mov dword [esp + 0x20], 0xff676980
mov dword [esp + 0x24], 0xffffffff
call fcn.00402ac0
add esp, 0xc
test eax, eax
je 0x405119
push 0
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
test eax, eax
mov dword [0x4139dc], eax
je 0x405119
push 0x1388
push 0
push 2
call fcn.00402ac0
add esp, 0xc
test eax, eax
je 0x405119
call fcn.00403bf0
push 0x1388
push 0
push 4
call fcn.00402ac0
add esp, 0xc
test eax, eax
je 0x405119
mov eax, dword [0x413ed4]
xor ecx, ecx
test eax, eax
je 0x404ed7
mov eax, dword [eax]
inc ecx
test eax, eax
jne 0x404ed0
lea eax, [ecx*4 + 8]
push eax
call fcn.00405b95
mov ecx, dword [0x4139dc]
mov ebp, eax
mov dword [ebp], ecx
mov eax, dword [0x413ed4]
add esp, 4
test eax, eax
mov ebx, 1
je 0x404f0e
mov edx, dword [eax + 4]
mov dword [ebp + ebx*4], edx
mov eax, dword [eax]
inc ebx
test eax, eax
jne 0x404f00
mov dword [ebp + ebx*4], 0
push str.Waiting_for_service_processes_to_terminate...
call fcn.004020a0
add esp, 4
push 0xffffffffffffffff
push 0
push ebp
push ebx
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
mov edi, eax
test edi, edi
je 0x4050c5
mov esi, dword [0x413ed4]
test esi, esi
je 0x404f4e
cmp edi, 1
jbe 0x404f4e
mov esi, dword [esi]
test esi, esi
jne 0x404f43
mov eax, dword [esi + 0xc]
push eax
call fcn.00404af0
mov ecx, dword [esi + 0xc]
add esp, 4
test eax, eax
je 0x4050f3
push ecx
call fcn.00404ca0
xor ecx, ecx
add esp, 4
cmp eax, ecx
mov dword [esi + 0x14], eax
jne 0x405033
mov eax, dword [esi + 0x18]
cmp eax, ecx
je 0x404f96
mov edx, dword [esi + 0x20]
mov ecx, dword [esi + 0xc]
push edx
dec eax
push ecx
push eax
mov dword [esi + 0x18], eax
push str.Waiting_for__u_seconds_for__u:_s_to_restart...
jmp 0x404fe3
cmp dword [esi + 0x1c], ecx
mov edx, dword [esi + 0xc]
je 0x404fc6
mov ecx, dword [esi + 0x20]
push ecx
push edx
push str.Warning:_Timeout_for_restart_of__u:_s.
lea eax, [esp + 0x28]
push 0x400
push eax
call fcn.004021b0
lea ecx, [esp + 0x30]
push ecx
call fcn.004020a0
add esp, 0x18
jmp 0x404fff
push edx
mov dword [esi + 0x1c], 1
call fcn.00404b80
mov ecx, dword [esi + 0xc]
mov dword [esi + 0x18], eax
mov eax, dword [esi + 0x20]
push eax
push ecx
push str.Process__u:_s_is_restarting...
lea edx, [esp + 0x2c]
push 0x400
push edx
call fcn.004021b0
lea eax, [esp + 0x34]
push eax
call fcn.004020a0
add esp, 0x1c
mov ecx, dword [ebp + edi*4]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 1
push 0
call dword [sym.imp.KERNEL32.dll_CreateWaitableTimerA]
push 0
push 0
push 0
push 0
lea edx, [esp + 0x24]
push edx
push eax
mov dword [ebp + edi*4], eax
call dword [sym.imp.KERNEL32.dll_SetWaitableTimer]
jmp 0x404f16
mov dword [esi + 0x18], ecx
mov dword [esi + 0x1c], ecx
mov eax, dword [ebp + edi*4]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esi + 0x14]
push ecx
push 0
push 0x100000
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
mov dword [esi + 4], eax
lea ecx, [esp + 0x1c]
je 0x4050d4
mov dword [ebp + edi*4], eax
mov eax, dword [esi + 0x20]
mov edx, dword [esi + 0x14]
push eax
push edx
push eax
mov eax, dword [esi + 0xc]
push eax
push str.Process__u:_s_is_now__u:_s.
push 0x400
push ecx
call fcn.004021b0
lea edx, [esp + 0x38]
push edx
call fcn.004020a0
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x20]
push ecx
mov edx, eax
push edx
push str.Process__u:_s_has_completed_its_restart.
mov dword [esi + 0xc], eax
lea eax, [esp + 0x48]
push 0x400
push eax
mov dword [esi + 0x14], 0
call fcn.004021b0
lea ecx, [esp + 0x50]
push ecx
call fcn.004020a0
add esp, 0x38
jmp 0x404f16
push str.Service_STOP_event_encountered.
call fcn.004020a0
add esp, 4
jmp 0x405119
mov edx, dword [esi + 0x20]
mov eax, dword [esi + 0x14]
push edx
push eax
push 0x4127b4
push 0x400
push ecx
call fcn.004021b0
lea edx, [esp + 0x30]
push edx
jmp 0x405111
mov eax, dword [esi + 0x20]
push eax
push ecx
push str.Process__u:_s_has_terminated.
lea edx, [esp + 0x28]
push 0x400
push edx
call fcn.004021b0
lea eax, [esp + 0x30]
push eax
call fcn.004020a0
add esp, 0x18
mov esi, dword [0x413ed4]
test esi, esi
je 0x405458
mov ebp, dword [sym.imp.KERNEL32.dll_TerminateProcess]
lea ecx, [ecx]
cmp esi, dword [0x413ed4]
jne 0x405145
push str.Terminating_processes__if_FailStrategy_requires_it...
call fcn.004020a0
add esp, 4
mov ecx, dword [esi + 0x30]
push ecx
push str.FailStrategy_is__d.
lea edx, [esp + 0x24]
push 0x3e8
push edx
call fcn.004021b0
lea eax, [esp + 0x2c]
push eax
call fcn.004020a0
mov ecx, dword [esi + 4]
mov ebx, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esp, 0x14
push ecx
call ebx
mov edx, dword [esi + 0xc]
push edx
push 0
push 0x100401
call dword [sym.imp.KERNEL32.dll_OpenProcess]
test eax, eax
mov dword [esi + 4], eax
jne 0x4051b7
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0xc]
push eax
push ecx
push str.Error_opening_process__u:_s.
lea edx, [esp + 0x28]
push 0x400
push edx
call fcn.004021b0
lea eax, [esp + 0x30]
push eax
call fcn.004020a0
add esp, 0x18
mov edx, dword [esi + 4]
lea ecx, [esp + 0x10]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
cmp dword [esp + 0x10], 0x103
jne 0x40540d
mov eax, dword [esi + 0x30]
cmp eax, 5
ja case.0x4051e0.1
jmp dword [eax*4 + 0x4054b8]
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0xc]
push eax
push ecx
push 0x4128b0
lea edx, [esp + 0x28]
push 0x3e8
push edx
call fcn.004021b0
lea eax, [esp + 0x30]
push eax
call fcn.004020a0
mov ecx, dword [esi + 4]
add esp, 0x18
push 0x42b
push ecx
call ebp
test eax, eax
je 0x405231
mov edx, dword [esi + 0x20]
mov eax, dword [esi + 0xc]
push edx
push eax
push 0x4128d0
jmp 0x4053e8
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0xc]
push eax
push ecx
push str.Error_terminating_process__u:_s.
jmp 0x40541a
mov ecx, dword [esi + 0x20]
push ecx
push str.Process__u:_s_does_not_require_termination__FailStrategy__2_._n
lea edx, [esp + 0x24]
push 0x3e8
push edx
call fcn.004021b0
lea eax, [esp + 0x2c]
push eax
call fcn.004020a0
add esp, 0x14
jmp 0x405436
mov ecx, dword [esi + 0xc]
push ecx
call fcn.00401030
mov edx, dword [esi + 0x20]
add esp, 4
mov edi, eax
cmp edi, 0xffffffff
mov eax, dword [esi + 0xc]
push edx
lea ecx, [esp + 0x20]
push eax
je 0x405389
push str.Sending_WM_QUIT_to_process__u:_s..._n
push 0x3e8
push ecx
call fcn.004021b0
lea edx, [esp + 0x30]
push edx
call fcn.004020a0
add esp, 0x18
push 0
push 0
push 0x12
push edi
call dword [sym.imp.USER32.dll_PostMessageA]
cmp dword [esi + 0x30], 5
jne 0x405379
mov eax, dword [esi + 0xc]
push eax
call fcn.00404c10
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0xc]
push ecx
push edx
mov edi, eax
push edi
push str.Waiting_up_to__d_seconds_for_process__u:_s_to_close.
lea eax, [esp + 0x30]
push 0x3e8
push eax
call fcn.004021b0
lea ecx, [esp + 0x38]
push ecx
call fcn.004020a0
lea edx, [edi + 0x2710]
push edx
push 0
push 3
call fcn.00402ac0
imul edi, edi, 0x3e8
add esp, 0x2c
mov byte [esp + 0x1c], 0
mov eax, dword [esi + 4]
push edi
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
test eax, eax
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0xc]
push ecx
push edx
je 0x405350
cmp eax, 0x102
je 0x405349
cmp eax, 0xffffffff
lea eax, [esp + 0x24]
je 0x405342
push str.Unknown_error_while_waiting_for_process__u:_s_to_close.
jmp 0x405359
push str.Error_waiting_for_process__u:_s.
jmp 0x405359
push str.Process__u:_s_has_exceeded_its_shutdown_time.
jmp 0x405355
push str.Process__u:_s_has_closed.
lea eax, [esp + 0x28]
push 0x3e8
push eax
call fcn.004021b0
lea ecx, [esp + 0x30]
add esp, 0x14
push ecx
call fcn.004020a0
add esp, 4
jmp 0x405436
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x405436
push str.Process__u:_s_does_not_seem_to_have_a_valid_window.
push 0x3e8
push ecx
call fcn.004021b0
lea edx, [esp + 0x30]
push edx
call fcn.004020a0
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0xc]
push eax
push ecx
push str.Terminating_process__u:_s...
lea edx, [esp + 0x40]
push 0x3e8
push edx
call fcn.004021b0
lea eax, [esp + 0x48]
push eax
call fcn.004020a0
mov ecx, dword [esi + 4]
add esp, 0x30
push 0x42b
push ecx
call ebp
test eax, eax
je 0x405436
mov edx, dword [esi + 0x20]
mov eax, dword [esi + 0xc]
push edx
push eax
push str.Process__u:_s_terminated.
lea ecx, [esp + 0x28]
push 0x3e8
push ecx
call fcn.004021b0
lea edx, [esp + 0x30]
push edx
jmp 0x40542e
push str.Unknown_FailStrategy.
call fcn.004020a0
add esp, 4
jmp 0x405436
mov eax, dword [esi + 0x20]
mov ecx, dword [esi + 0xc]
push eax
push ecx
push str.Process__u:_s_already_terminated.
lea edx, [esp + 0x28]
push 0x3e8
push edx
call fcn.004021b0
lea eax, [esp + 0x30]
push eax
call fcn.004020a0
add esp, 0x18
mov ecx, dword [esi + 4]
push ecx
call ebx
mov edx, dword [esi + 8]
push edx
call ebx
mov eax, dword [esi + 0xc]
push eax
call fcn.00404a80
mov esi, dword [esi]
add esp, 4
test esi, esi
jne 0x405130
push 0x1388
push 0
push 3
call fcn.00402ac0
push str.Service_stopped.
call fcn.004020a0
push 0x4139fe
call fcn.004020a0
add esp, 0x14
push 0xc8
call dword [sym.imp.KERNEL32.dll_Sleep]
mov eax, dword [0x4139dc]
test eax, eax
pop edi
pop esi
pop ebp
pop ebx
je 0x40549c
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x3e8
push 0
push 1
call fcn.00402ac0
add esp, 0xc
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]