Function at 0x402641
Capabilities:
Query service configuration
Query service status

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40932e
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x20bc
call fcn.00403780
push ebx
push esi
push edi
mov dword [ebp - 0x10], esp
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x102c], 0
mov byte [ebp - 0x1c], 0
mov byte [ebp - 0x24], 0
push str.wuauserv
call fcn.00402da4
add esp, 4
mov dword [ebp - 0x1030], eax
cmp dword [ebp - 0x1030], 0
jbe 0x4026ca
cmp dword [ebp - 0x1030], 4
je 0x4026ca
push str.GetServiceStartRegKey_finds_that_wuauserv_is_enabled
call fcn.00401000
add esp, 4
mov al, 1
jmp 0x402950
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x4026e9
xor al, al
jmp 0x402950
cmp dword [0x40daf0], 3
jne 0x4026ff
push str.OpenSCManager_is_successfull_
call fcn.00401000
add esp, 4
mov dword [ebp - 4], 0
push 0xf01ff
push str.wuauserv
mov eax, dword [ebp - 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x402757
push 0x40000000
push str.wuauserv
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x402757
push 0x2001c
push str.wuauserv
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x402778
cmp dword [0x40daf0], 3
jne 0x402773
push str.Service_cannot_be_opened_
call fcn.00401000
add esp, 4
jmp 0x4028f2
lea eax, [ebp - 0x104c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
cmp dword [ebp - 0x1048], 4
jne 0x4027b1
mov byte [ebp - 0x24], 1
cmp dword [0x40daf0], 3
jne 0x4027ac
push str.Service_is_running...
call fcn.00401000
add esp, 4
jmp 0x4028f2
cmp dword [0x40daf0], 3
jne 0x4027c7
push str.Checking_service_startup_status...
call fcn.00401000
add esp, 4
mov byte [ebp - 4], 1
lea edx, [ebp - 0x1028]
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x18], 0x1000
lea eax, [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x28]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x4027fe
mov byte [ebp - 0x1c], 1
jmp 0x40288b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x102c], eax
cmp dword [0x40daf0], 3
jne 0x40283d
mov ecx, dword [ebp - 0x102c]
push ecx
push str.QueryServiceConfig_error__d_n
lea edx, [ebp - 0x204c]
push edx
call fcn.0040372b
add esp, 0xc
lea eax, [ebp - 0x204c]
push eax
call fcn.00401000
add esp, 4
cmp dword [ebp - 0x102c], 0x7a
jne 0x40288b
cmp dword [0x40daf0], 3
jne 0x40285c
push str.Before_QueryServiceConfig
call fcn.00401000
add esp, 4
mov ecx, dword [ebp - 0x18]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x28], eax
lea edx, [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x402887
jmp 0x40288b
mov byte [ebp - 0x1c], 1
mov eax, dword [ebp - 0x1c]
and eax, 0xff
test eax, eax
je 0x4028e3
mov ecx, dword [ebp - 0x28]
mov edx, dword [ecx + 4]
mov dword [ebp - 0x2050], edx
cmp dword [0x40daf0], 3
jne 0x4028d6
mov eax, dword [ebp - 0x2050]
push eax
push str.Service_auto_start:__d_n
lea ecx, [ebp - 0x20cc]
push ecx
call fcn.0040372b
add esp, 0xc
lea edx, [ebp - 0x20cc]
push edx
call fcn.00401000
add esp, 4
cmp dword [ebp - 0x2050], 4
je 0x4028e3
mov byte [ebp - 0x24], 1
jmp 0x4028eb
mov dword [ebp - 4], 0
jmp 0x4028fa
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 4
cmp dword [ebp - 0x14], 0
je 0x402918
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402920
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 6
cmp dword [ebp - 0x20], 0
je 0x40293e
mov ecx, dword [ebp - 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402946
mov dword [ebp - 4], 0xffffffff
mov al, byte [ebp - 0x24]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret