Function at 0x40e650
Capabilities:
Query service status

Disassembly:
push 0x3c
mov eax, 0x43e1a4
call fcn.0043bc87
mov esi, ecx
xor edi, edi
push 0xf003f
push edi
push edi
mov dword [ebp - 0x10], edi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov dword [ebp - 0x14], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x14], edi
mov ebx, eax
jne 0x40e6f7
lea ecx, [ebp - 0x10]
call fcn.00419470
lea eax, [ebp - 0x20]
push ebx
push eax
mov dword [ebp - 4], edi
call fcn.0041a530
pop ecx
pop ecx
mov ecx, eax
mov byte [ebp - 4], 1
call fcn.004195a0
push eax
push ebx
lea eax, [ebp - 0x10]
push str.Unable_to_open_service_control_manager._System_error:___d___s
push eax
call fcn.0041b950
add esp, 0x10
lea ecx, [ebp - 0x20]
mov byte [ebp - 4], 0
call fcn.00419480
lea ecx, [ebp - 0x10]
call fcn.004195a0
push eax
push 1
push 0x292
push str..NBService.cpp
push 0x4593c0
call fcn.0040e4bd
or dword [ebp - 4], 0xffffffff
add esp, 0x14
lea ecx, [ebp - 0x10]
call fcn.00419480
xor eax, eax
call fcn.0043bd5f
ret
push 5
add esi, 0x30
push esi
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
cmp eax, edi
mov dword [ebp - 0x20], eax
jne 0x40e71a
push dword [ebp - 0x14]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov eax, edi
jmp 0x40e6f1
mov dword [ebp - 0x24], edi
mov edi, 0x1000
push edi
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
test eax, eax
mov dword [ebp - 0x1c], eax
mov ebx, str..NBService.cpp
mov esi, 0x4593c0
je 0x40e760
lea ecx, [ebp - 0x24]
push ecx
push edi
push eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_QueryServiceConfigW]
test eax, eax
je 0x40e760
mov ecx, dword [ebp - 0x1c]
xor eax, eax
cmp dword [ecx + 4], 4
setne al
mov dword [ebp - 0x10], eax
jmp 0x40e7d3
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x18]
mov edi, eax
call fcn.00419470
lea eax, [ebp - 0x28]
push edi
push eax
mov dword [ebp - 4], 2
call fcn.0041a530
pop ecx
pop ecx
mov ecx, eax
mov byte [ebp - 4], 3
call fcn.004195a0
push eax
push edi
lea eax, [ebp - 0x18]
push str.Unable_to_get_service_configuration_parameters._System_error:___d___s
push eax
call fcn.0041b950
add esp, 0x10
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 2
call fcn.00419480
lea ecx, [ebp - 0x18]
call fcn.004195a0
push eax
push 1
push 0x2a9
push ebx
push esi
call fcn.0040e4bd
or dword [ebp - 4], 0xffffffff
add esp, 0x14
lea ecx, [ebp - 0x18]
call fcn.00419480
xor edi, edi
cmp dword [ebp - 0x1c], edi
je 0x40e7e3
push dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp - 0x10], edi
je 0x40e894
push 6
mov dword [ebp - 0x48], edi
pop ecx
xor eax, eax
lea edi, [ebp - 0x44]
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x48]
push eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
mov dword [ebp - 0x28], eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp dword [ebp - 0x28], 0
mov edi, eax
jne 0x40e888
lea ecx, [ebp - 0x1c]
call fcn.00419470
lea eax, [ebp - 0x2c]
push edi
push eax
mov dword [ebp - 4], 4
call fcn.0041a530
pop ecx
pop ecx
mov ecx, eax
mov byte [ebp - 4], 5
call fcn.004195a0
push eax
push edi
lea eax, [ebp - 0x1c]
push str.Unable_to_get_service_status._System_error:___d___s
push eax
call fcn.0041b950
add esp, 0x10
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 4
call fcn.00419480
lea ecx, [ebp - 0x1c]
call fcn.004195a0
push eax
push 1
push 0x2b7
push ebx
push esi
call fcn.0040e4bd
and dword [ebp - 0x10], 0
or dword [ebp - 4], 0xffffffff
add esp, 0x14
lea ecx, [ebp - 0x1c]
call fcn.00419480
jmp 0x40e894
xor eax, eax
cmp dword [ebp - 0x44], 4
sete al
mov dword [ebp - 0x10], eax
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, dword [ebp - 0x10]
jmp 0x40e70d