Function at 0x140011230
Capabilities:
Query service status
Start service

Disassembly:
push rbp
push rsi
push rdi
sub rsp, 0x570
mov rax, qword [0x14008b5a0]
xor rax, rsp
mov qword [rsp + 0x560], rax
xor esi, esi
mov byte [rsp + 0x41], dl
movzx r8d, dl
mov rdx, rcx
mov rbp, rcx
mov qword [rsp + 0x78], rcx
xor al, al
lea rcx, str.StartService:__S__enableservice_u__n
mov qword [rsp + 0x68], rsi
mov rdi, rsi
mov dword [rsp + 0x4c], esi
mov byte [rsp + 0x40], al
call fcn.1400154e0
xor ecx, ecx
call fcn.14003c8b0
mov rcx, rbp
mov dword [rsp + 0x58], eax
call fcn.14003b770
xor edx, edx
mov rcx, rbp
mov byte [rsp + 0x48], al
call fcn.140024b70
mov rcx, rbp
call fcn.14003b6e0
test rax, rax
mov qword [rsp + 0x50], rax
jne 0x1400112c6
lea rcx, str.StartService:_Could_not_open_service_registry_key_n
call fcn.1400154e0
xor al, al
jmp 0x1400117a6
mov qword [rsp + 0x30], rsi
lea rcx, str..WGUARDNT
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x40000000
mov qword [rsp + 0x5a0], rbx
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rbx, rax
jne 0x14001133f
mov qword [rsp + 0x30], rsi
lea rcx, str..GlobalWGUARDNT
xor r9d, r9d
xor r8d, r8d
mov edx, 0x80000000
mov dword [rsp + 0x28], 0x40000000
mov dword [rsp + 0x20], 3
call qword [sym.imp.KERNEL32.dll_CreateFileW]
cmp rax, 0xffffffffffffffff
mov rbx, rax
jne 0x14001133f
mov rbx, rsi
jmp 0x140011376
test rbx, rbx
je 0x140011376
cmp rbx, 0xffffffffffffffff
je 0x140011376
mov qword [rsp + 0x38], rsi
lea rax, [rsp + 0x44]
xor r9d, r9d
mov qword [rsp + 0x30], rax
xor r8d, r8d
mov edx, 0x9edb6510
mov rcx, rbx
mov dword [rsp + 0x28], esi
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_DeviceIoControl]
mov rcx, qword [rsp + 0x50]
lea r8, [rsp + 0x4c]
lea rdx, str.Start
call fcn.14003b440
test al, al
je 0x140011416
mov edx, dword [rsp + 0x4c]
lea rcx, str.StartService:_read_Start_u_from_service__S_registry_n
mov r8, rbp
call fcn.1400154e0
cmp byte [rsp + 0x41], sil
je 0x140011416
mov rcx, qword [rsp + 0x50]
lea r8, [rsp + 0x44]
lea rdx, str.upgradetmp.Start
mov dword [rsp + 0x44], 4
call fcn.14003b440
test al, al
je 0x140011416
mov edx, dword [rsp + 0x44]
lea rcx, str.StartService:_read_upgradtmp.Start_u_from_service__S_registry_n
mov r8, rbp
call fcn.1400154e0
cmp dword [rsp + 0x4c], 4
jne 0x140011405
mov edx, dword [rsp + 0x44]
cmp edx, 4
je 0x140011405
mov rcx, rbp
call fcn.1400084f0
mov r11d, dword [rsp + 0x44]
mov dword [rsp + 0x4c], r11d
mov rcx, qword [rsp + 0x50]
lea rdx, str.upgradetmp.Start
call fcn.140039810
test rbx, rbx
je 0x14001142a
cmp rbx, 0xffffffffffffffff
je 0x14001142a
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x14008ccea], sil
je 0x140011442
lea rcx, str._donotstartservices_is_set._Service__S_will_not_be_started_n
mov rdx, rbp
call fcn.1400154e0
mov rbx, qword [rsp + 0x50]
lea r8, [rsp + 0x42]
lea rdx, str.DeleteFlag
mov rcx, rbx
mov byte [rsp + 0x42], sil
call fcn.14003b490
cmp byte [rsp + 0x42], sil
je 0x14001147e
lea rcx, str.StartService:_DeleteFlag_is_set._Service__S_will_not_be_started_n
mov rdx, rbp
call fcn.1400154e0
mov sil, 1
jmp 0x140011745
xor edx, edx
xor ecx, ecx
mov r8d, 0xa0000000
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
mov qword [rsp + 0x68], rax
jne 0x1400114b1
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.StartService:_Unable_to_open_SCM___d__n
mov edx, eax
call fcn.1400154e0
jmp 0x140011745
mov r8d, 0x1c
mov rdx, rbp
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
test rax, rax
mov rdi, rax
mov qword [rsp + 0x70], rax
jne 0x1400114f8
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x424
je 0x1400114f0
lea rcx, str.StartService:_Unable_to_open_service_via_SCM___d__n
mov edx, eax
call fcn.1400154e0
jmp 0x140011745
mov sil, 1
jmp 0x140011745
cmp byte [0x14008ccea], sil
jne 0x1400116b5
cmp dword [rsp + 0x4c], 4
je 0x14001154b
xor r8d, r8d
xor edx, edx
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x14001154b
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x140011544
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.Start_service_failed__x_n
mov edx, eax
call fcn.1400154e0
jmp 0x1400116b5
mov byte [rsp + 0x40], 1
jmp 0x140011550
mov byte [rsp + 0x40], 1
cmp byte [0x14008ccea], sil
jne 0x1400116b5
nop
lea rdx, [rsp + 0x80]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x1400115e2
mov r8d, dword [rsp + 0x84]
mov eax, r8d
sub eax, 1
je 0x1400115cd
sub eax, 3
je 0x1400115bc
cmp eax, 3
je 0x1400115ab
lea rcx, str.waiting_on__S_service_to_report_RUNNING_or_STOPPED__current_state__x__n
mov rdx, rbp
call fcn.1400154e0
mov ecx, 0x64
call qword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x140011560
lea rcx, str._S_service_reports_PAUSED_n
mov rdx, rbp
call fcn.1400154e0
jmp 0x1400115e2
lea rcx, str._S_service_reports_RUNNING_n
mov rdx, rbp
call fcn.1400154e0
jmp 0x1400115e2
lea rcx, str._S_service_reports_STOPPED_n
mov rdx, rbp
call fcn.1400154e0
xor al, al
mov byte [rsp + 0x40], al
cmp byte [0x14008ccea], sil
jne 0x1400116b5
cmp dword [rsp + 0x4c], 4
je 0x1400116b5
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0xa0]
lea r8, [rsp + 0x300]
mov r9d, 0x12c
xor edx, edx
mov qword [rsp + 0x28], 0x12c
mov qword [rsp + 0x20], rax
mov ebx, esi
call fcn.140039a20
test al, al
je 0x1400116b5
mov rdi, qword [rsp + 0x50]
nop
nop
lea rdx, str.ServicePostStartCommand.
lea rcx, [rsp + 0x300]
add ebx, 1
call fcn.1400384b0
test eax, eax
jne 0x14001167e
lea rdx, [rsp + 0xa0]
lea rcx, str.Running_post_start_command__S_n
call fcn.1400154e0
lea rcx, [rsp + 0xa0]
mov dl, 1
call fcn.1400083e0
lea rax, [rsp + 0xa0]
lea r8, [rsp + 0x300]
mov r9d, 0x12c
mov edx, ebx
mov rcx, rdi
mov qword [rsp + 0x28], 0x12c
mov qword [rsp + 0x20], rax
call fcn.140039a20
test al, al
jne 0x140011640
mov rdi, qword [rsp + 0x70]
mov ecx, 0x200
mov dword [rsp + 0x44], esi
call fcn.14004c8b0
lea rcx, str.Attempting_to_start_dependent_services_n
mov rbx, rax
mov qword [rsp + 0x60], rax
call fcn.1400154e0
test rbx, rbx
jne 0x1400116f4
lea rcx, str.alloc_failed_n
call fcn.1400154e0
mov rbx, qword [rsp + 0x50]
movzx esi, byte [rsp + 0x40]
jmp 0x140011745
lea r9, [rsp + 0x44]
lea rdx, [rsp + 0x60]
mov r8d, 0x200
mov rcx, rbp
call fcn.14000f540
test al, al
jne 0x1400117c1
lea rcx, str.StartService:_failed_to_fully_enumerate_dependent_services_n
call fcn.1400154e0
lea rcx, str.No_dependent_services_found_n
call fcn.1400154e0
mov rcx, qword [rsp + 0x60]
call fcn.14004ca6c
mov rdi, qword [rsp + 0x70]
mov rbx, qword [rsp + 0x50]
mov sil, byte [rsp + 0x40]
mov ecx, dword [rsp + 0x58]
call fcn.14003c8b0
movzx eax, byte [rsp + 0x48]
test al, al
je 0x140011762
movzx edx, al
mov rcx, rbp
call fcn.140024b70
mov rcx, rbx
call fcn.140039380
test rdi, rdi
mov rbx, qword [rsp + 0x5a0]
je 0x140011780
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rax, qword [rsp + 0x68]
test rax, rax
je 0x140011793
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp byte [0x14008ccea], 0
movzx eax, sil
mov ecx, 1
cmovne eax, ecx
mov rcx, qword [rsp + 0x560]
xor rcx, rsp
call fcn.14004c890
add rsp, 0x570
pop rdi
pop rsi
pop rbp
ret
mov edi, dword [rsp + 0x44]
test edi, edi
je 0x140011720
mov rbx, qword [rsp + 0x60]
lea rcx, str.StartService:_found__d_dependent_services_n
mov edx, edi
call fcn.1400154e0
movzx ebp, byte [rsp + 0x41]
nop
nop
nop
lea rcx, str.Attempting_to_start_dependent_service__S_n
mov rdx, rbx
call fcn.1400154e0
movzx edx, bpl
mov rcx, rbx
call fcn.140011230
test al, al
jne 0x14001181e
lea rcx, str.Could_not_start_dependent_service__S_n
mov rdx, rbx
call fcn.1400154e0
mov rcx, rbx
call fcn.140036f80
add rsi, 1
cmp rsi, rdi
lea rbx, [rbx + rax*2 + 2]
jb 0x1400117f0
mov rbp, qword [rsp + 0x78]
jmp 0x14001172c