Function at 0x140005ea0
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 [0x140109388]
xor rax, rsp
mov qword [rbp + 8], rax
mov rdi, rdx
mov r14, rcx
lea rax, [0x140106190]
mov rcx, qword [0x140106190]
cmp rcx, rax
je 0x140005f10
test byte [rcx + 0x1c], 1
je 0x140005f10
cmp byte [rcx + 0x19], 5
jb 0x140005f10
mov edx, 0x1d
mov r9, rdi
lea r8, [0x1400db968]
mov rcx, qword [rcx + 0x10]
call fcn.140003558
xor r12d, r12d
mov esi, r12d
mov rax, qword [str.Xr_r_]
lea rcx, str.Xr_r_
mov rax, qword [rax + 0x18]
call qword [case.0x14006d218.0]
add rax, 0x18
mov qword [rsp + 0x78], rax
mov rax, qword [str.Xr_r_]
lea rcx, str.Xr_r_
mov rax, qword [rax + 0x18]
call qword [case.0x14006d218.0]
add rax, 0x18
mov qword [rsp + 0x70], rax
mov qword [rbp - 0x58], r12
mov qword [rbp - 0x50], r12
mov qword [rbp - 0x48], r12
lea rdx, str.SYSTEMCurrentControlSetServices_
lea rcx, [rbp - 0x78]
call fcn.140004a80
nop
mov rdx, qword [r14 + 0x28]
mov r8d, dword [rdx - 0x10]
lea rcx, [rbp - 0x78]
call fcn.1400044f8
mov ebx, dword [r14 + 0x30]
mov ecx, ebx
call fcn.14000482c
test rax, rax
je 0x140005faa
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.14000495c
test eax, eax
jne 0x140005fcc
lea rdx, str.UNKNOWN_SERVICE
or rax, 0xffffffffffffffff
inc rax
cmp word [rdx + rax*2], r12w
jne 0x140005fb5
mov r8d, eax
lea rcx, [rsp + 0x78]
call fcn.140004e40
mov ebx, dword [r14 + 0x34]
mov ecx, ebx
call fcn.14000482c
test rax, rax
je 0x140005ff0
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.14000495c
test eax, eax
jne 0x140005ffa
lea rcx, [rsp + 0x70]
call fcn.140004c40
mov rcx, r14
call fcn.140005cf4
mov r13d, 2
test eax, eax
jne 0x14000658f
mov ebx, 0xf003f
mov r8d, ebx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r15, rax
test rax, rax
jne 0x140006235
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x140106190]
lea rbx, [0x140106190]
cmp rcx, rbx
je 0x14000606c
test byte [rcx + 0x1c], r13b
je 0x14000606c
cmp byte [rcx + 0x19], r13b
jb 0x14000606c
lea edx, [r13 + 0x1c]
mov r9d, eax
lea r8, [0x1400db968]
mov rcx, qword [rcx + 0x10]
call fcn.1400035ec
cmp esi, 5
jne 0x14000622b
mov edi, 0xc00d37dc
mov rax, qword [str.Xr_r_]
lea rcx, str.Xr_r_
mov rax, qword [rax + 0x18]
call qword [case.0x14006d218.0]
add rax, 0x18
mov qword [rbp - 0x68], rax
mov r8d, esi
lea rdx, [0x1400db950]
lea rcx, [rbp - 0x68]
call fcn.140008b90
mov edx, 1
mov qword [rsp + 0x28], r12
mov rbx, qword [rbp - 0x68]
mov qword [rsp + 0x20], rbx
mov r9, qword [r14 + 0x28]
mov r8d, edi
mov rcx, r14
call fcn.140005b58
mov r8d, esi
mov edx, edi
call fcn.140014f94
mov rcx, qword [0x140106190]
lea rax, [0x140106190]
cmp rcx, rax
je 0x140006116
test byte [rcx + 0x1c], r13b
je 0x140006116
cmp byte [rcx + 0x19], r13b
jb 0x140006116
mov edx, 0x29
mov dword [rsp + 0x20], esi
mov r9, qword [r14 + 0x28]
lea r8, [0x1400db968]
mov rcx, qword [rcx + 0x10]
call fcn.140005344
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140006137
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14006d218.0]
lea rbx, [0x140106190]
mov r10, qword [0x140106190]
cmp r10, rbx
je 0x14000617f
test byte [r10 + 0x1c], 1
je 0x14000617f
movzx edx, byte [r10 + 0x19]
mov eax, esi
neg eax
sbb ecx, ecx
and ecx, 0xfffffffd
add ecx, 5
cmp edx, ecx
jb 0x14000617f
mov edx, 0x2a
mov r9d, esi
lea r8, [0x1400db968]
mov rcx, qword [r10 + 0x10]
call fcn.1400035ec
nop
mov rdx, qword [rbp - 0x78]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400061a5
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14006d218.0]
nop
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x1400061b5
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 0x1400061dc
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14006d218.0]
nop
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140006202
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [case.0x14006d218.0]
mov eax, esi
mov rcx, qword [rbp + 8]
xor rcx, rsp
call fcn.1400cc8d0
mov rbx, qword [rsp + 0x160]
add rsp, 0x110
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
mov edi, 0xc00d37dd
jmp 0x14000659b
lea rax, [0x1400dac18]
mov qword [rsp + 0x60], rax
lea rax, str.NT_AUTHORITYNetworkService
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rdi
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov rax, qword [0x14010a810]
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, r15
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rdi, rax
test rax, rax
jne 0x1400062f5
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov rcx, qword [0x140106190]
lea rbx, [0x140106190]
cmp rcx, rbx
je 0x1400062e2
test byte [rcx + 0x1c], r13b
je 0x1400062e2
cmp byte [rcx + 0x19], r13b
jb 0x1400062e2
lea edx, [rdi + 0x1f]
mov dword [rsp + 0x20], eax
mov r9, qword [r14 + 0x28]
lea r8, [0x1400db968]
mov rcx, qword [rcx + 0x10]
call fcn.140005344
mov edi, 0xc00d37de
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x14000659b
mov qword [rbp - 0x70], r12
lea rax, [rbp - 0x70]
mov qword [rsp + 0x20], rax
mov r9d, ebx
xor r8d, r8d
mov rdx, qword [rbp - 0x78]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
test eax, eax
jne 0x14000632a
mov esi, r12d
mov rax, qword [rbp - 0x70]
mov qword [rbp - 0x58], rax
mov rax, qword [rsp + 0x70]
cmp dword [rax - 0x10], r12d
je 0x1400063cb
mov qword [rbp - 0x60], rax
mov rcx, qword [0x140106190]
lea rax, [0x140106190]
cmp rcx, rax
je 0x140006371
test byte [rcx + 0x1c], r13b
je 0x140006371
cmp byte [rcx + 0x19], 4
jb 0x140006371
mov edx, 0x20
lea r8, [0x1400db968]
mov rcx, qword [rcx + 0x10]
call fcn.140003538
lea r8, [rbp - 0x60]
mov edx, 1
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1400063cb
mov rbx, qword [0x140106190]
lea rax, [0x140106190]
cmp rbx, rax
je 0x1400063d2
test byte [rbx + 0x1c], r13b
je 0x1400063d2
cmp byte [rbx + 0x19], 3
jb 0x1400063d2
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x21
lea r8, [0x1400db968]
mov rcx, qword [0x140106190]
mov rcx, qword [rcx + 0x10]
call fcn.1400035ec
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], r12d
xor edx, edx
lea r8d, [rcx + 0x27]
lea rcx, [rbp - 0x38]
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 0x140006438
test byte [rbx + 0x1c], r13b
je 0x140006438
cmp byte [rbx + 0x19], 4
jb 0x140006438
mov edx, 0x22
lea r8, [0x1400db968]
mov rcx, qword [rbx + 0x10]
call fcn.140003538
lea r8, [rbp - 0x38]
mov edx, r13d
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x140006492
mov rax, qword [0x140106190]
lea rbx, [0x140106190]
cmp rax, rbx
je 0x140006499
test byte [rax + 0x1c], r13b
je 0x140006499
cmp byte [rax + 0x19], 3
jb 0x140006499
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x23
lea r8, [0x1400db968]
mov rcx, qword [0x140106190]
mov rcx, qword [rcx + 0x10]
call fcn.1400035ec
jmp 0x140006499
lea rbx, [0x140106190]
mov byte [rsp + 0x20], r12b
mov r9d, 0x2019d
mov r8d, r13d
lea rdx, str.S_1_5_4
mov rcx, rdi
call fcn.1400b3884
test eax, eax
jne 0x1400064e5
mov rcx, qword [0x140106190]
cmp rcx, rbx
je 0x1400064ec
test byte [rcx + 0x1c], r13b
je 0x1400064ec
cmp byte [rcx + 0x19], 3
jb 0x1400064ec
lea edx, [rax + 0x24]
lea r8, [0x1400db968]
mov rcx, qword [rcx + 0x10]
call fcn.140003538
mov rcx, qword [0x140106190]
mov dword [rbp - 0x80], 1
cmp rcx, rbx
je 0x140006519
test byte [rcx + 0x1c], r13b
je 0x140006519
cmp byte [rcx + 0x19], 4
jb 0x140006519
mov edx, 0x25
lea r8, [0x1400db968]
mov rcx, qword [rcx + 0x10]
call fcn.140003538
lea r8, [rbp - 0x80]
mov edx, 5
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x14000656c
mov rax, qword [0x140106190]
cmp rax, rbx
je 0x14000656c
test byte [rax + 0x1c], r13b
je 0x14000656c
cmp byte [rax + 0x19], 3
jb 0x14000656c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x26
lea r8, [0x1400db968]
mov rcx, qword [0x140106190]
mov rcx, qword [rcx + 0x10]
call fcn.1400035ec
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov edi, 0x400d3778
mov eax, 0xc00d37df
test esi, esi
cmovne edi, eax
jmp 0x14000659b
mov edi, 0x400d3779
lea rbx, [0x140106190]
test esi, esi
jne 0x14000607a
lea edx, [rsi + 4]
mov qword [rsp + 0x28], r12
mov qword [rsp + 0x20], r12
mov r9, qword [r14 + 0x28]
mov r8d, edi
mov rcx, r14
call fcn.140005b58
xor r8d, r8d
mov edx, edi
call fcn.140014f94
cmp edi, 0x400d3779
jne 0x140006612
mov r10, qword [0x140106190]
cmp r10, rbx
je 0x14000617f
test byte [r10 + 0x1c], r13b
je 0x140006145
cmp byte [r10 + 0x19], 4
jb 0x140006145
lea edx, [rsi + 0x27]
mov r9, qword [r14 + 0x28]
lea r8, [0x1400db968]
mov rcx, qword [r10 + 0x10]
call fcn.140003558
jmp 0x14000613e
mov r10, qword [0x140106190]
cmp r10, rbx
je 0x14000617f
test byte [r10 + 0x1c], r13b
je 0x140006145
cmp byte [r10 + 0x19], 4
jb 0x140006145
mov edx, 0x28
jmp 0x1400065f9