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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40c546
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
mov eax, 0x1058
call fcn.004058f0
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.00402821
add esp, 4
mov dword [ebp - 0x1030], eax
cmp dword [ebp - 0x1030], 0
jbe 0x40212b
cmp dword [ebp - 0x1030], 4
je 0x40212b
push str.GetServiceStartRegKey_finds_that_wuauserv_is_enabled
call fcn.004010d2
add esp, 4
mov al, 1
jmp 0x4023c0
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
jne 0x40214a
xor al, al
jmp 0x4023c0
cmp dword [0x4107d0], 3
jne 0x402160
push 0x40f718
call fcn.004010d2
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 0x4021b8
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 0x4021b8
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 0x4021d9
cmp dword [0x4107d0], 3
jne 0x4021d4
push 0x40f738
call fcn.004010d2
add esp, 4
jmp 0x402362
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 0x402212
mov byte [ebp - 0x24], 1
cmp dword [0x4107d0], 3
jne 0x40220d
push str.Service_is_running...
call fcn.004010d2
add esp, 4
jmp 0x402362
cmp dword [0x4107d0], 3
jne 0x402228
push str.Checking_service_startup_status...
call fcn.004010d2
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 0x40225f
mov byte [ebp - 0x1c], 1
jmp 0x4022f3
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x102c], eax
cmp dword [0x4107d0], 3
jne 0x4022a5
mov ecx, dword [ebp - 0x102c]
push ecx
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0x1054], esp
lea edx, [ebp - 0x1058]
push edx
push str.QueryServiceConfig_error__d_n
call fcn.00403450
mov dword [ebp - 0x1064], eax
call fcn.00402e21
add esp, 0x14
cmp dword [ebp - 0x102c], 0x7a
jne 0x4022f3
cmp dword [0x4107d0], 3
jne 0x4022c4
push str.Before_QueryServiceConfig
call fcn.004010d2
add esp, 4
mov eax, dword [ebp - 0x18]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [ebp - 0x28], eax
lea ecx, [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
jne 0x4022ef
jmp 0x4022f3
mov byte [ebp - 0x1c], 1
mov edx, dword [ebp - 0x1c]
and edx, 0xff
test edx, edx
je 0x402353
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax + 4]
mov dword [ebp - 0x1050], ecx
cmp dword [0x4107d0], 3
jne 0x402346
mov edx, dword [ebp - 0x1050]
push edx
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0x105c], esp
lea eax, [ebp - 0x1060]
push eax
push str.Service_auto_start:__d_n
call fcn.00403450
mov dword [ebp - 0x1068], eax
call fcn.00402e21
add esp, 0x14
cmp dword [ebp - 0x1050], 4
je 0x402353
mov byte [ebp - 0x24], 1
jmp 0x40235b
mov dword [ebp - 4], 0
jmp 0x40236a
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 4
cmp dword [ebp - 0x14], 0
je 0x402388
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x402390
mov dword [ebp - 4], 0xffffffff
mov dword [ebp - 4], 6
cmp dword [ebp - 0x20], 0
je 0x4023ae
mov edx, dword [ebp - 0x20]
push edx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x4023b6
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