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

Disassembly:
sub rsp, 0x58
test r8, r8
mov qword [rsp + 0x70], rbx
mov rax, r8
mov rbx, rdx
je 0x40181c
mov rdx, rcx
mov r8d, 5
mov rcx, rax
mov qword [rsp + 0x78], rdi
call qword [sym.imp.ADVAPI32.dll_OpenServiceA]
test rax, rax
mov rdi, rax
je 0x401807
lea rcx, str._n_s_IS_installed._n
mov rdx, rbx
call qword [sym.imp.MSVCR80.dll_printf]
lea rdx, [rsp + 0x28]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x401692
lea rcx, str.__Status__:
call qword [sym.imp.MSVCR80.dll_printf]
mov r11d, dword [rsp + 0x2c]
sub r11d, 1
je 0x401683
sub r11d, 1
je 0x401674
sub r11d, 1
je 0x401665
cmp r11d, 1
je 0x401656
lea rcx, str.unknown_state_n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x4016a9
lea rcx, str.running_n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x4016a9
lea rcx, str.stopping_n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x4016a9
lea rcx, str.starting_n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x4016a9
lea rcx, str.stopped_n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x4016a9
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, [0x0040eaa8]
xor r8d, r8d
mov ecx, eax
call fcn.00401260
lea r9, [rsp + 0x20]
xor r8d, r8d
xor edx, edx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
mov edx, dword [rsp + 0x20]
mov rcx, qword [0x00413238]
call fcn.004079a0
test rax, rax
mov rbx, rax
je 0x4017c7
mov r8d, dword [rsp + 0x20]
lea r9, [rsp + 0x20]
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x4017c7
mov rcx, qword [rbx + 0x10]
mov rdx, rcx
call qword [sym.imp.USER32.dll_CharToOemA]
mov rcx, qword [rbx + 0x30]
mov rdx, rcx
call qword [sym.imp.USER32.dll_CharToOemA]
mov rdx, qword [rbx + 0x10]
lea rcx, str.__Path____:__s_n
call qword [sym.imp.MSVCR80.dll_printf]
lea rcx, str.__Startup_:
call qword [sym.imp.MSVCR80.dll_printf]
mov r11d, dword [rbx + 4]
sub r11d, 2
je 0x401771
sub r11d, 1
je 0x401762
cmp r11d, 1
je 0x401753
lea rcx, str.invalid_setting_n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x40177e
lea rcx, str.disabled_n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x40177e
lea rcx, str.manual_n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x40177e
lea rcx, str.automatic_n
call qword [sym.imp.MSVCR80.dll_printf]
mov rdx, qword [rbx + 0x30]
test rdx, rdx
jne 0x401796
lea rcx, str.__Run_as__:_LocalSystem
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x4017a3
lea rcx, str.__Run_as__:__s
call qword [sym.imp.MSVCR80.dll_printf]
bt dword [rbx], 8
jae 0x4017b8
lea rcx, str.__Interactive__n
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x4017de
lea rcx, [0x0040ea0c]
call qword [sym.imp.MSVCR80.dll_printf]
jmp 0x4017de
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rdx, str.QueryServiceConfig
xor r8d, r8d
mov ecx, eax
call fcn.00401260
test rbx, rbx
je 0x4017ef
mov rcx, qword [rbx - 8]
mov rdx, rbx
call fcn.004083a0
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rdi, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
add rsp, 0x58
ret
lea rcx, str._n_s_is_NOT_installed._n
mov rdx, rbx
call qword [sym.imp.MSVCR80.dll_printf]
mov rdi, qword [rsp + 0x78]
mov rbx, qword [rsp + 0x70]
add rsp, 0x58
ret