Function at 0x140006240
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 - 0x58]
sub rsp, 0x120
mov qword [rbp - 0x18], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov rax, qword [0x1400f6388]
xor rax, rsp
mov qword [rbp + 0x18], rax
mov r14, rdx
mov rsi, rcx
lea rax, [0x1400f3190]
mov rcx, qword [0x1400f3190]
cmp rcx, rax
je 0x1400062b0
test byte [rcx + 0x1c], 1
je 0x1400062b0
cmp byte [rcx + 0x19], 5
jb 0x1400062b0
mov edx, 0x1c
mov r9, r14
lea r8, [0x1400cdbb8]
mov rcx, qword [rcx + 0x10]
call fcn.140003608
xor r12d, r12d
mov edi, r12d
mov rax, qword [0x1400f6030]
lea rcx, [0x1400f6030]
mov rax, qword [rax + 0x18]
call qword [str.__f_]
add rax, 0x18
mov qword [rsp + 0x78], rax
mov rax, qword [0x1400f6030]
lea rcx, [0x1400f6030]
mov rax, qword [rax + 0x18]
call qword [str.__f_]
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.140004be4
nop
mov rdx, qword [rsi + 0x28]
mov r8d, dword [rdx - 0x10]
lea rcx, [rbp - 0x78]
call fcn.140004638
mov ebx, dword [rsi + 0x30]
mov ecx, ebx
call fcn.140004984
test rax, rax
je 0x140006349
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x78]
call fcn.140004ac8
test eax, eax
jne 0x14000636b
lea rdx, str.UNKNOWN_SERVICE
or rax, 0xffffffffffffffff
inc rax
cmp word [rdx + rax*2], r12w
jne 0x140006354
mov r8d, eax
lea rcx, [rsp + 0x78]
call fcn.140005040
mov ebx, dword [rsi + 0x34]
mov ecx, ebx
call fcn.140004984
test rax, rax
je 0x14000638e
mov r8d, ebx
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.140004ac8
test eax, eax
jne 0x140006398
lea rcx, [rsp + 0x70]
call fcn.140004db8
mov rcx, rsi
call fcn.14000608c
mov r13d, 2
test eax, eax
jne 0x140006914
mov edi, 0xf003f
mov r8d, edi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r15, rax
test rax, rax
jne 0x1400065be
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1400f3190]
lea r14, [0x1400f3190]
cmp rcx, r14
je 0x14000640a
test byte [rcx + 0x1c], r13b
je 0x14000640a
cmp byte [rcx + 0x19], r13b
jb 0x14000640a
lea edx, [r13 + 0x1b]
mov r9d, eax
lea r8, [0x1400cdbb8]
mov rcx, qword [rcx + 0x10]
call fcn.1400036a8
cmp edi, 5
jne 0x1400065b2
movups xmm0, xmmword [0x1400cd640]
movdqu xmmword [rbp - 0x10], xmm0
mov rax, qword [0x1400f6030]
lea rcx, [0x1400f6030]
mov rax, qword [rax + 0x18]
call qword [str.__f_]
add rax, 0x18
mov qword [rbp - 0x68], rax
mov r8d, edi
lea rdx, [0x1400cdba0]
lea rcx, [rbp - 0x68]
call fcn.140008fe8
mov qword [rsp + 0x20], r12
mov rbx, qword [rbp - 0x68]
mov r9, rbx
mov r8, qword [rsi + 0x28]
lea rdx, [rbp - 0x10]
mov rcx, rsi
call fcn.140005ea8
mov rcx, qword [0x1400f3190]
cmp rcx, r14
je 0x1400064a4
test byte [rcx + 0x1c], r13b
je 0x1400064a4
cmp byte [rcx + 0x19], r13b
jb 0x1400064a4
mov edx, 0x28
mov dword [rsp + 0x20], edi
mov r9, qword [rsi + 0x28]
lea r8, [0x1400cdbb8]
mov rcx, qword [rcx + 0x10]
call fcn.14000562c
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400064c5
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [str.__f_]
mov r10, qword [0x1400f3190]
cmp r10, r14
je 0x140006506
test byte [r10 + 0x1c], 1
je 0x140006506
movzx edx, byte [r10 + 0x19]
mov eax, edi
neg eax
sbb ecx, ecx
and ecx, 0xfffffffd
add ecx, 5
cmp edx, ecx
jb 0x140006506
mov edx, 0x29
mov r9d, edi
lea r8, [0x1400cdbb8]
mov rcx, qword [r10 + 0x10]
call fcn.1400036a8
nop
mov rdx, qword [rbp - 0x78]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x14000652c
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [str.__f_]
nop
mov rcx, qword [rbp - 0x58]
test rcx, rcx
je 0x14000653c
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 0x140006563
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [str.__f_]
nop
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140006589
mov rcx, qword [rdx]
mov rax, qword [rcx]
mov rax, qword [rax + 8]
call qword [str.__f_]
mov eax, edi
mov rcx, qword [rbp + 0x18]
xor rcx, rsp
call fcn.1400c13a0
mov rbx, qword [rsp + 0x170]
add rsp, 0x120
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
movups xmm0, xmmword [0x1400cd630]
jmp 0x140006922
lea rax, [0x1400cc828]
mov qword [rsp + 0x60], rax
lea rax, str.NT_AUTHORITYNetworkService
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x48], r12
mov qword [rsp + 0x40], r12
mov rax, qword [0x1400f7720]
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 [rsi + 0x28]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rbx, rax
test rax, rax
jne 0x140006685
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov rcx, qword [0x1400f3190]
lea r14, [0x1400f3190]
cmp rcx, r14
je 0x14000666b
test byte [rcx + 0x1c], r13b
je 0x14000666b
cmp byte [rcx + 0x19], r13b
jb 0x14000666b
lea edx, [rbx + 0x1e]
mov dword [rsp + 0x20], eax
mov r9, qword [rsi + 0x28]
lea r8, [0x1400cdbb8]
mov rcx, qword [rcx + 0x10]
call fcn.14000562c
movups xmm0, xmmword [0x1400cd620]
movdqu xmmword [rbp - 0x10], xmm0
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x140006927
mov qword [rbp - 0x70], r12
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 0x1400066ba
mov edi, r12d
mov rax, qword [rbp - 0x70]
mov qword [rbp - 0x58], rax
movups xmm0, xmmword [0x1400cd610]
movdqu xmmword [rbp - 0x10], xmm0
mov rax, qword [rsp + 0x70]
cmp dword [rax - 0x10], r12d
je 0x140006762
mov qword [rbp - 0x60], rax
mov rcx, qword [0x1400f3190]
lea r14, [0x1400f3190]
cmp rcx, r14
je 0x14000670d
test byte [rcx + 0x1c], r13b
je 0x14000670d
cmp byte [rcx + 0x19], 4
jb 0x14000670d
mov edx, 0x1f
lea r8, [0x1400cdbb8]
mov rcx, qword [rcx + 0x10]
call fcn.1400035e4
lea r8, [rbp - 0x60]
mov edx, 1
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x140006769
mov rcx, qword [0x1400f3190]
cmp rcx, r14
je 0x140006770
test byte [rcx + 0x1c], r13b
je 0x140006770
cmp byte [rcx + 0x19], 3
jb 0x140006770
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x20
lea r8, [0x1400cdbb8]
mov rcx, qword [0x1400f3190]
mov rcx, qword [rcx + 0x10]
call fcn.1400036a8
jmp 0x140006769
lea r14, [0x1400f3190]
mov rcx, qword [0x1400f3190]
mov edx, 1
mov dword [rbp], edx
mov eax, 0x7530
mov dword [rbp + 4], eax
mov dword [rbp + 8], edx
mov qword [rbp + 0xc], rax
mov dword [rbp + 0x14], r12d
mov qword [rbp - 0x40], r12
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x38], xmm0
mov qword [rbp - 0x28], 3
lea rax, [rbp]
mov qword [rbp - 0x20], rax
cmp rcx, r14
je 0x1400067cd
test byte [rcx + 0x1c], r13b
je 0x1400067cd
cmp byte [rcx + 0x19], 4
jb 0x1400067cd
mov edx, 0x21
lea r8, [0x1400cdbb8]
mov rcx, qword [rcx + 0x10]
call fcn.1400035e4
lea r8, [rbp - 0x40]
mov edx, r13d
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x14000681e
mov rax, qword [0x1400f3190]
cmp rax, r14
je 0x14000681e
test byte [rax + 0x1c], r13b
je 0x14000681e
cmp byte [rax + 0x19], 3
jb 0x14000681e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x22
lea r8, [0x1400cdbb8]
mov rcx, qword [0x1400f3190]
mov rcx, qword [rcx + 0x10]
call fcn.1400036a8
mov byte [rsp + 0x20], r12b
mov r9d, 0x2019d
mov r8d, r13d
lea rdx, str.S_1_5_4
mov rcx, rbx
call fcn.1400a889c
test eax, eax
jne 0x14000686a
mov rcx, qword [0x1400f3190]
cmp rcx, r14
je 0x140006871
test byte [rcx + 0x1c], r13b
je 0x140006871
cmp byte [rcx + 0x19], 3
jb 0x140006871
lea edx, [rax + 0x23]
lea r8, [0x1400cdbb8]
mov rcx, qword [rcx + 0x10]
call fcn.1400035e4
mov rcx, qword [0x1400f3190]
mov dword [rbp - 0x80], 1
cmp rcx, r14
je 0x14000689e
test byte [rcx + 0x1c], r13b
je 0x14000689e
cmp byte [rcx + 0x19], 4
jb 0x14000689e
mov edx, 0x24
lea r8, [0x1400cdbb8]
mov rcx, qword [rcx + 0x10]
call fcn.1400035e4
lea r8, [rbp - 0x80]
mov edx, 5
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
test eax, eax
jne 0x1400068f1
mov rax, qword [0x1400f3190]
cmp rax, r14
je 0x1400068f1
test byte [rax + 0x1c], r13b
je 0x1400068f1
cmp byte [rax + 0x19], 3
jb 0x1400068f1
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x25
lea r8, [0x1400cdbb8]
mov rcx, qword [0x1400f3190]
mov rcx, qword [rcx + 0x10]
call fcn.1400036a8
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r15
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test edi, edi
jne 0x14000641f
movups xmm0, xmmword [0x1400cd6d0]
jmp 0x140006922
movups xmm0, xmmword [0x1400cd6c0]
lea r14, [0x1400f3190]
movdqu xmmword [rbp - 0x10], xmm0
test edi, edi
jne 0x14000641f
mov qword [rsp + 0x20], r12
xor r9d, r9d
mov r8, qword [rsi + 0x28]
lea rdx, [rbp - 0x10]
mov rcx, rsi
call fcn.140005ea8
mov rax, qword [0x1400cd6c0]
cmp rax, qword [rbp - 0x10]
jne 0x1400069a2
mov rax, qword [0x1400cd6c8]
cmp rax, qword [rbp - 8]
jne 0x1400069a2
mov r10, qword [0x1400f3190]
cmp r10, r14
je 0x140006506
test byte [r10 + 0x1c], r13b
je 0x1400064cc
cmp byte [r10 + 0x19], 4
jb 0x1400064cc
lea edx, [rdi + 0x26]
mov r9, qword [rsi + 0x28]
lea r8, [0x1400cdbb8]
mov rcx, qword [r10 + 0x10]
call fcn.140003608
jmp 0x1400064c5
mov r10, qword [0x1400f3190]
cmp r10, r14
je 0x140006506
test byte [r10 + 0x1c], r13b
je 0x1400064cc
cmp byte [r10 + 0x19], 4
jb 0x1400064cc
mov edx, 0x27
jmp 0x140006989