Function at 0x1000370a0
Capabilities:
Create service
Modify service

Disassembly:
mov rax, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x100
mov qword [rsp + 0xc8], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov rsi, rdx
mov rbp, rcx
lea r12, [0x100153eb8]
mov rcx, qword [0x100153eb8]
cmp rcx, r12
je 0x100037102
test byte [rcx + 0x1c], 1
je 0x100037102
cmp byte [rcx + 0x19], 5
jb 0x100037102
mov edx, 0x1d
mov r9, rsi
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.1000347a8
xor r14d, r14d
mov ebx, r14d
lea rcx, [0x100152100]
mov rax, qword [0x100152100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x70], rax
lea rcx, [0x100152100]
mov rax, qword [0x100152100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x158], rax
mov qword [rsp + 0xb0], r14
mov qword [rsp + 0xb8], r14
mov qword [rsp + 0xc0], r14
lea rdx, [0x10001e9a0]
lea rcx, [rsp + 0x78]
call fcn.100035db8
nop
mov rdx, qword [rbp + 0x28]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x78]
call fcn.10003579c
mov edi, dword [rbp + 0x30]
xor edx, edx
mov ecx, edi
call fcn.100035ad4
cmp rax, r14
je 0x1000371a1
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.100035ca8
cmp eax, r14d
jne 0x1000371c5
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdx, [0x10001e9e8]
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
lea r8d, [rcx - 1]
lea rcx, [rsp + 0x70]
call fcn.1000361b0
mov edi, dword [rbp + 0x34]
xor edx, edx
mov ecx, edi
call fcn.100035ad4
cmp rax, r14
je 0x1000371ee
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x158]
call fcn.100035ca8
cmp eax, r14d
jne 0x1000371fb
lea rcx, [rsp + 0x158]
call fcn.100035fe0
mov rcx, rbp
call fcn.100036ef0
mov r15d, 2
cmp eax, r14d
jne 0x10003765a
mov edi, 0xf003f
mov r8d, edi
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov r13, rax
cmp rax, r14
jne 0x10003727c
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x100153eb8]
cmp rcx, r12
je 0x100037263
test byte [rcx + 0x1c], r15b
je 0x100037263
cmp byte [rcx + 0x19], r15b
jb 0x100037263
lea edx, [r15 + 0x1c]
mov r9d, eax
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100036510
cmp ebx, 5
jne 0x100037272
mov esi, 0xc00d37dc
jmp 0x100037738
mov esi, 0xc00d37dd
jmp 0x10003765f
lea rax, [0x10001e918]
mov qword [rsp + 0x60], rax
lea rax, [0x10001ea08]
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x50], rsi
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x40], r14
mov rax, qword [0x100158bc8]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 0x10
mov r9d, 0xf01ff
mov r8, qword [rsp + 0x70]
mov rdx, qword [rbp + 0x28]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov r12, rax
cmp rax, r14
jne 0x10003733e
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x100153eb8]
lea r12, [0x100153eb8]
cmp rcx, r12
je 0x10003732b
test byte [rcx + 0x1c], r15b
je 0x10003732b
cmp byte [rcx + 0x19], r15b
jb 0x10003732b
mov edx, 0x1f
mov dword [rsp + 0x20], eax
mov r9, qword [rbp + 0x28]
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.10003b678
mov esi, 0xc00d37de
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x10003765f
mov qword [rsp + 0x80], r14
lea rax, [rsp + 0x80]
mov qword [rsp + 0x20], rax
mov r9d, edi
xor r8d, r8d
mov rdx, qword [rsp + 0x78]
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov ebx, eax
cmp eax, r14d
jne 0x100037385
mov ebx, r14d
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xb0], rax
mov esi, 0xc00d37df
mov rax, qword [rsp + 0x158]
cmp dword [rax - 0x10], r14d
je 0x100037440
mov qword [rsp + 0xa8], rax
mov rcx, qword [0x100153eb8]
lea rax, [0x100153eb8]
cmp rcx, rax
je 0x1000373d8
test byte [rcx + 0x1c], r15b
je 0x1000373d8
cmp byte [rcx + 0x19], 4
jb 0x1000373d8
mov edx, 0x20
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034784
lea r8, [rsp + 0xa8]
mov edx, 1
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
cmp eax, r14d
jne 0x100037440
mov rdi, qword [0x100153eb8]
lea rax, [0x100153eb8]
cmp rdi, rax
je 0x100037447
test byte [rdi + 0x1c], r15b
je 0x100037447
cmp byte [rdi + 0x19], 3
jb 0x100037447
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x21
lea r8, [0x10001e638]
mov rcx, qword [0x100153eb8]
mov rcx, qword [rcx + 0x10]
call fcn.100036510
mov rdi, qword [0x100153eb8]
jmp 0x100037447
mov rdi, qword [0x100153eb8]
mov dword [rsp + 0x90], 1
mov eax, 0x7530
mov dword [rsp + 0x94], eax
mov dword [rsp + 0x98], 1
mov dword [rsp + 0x9c], eax
mov dword [rsp + 0xa0], r14d
mov dword [rsp + 0xa4], r14d
mov dword [rsp + 0xd0], r14d
xor edx, edx
lea r8d, [rdx + 0x20]
lea rcx, [rsp + 0xd8]
call sub.msvcrt.dll_memset
mov dword [rsp + 0xe8], 3
lea rax, [rsp + 0x90]
mov qword [rsp + 0xf0], rax
lea rax, [0x100153eb8]
cmp rdi, rax
je 0x1000374e3
test byte [rdi + 0x1c], r15b
je 0x1000374e3
cmp byte [rdi + 0x19], 4
jb 0x1000374e3
mov edx, 0x22
lea r8, [0x10001e638]
mov rcx, qword [rdi + 0x10]
call fcn.100034784
lea r8, [rsp + 0xd0]
mov edx, r15d
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
cmp eax, r14d
jne 0x100037542
mov rax, qword [0x100153eb8]
lea rdi, [0x100153eb8]
cmp rax, rdi
je 0x100037549
test byte [rax + 0x1c], r15b
je 0x100037549
cmp byte [rax + 0x19], 3
jb 0x100037549
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x23
lea r8, [0x10001e638]
mov rcx, qword [0x100153eb8]
mov rcx, qword [rcx + 0x10]
call fcn.100036510
jmp 0x100037549
lea rdi, [0x100153eb8]
mov byte [rsp + 0x20], r14b
mov r9d, 0x2019d
mov r8d, r15d
lea rdx, [0x10001ea40]
mov rcx, r12
call fcn.1000e4c1c
cmp eax, r14d
jne 0x1000375a1
mov rcx, qword [0x100153eb8]
cmp rcx, rdi
je 0x1000375a8
test byte [rcx + 0x1c], r15b
je 0x1000375a8
cmp byte [rcx + 0x19], 3
jb 0x1000375a8
mov edx, 0x24
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034784
mov rcx, qword [0x100153eb8]
jmp 0x1000375a8
mov rcx, qword [0x100153eb8]
mov dword [rsp + 0x150], 1
cmp rcx, rdi
je 0x1000375d9
test byte [rcx + 0x1c], r15b
je 0x1000375d9
cmp byte [rcx + 0x19], 4
jb 0x1000375d9
mov edx, 0x25
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034784
lea r8, [rsp + 0x150]
mov edx, 5
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
cmp eax, r14d
jne 0x100037631
mov rax, qword [0x100153eb8]
cmp rax, rdi
je 0x100037631
test byte [rax + 0x1c], r15b
je 0x100037631
cmp byte [rax + 0x19], 3
jb 0x100037631
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x26
lea r8, [0x10001e638]
mov rcx, qword [0x100153eb8]
mov rcx, qword [rcx + 0x10]
call fcn.100036510
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp ebx, r14d
jne 0x100037731
mov esi, 0x400d3778
lea r12, [0x100153eb8]
jmp 0x10003765f
mov esi, 0x400d3779
cmp ebx, r14d
jne 0x100037738
mov edx, 4
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], r14
mov r9, qword [rbp + 0x28]
mov r8d, esi
mov rcx, rbp
call fcn.100036d2c
xor r8d, r8d
mov edx, esi
mov rcx, qword [0x100158688]
call fcn.100048d2c
cmp esi, 0x400d3779
jne 0x1000376e8
mov rdi, qword [0x100153eb8]
cmp rdi, r12
je 0x10003783d
test byte [rdi + 0x1c], r15b
je 0x100037805
cmp byte [rdi + 0x19], 4
jb 0x100037805
mov edx, 0x27
mov r9, qword [rbp + 0x28]
lea r8, [0x10001e638]
mov rcx, qword [rdi + 0x10]
call fcn.1000347a8
mov rdi, qword [0x100153eb8]
jmp 0x100037805
mov rdi, qword [0x100153eb8]
cmp rdi, r12
je 0x10003783d
test byte [rdi + 0x1c], r15b
je 0x100037805
cmp byte [rdi + 0x19], 4
jb 0x100037805
mov edx, 0x28
mov r9, qword [rbp + 0x28]
lea r8, [0x10001e638]
mov rcx, qword [rdi + 0x10]
call fcn.1000347a8
mov rdi, qword [0x100153eb8]
jmp 0x100037805
lea r12, [0x100153eb8]
lea rcx, [0x100152100]
mov rax, qword [0x100152100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x88], rax
mov r8d, ebx
lea rdx, [0x10001ea50]
lea rcx, [rsp + 0x88]
call fcn.100039dd4
mov edx, 1
mov qword [rsp + 0x28], r14
mov rdi, qword [rsp + 0x88]
mov qword [rsp + 0x20], rdi
mov r9, qword [rbp + 0x28]
mov r8d, esi
mov rcx, rbp
call fcn.100036d2c
mov r8d, ebx
mov edx, esi
mov rcx, qword [0x100158688]
call fcn.100048d2c
mov rcx, qword [0x100153eb8]
cmp rcx, r12
je 0x1000377d9
test byte [rcx + 0x1c], r15b
je 0x1000377d9
cmp byte [rcx + 0x19], r15b
jb 0x1000377d9
mov edx, 0x29
mov dword [rsp + 0x20], ebx
mov r9, qword [rbp + 0x28]
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.10003b678
nop
lea rdx, [rdi - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
cmp eax, r14d
jg 0x1000377fe
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdi, qword [0x100153eb8]
jmp 0x100037805
mov rdi, qword [0x100153eb8]
cmp rdi, r12
je 0x10003783d
test byte [rdi + 0x1c], 1
je 0x10003783d
movzx edx, byte [rdi + 0x19]
mov eax, ebx
neg eax
sbb ecx, ecx
and ecx, 0xfffffffd
add ecx, 5
cmp edx, ecx
jl 0x10003783d
mov edx, 0x2a
mov r9d, ebx
lea r8, [0x10001e638]
mov rcx, qword [rdi + 0x10]
call fcn.100036510
nop
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
cmp eax, r14d
jg 0x10003785f
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rsp + 0xb0]
cmp rcx, r14
je 0x100037873
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
mov rdx, qword [rsp + 0x158]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
cmp eax, r14d
jg 0x100037898
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x70]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
cmp eax, r14d
jg 0x1000378b9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov eax, ebx
mov rbx, qword [rsp + 0x140]
add rsp, 0x100
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret