Function at 0x140005f80
Capabilities:
Create service
Modify service

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x48]
sub rsp, 0x110
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x140109328]
xor rax, rsp
mov qword [rbp + 8], rax
mov rsi, rdx
mov r14, rcx
lea r15, [0x140106190]
mov rcx, qword [0x140106190]
cmp rcx, r15
je 0x140005ff0
test byte [rcx + 0x1c], 1
je 0x140005ff0
cmp byte [rcx + 0x19], 5
jb 0x140005ff0
mov edx, 0x1d
mov r9, rsi
lea r8, [0x1400dc2f8]
mov rcx, qword [rcx + 0x10]
call fcn.140003598
xor r13d, r13d
mov edi, r13d
mov rax, qword [0x140108fd0]
lea rcx, [0x140108fd0]
mov rax, qword [rax + 0x18]
call qword [case.0x14006e230.0]
add rax, 0x18
mov qword [rsp + 0x78], rax
mov rax, qword [0x140108fd0]
lea rcx, [0x140108fd0]
mov rax, qword [rax + 0x18]
call qword [case.0x14006e230.0]
add rax, 0x18
mov qword [rsp + 0x70], rax
mov qword [rbp - 0x58], r13
mov qword [rbp - 0x50], r13
mov qword [rbp - 0x48], r13
lea rdx, str.SYSTEMCurrentControlSetServices_
lea rcx, [rbp - 0x78]
call fcn.140004b74
nop
mov rdx, qword [r14 + 0x28]
mov r8d, dword [rdx - 0x10]
lea rcx, [rbp - 0x78]
call fcn.140004588
mov ebx, dword [r14 + 0x30]
mov ecx, ebx
call fcn.1400048f4
test rax, rax
je 0x14000608a
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140004a2c
test eax, eax
jne 0x1400060a1
mov r8d, reloc.OLEAUT32.dll_SafeArrayDestroy
lea rdx, str.UNKNOWN_SERVICE
lea rcx, [rsp + 0x78]
call fcn.140004f58
mov ebx, dword [r14 + 0x34]
mov ecx, ebx
call fcn.1400048f4
test rax, rax
je 0x1400060c5
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140004a2c
test eax, eax
jne 0x1400060cf
lea rcx, [rsp + 0x70]
call fcn.140004d3c
mov rcx, r14
call fcn.140005dcc
mov ebx, 2
test eax, eax
jne 0x1400064be
mov edi, 0xf003f
mov r8d, edi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r12, rax
test rax, rax
jne 0x14000614b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x140106190]
cmp rcx, r15
je 0x140006132
test byte [rcx + 0x1c], bl
je 0x140006132
cmp byte [rcx + 0x19], bl
jb 0x140006132
lea edx, [rbx + 0x1c]
mov r9d, eax
lea r8, [0x1400dc2f8]
mov rcx, qword [rcx + 0x10]
call fcn.140003634
cmp edi, 5
jne 0x140006141
mov esi, 0xc00d37dc
jmp 0x140006566
mov esi, 0xc00d37dd
jmp 0x1400064c3
lea rax, [0x1400db5a8]
mov qword [rsp + 0x60], rax
lea rax, str.NT_AUTHORITYNetworkService
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r13
mov rax, qword [0x14010a730]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], reloc.OLEAUT32.dll_SafeArrayGetDim
mov r9d, 0xf01ff
mov r8, qword [rsp + 0x78]
mov rdx, qword [r14 + 0x28]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov r15, rax
test rax, rax
jne 0x14000620b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x140106190]
lea r15, [0x140106190]
cmp rcx, r15
je 0x1400061f8
test byte [rcx + 0x1c], bl
je 0x1400061f8
cmp byte [rcx + 0x19], bl
jb 0x1400061f8
mov edx, 0x1f
mov dword [rsp + 0x20], eax
mov r9, qword [r14 + 0x28]
lea r8, [0x1400dc2f8]
mov rcx, qword [rcx + 0x10]
call fcn.14000541c
mov esi, 0xc00d37de
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x1400064c3
mov qword [rbp - 0x70], r13
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
mov r9d, edi
xor r8d, r8d
mov rdx, qword [rbp - 0x78]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
test eax, eax
jne 0x140006240
mov edi, r13d
mov rax, qword [rbp - 0x70]
mov qword [rbp - 0x58], rax
mov esi, 0xc00d37df
mov rax, qword [rsp + 0x70]
cmp dword [rax - 0x10], r13d
je 0x1400062e5
mov qword [rbp - 0x60], rax
mov rcx, qword [0x140106190]
lea rax, [0x140106190]
cmp rcx, rax
je 0x14000628b
test byte [rcx + 0x1c], bl
je 0x14000628b
cmp byte [rcx + 0x19], 4
jb 0x14000628b
mov edx, 0x20
lea r8, [0x1400dc2f8]
mov rcx, qword [rcx + 0x10]
call fcn.140003574
lea r8, [rbp - 0x60]
mov edx, 1
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1400062e5
mov rbx, qword [0x140106190]
lea rax, [0x140106190]
cmp rbx, rax
je 0x1400062ec
test byte [rbx + 0x1c], 2
je 0x1400062ec
cmp byte [rbx + 0x19], 3
jb 0x1400062ec
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x21
lea r8, [0x1400dc2f8]
mov rcx, qword [0x140106190]
mov rcx, qword [rcx + 0x10]
call fcn.140003634
mov rbx, qword [0x140106190]
mov ecx, 1
mov dword [rbp - 0x10], ecx
mov eax, 0x7530
mov dword [rbp - 0xc], eax
mov dword [rbp - 8], ecx
mov qword [rbp - 4], rax
mov dword [rbp + 4], r13d
mov dword [rbp - 0x38], r13d
xor edx, edx
lea r8d, [rcx + 0x1f]
lea rcx, [rbp - 0x30]
call sub.msvcrt.dll_memset
mov dword [rbp - 0x20], 3
lea rax, [rbp - 0x10]
mov qword [rbp - 0x18], rax
lea rax, [0x140106190]
cmp rbx, rax
je 0x140006356
test byte [rbx + 0x1c], 2
je 0x140006356
cmp byte [rbx + 0x19], 4
jb 0x140006356
mov edx, 0x22
lea r8, [0x1400dc2f8]
mov rcx, qword [rbx + 0x10]
call fcn.140003574
lea r8, [rbp - 0x38]
mov ebx, 2
mov edx, ebx
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1400063af
mov rax, qword [0x140106190]
lea rcx, [0x140106190]
cmp rax, rcx
je 0x1400063af
test byte [rax + 0x1c], bl
je 0x1400063af
cmp byte [rax + 0x19], 3
jb 0x1400063af
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
lea edx, [rbx + 0x21]
lea r8, [0x1400dc2f8]
mov rcx, qword [0x140106190]
mov rcx, qword [rcx + 0x10]
call fcn.140003634
mov byte [rsp + 0x20], r13b
mov r9d, 0x2019d
mov r8d, ebx
lea rdx, str.S_1_5_4
mov rcx, r15
call fcn.1400b2d8c
test eax, eax
jne 0x140006403
mov rcx, qword [0x140106190]
lea rax, [0x140106190]
cmp rcx, rax
je 0x140006411
test byte [rcx + 0x1c], bl
je 0x140006411
cmp byte [rcx + 0x19], 3
jb 0x140006411
mov edx, 0x24
lea r8, [0x1400dc2f8]
mov rcx, qword [rcx + 0x10]
call fcn.140003574
lea rax, [0x140106190]
mov rcx, qword [0x140106190]
mov dword [rbp - 0x80], 1
cmp rcx, rax
je 0x14000643d
test byte [rcx + 0x1c], bl
je 0x14000643d
cmp byte [rcx + 0x19], 4
jb 0x14000643d
mov edx, 0x25
lea r8, [0x1400dc2f8]
mov rcx, qword [rcx + 0x10]
call fcn.140003574
lea r8, [rbp - 0x80]
mov edx, 5
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x140006496
mov rax, qword [0x140106190]
lea rcx, [0x140106190]
cmp rax, rcx
je 0x140006496
test byte [rax + 0x1c], bl
je 0x140006496
cmp byte [rax + 0x19], 3
jb 0x140006496
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x26
lea r8, [0x1400dc2f8]
mov rcx, qword [0x140106190]
mov rcx, qword [rcx + 0x10]
call fcn.140003634
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
lea r15, [0x140106190]
test edi, edi
jne 0x140006566
mov esi, 0x400d3778
jmp 0x1400064c3
mov esi, 0x400d3779
test edi, edi
jne 0x140006566
lea edx, [rdi + 4]
mov qword [rsp + 0x28], r13
mov qword [rsp + 0x20], r13
mov r9, qword [r14 + 0x28]
mov r8d, esi
mov rcx, r14
call fcn.140005c28
xor r8d, r8d
mov edx, esi
call fcn.1400153c8
cmp esi, 0x400d3779
jne 0x14000653a
mov r10, qword [0x140106190]
cmp r10, r15
je 0x14000665d
test byte [r10 + 0x1c], bl
je 0x140006623
cmp byte [r10 + 0x19], 4
jb 0x140006623
lea edx, [rdi + 0x27]
mov r9, qword [r14 + 0x28]
lea r8, [0x1400dc2f8]
mov rcx, qword [r10 + 0x10]
call fcn.140003598
jmp 0x14000661c
mov r10, qword [0x140106190]
cmp r10, r15
je 0x14000665d
test byte [r10 + 0x1c], bl
je 0x140006623
cmp byte [r10 + 0x19], 4
jb 0x140006623
mov edx, 0x28
jmp 0x140006521
mov rax, qword [0x140108fd0]
lea rcx, [0x140108fd0]
mov rax, qword [rax + 0x18]
call qword [case.0x14006e230.0]
add rax, 0x18
mov qword [rbp - 0x68], rax
mov r8d, edi
lea rdx, [0x1400dc2e0]
lea rcx, [rbp - 0x68]
call fcn.140008d6c
mov edx, 1
mov qword [rsp + 0x28], r13
mov rbx, qword [rbp - 0x68]
mov qword [rsp + 0x20], rbx
mov r9, qword [r14 + 0x28]
mov r8d, esi
mov rcx, r14
call fcn.140005c28
mov r8d, edi
mov edx, esi
call fcn.1400153c8
mov rcx, qword [0x140106190]
cmp rcx, r15
je 0x1400065fb
test byte [rcx + 0x1c], 2
je 0x1400065fb
cmp byte [rcx + 0x19], 2
jb 0x1400065fb
mov edx, 0x29
mov dword [rsp + 0x20], edi
mov r9, qword [r14 + 0x28]
lea r8, [0x1400dc2f8]
mov rcx, qword [rcx + 0x10]
call fcn.14000541c
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14000661c
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14006e230.0]
mov r10, qword [0x140106190]
cmp r10, r15
je 0x14000665d
test byte [r10 + 0x1c], 1
je 0x14000665d
movzx edx, byte [r10 + 0x19]
mov eax, edi
neg eax
sbb ecx, ecx
and ecx, 0xfffffffd
add ecx, 5
cmp edx, ecx
jl 0x14000665d
mov edx, 0x2a
mov r9d, edi
lea r8, [0x1400dc2f8]
mov rcx, qword [r10 + 0x10]
call fcn.140003634
nop
mov rdx, qword [rbp - 0x78]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140006683
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14006e230.0]
nop
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x140006693
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdx, qword [rsp + 0x70]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400066ba
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14006e230.0]
nop
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400066e0
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14006e230.0]
mov eax, edi
mov rcx, qword [rbp + 8]
xor rcx, rsp
call fcn.1400cc650
mov rbx, qword [rsp + 0x160]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret