Function at 0x10003705c
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, [0x100152eb8]
mov rcx, qword [0x100152eb8]
cmp rcx, r12
je 0x1000370be
test byte [rcx + 0x1c], 1
je 0x1000370be
cmp byte [rcx + 0x19], 5
jb 0x1000370be
mov edx, 0x1d
mov r9, rsi
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034788
xor r14d, r14d
mov ebx, r14d
lea rcx, [0x100151100]
mov rax, qword [0x100151100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x70], rax
lea rcx, [0x100151100]
mov rax, qword [0x100151100]
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.100035d98
nop
mov rdx, qword [rbp + 0x28]
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x78]
call fcn.10003577c
mov edi, dword [rbp + 0x30]
xor edx, edx
mov ecx, edi
call fcn.100035ab4
cmp rax, r14
je 0x10003715d
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x70]
call fcn.100035c88
cmp eax, r14d
jne 0x100037181
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.100036190
mov edi, dword [rbp + 0x34]
xor edx, edx
mov ecx, edi
call fcn.100035ab4
cmp rax, r14
je 0x1000371aa
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x158]
call fcn.100035c88
cmp eax, r14d
jne 0x1000371b7
lea rcx, [rsp + 0x158]
call fcn.100035fc0
mov rcx, rbp
call fcn.100036eac
mov r15d, 2
cmp eax, r14d
jne 0x100037616
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 0x100037238
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x100152eb8]
cmp rcx, r12
je 0x10003721f
test byte [rcx + 0x1c], r15b
je 0x10003721f
cmp byte [rcx + 0x19], r15b
jb 0x10003721f
lea edx, [r15 + 0x1c]
mov r9d, eax
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100036328
cmp ebx, 5
jne 0x10003722e
mov esi, 0xc00d37dc
jmp 0x1000376f4
mov esi, 0xc00d37dd
jmp 0x10003761b
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 [0x100157bc8]
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 0x1000372fa
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x100152eb8]
lea r12, [0x100152eb8]
cmp rcx, r12
je 0x1000372e7
test byte [rcx + 0x1c], r15b
je 0x1000372e7
cmp byte [rcx + 0x19], r15b
jb 0x1000372e7
mov edx, 0x1f
mov dword [rsp + 0x20], eax
mov r9, qword [rbp + 0x28]
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.10009b2f4
mov esi, 0xc00d37de
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x10003761b
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 0x100037341
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 0x1000373fc
mov qword [rsp + 0xa8], rax
mov rcx, qword [0x100152eb8]
lea rax, [0x100152eb8]
cmp rcx, rax
je 0x100037394
test byte [rcx + 0x1c], r15b
je 0x100037394
cmp byte [rcx + 0x19], 4
jb 0x100037394
mov edx, 0x20
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034764
lea r8, [rsp + 0xa8]
mov edx, 1
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
cmp eax, r14d
jne 0x1000373fc
mov rdi, qword [0x100152eb8]
lea rax, [0x100152eb8]
cmp rdi, rax
je 0x100037403
test byte [rdi + 0x1c], r15b
je 0x100037403
cmp byte [rdi + 0x19], 3
jb 0x100037403
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x21
lea r8, [0x10001e638]
mov rcx, qword [0x100152eb8]
mov rcx, qword [rcx + 0x10]
call fcn.100036328
mov rdi, qword [0x100152eb8]
jmp 0x100037403
mov rdi, qword [0x100152eb8]
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, [0x100152eb8]
cmp rdi, rax
je 0x10003749f
test byte [rdi + 0x1c], r15b
je 0x10003749f
cmp byte [rdi + 0x19], 4
jb 0x10003749f
mov edx, 0x22
lea r8, [0x10001e638]
mov rcx, qword [rdi + 0x10]
call fcn.100034764
lea r8, [rsp + 0xd0]
mov edx, r15d
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
cmp eax, r14d
jne 0x1000374fe
mov rax, qword [0x100152eb8]
lea rdi, [0x100152eb8]
cmp rax, rdi
je 0x100037505
test byte [rax + 0x1c], r15b
je 0x100037505
cmp byte [rax + 0x19], 3
jb 0x100037505
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x23
lea r8, [0x10001e638]
mov rcx, qword [0x100152eb8]
mov rcx, qword [rcx + 0x10]
call fcn.100036328
jmp 0x100037505
lea rdi, [0x100152eb8]
mov byte [rsp + 0x20], r14b
mov r9d, 0x2019d
mov r8d, r15d
lea rdx, [0x10001ea40]
mov rcx, r12
call fcn.1000e45c4
cmp eax, r14d
jne 0x10003755d
mov rcx, qword [0x100152eb8]
cmp rcx, rdi
je 0x100037564
test byte [rcx + 0x1c], r15b
je 0x100037564
cmp byte [rcx + 0x19], 3
jb 0x100037564
mov edx, 0x24
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034764
mov rcx, qword [0x100152eb8]
jmp 0x100037564
mov rcx, qword [0x100152eb8]
mov dword [rsp + 0x150], 1
cmp rcx, rdi
je 0x100037595
test byte [rcx + 0x1c], r15b
je 0x100037595
cmp byte [rcx + 0x19], 4
jb 0x100037595
mov edx, 0x25
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.100034764
lea r8, [rsp + 0x150]
mov edx, 5
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
cmp eax, r14d
jne 0x1000375ed
mov rax, qword [0x100152eb8]
cmp rax, rdi
je 0x1000375ed
test byte [rax + 0x1c], r15b
je 0x1000375ed
cmp byte [rax + 0x19], 3
jb 0x1000375ed
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov r9d, eax
mov edx, 0x26
lea r8, [0x10001e638]
mov rcx, qword [0x100152eb8]
mov rcx, qword [rcx + 0x10]
call fcn.100036328
mov rcx, r12
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
cmp ebx, r14d
jne 0x1000376ed
mov esi, 0x400d3778
lea r12, [0x100152eb8]
jmp 0x10003761b
mov esi, 0x400d3779
cmp ebx, r14d
jne 0x1000376f4
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.100036ce8
xor r8d, r8d
mov edx, esi
mov rcx, qword [0x100157688]
call fcn.100048ca0
cmp esi, 0x400d3779
jne 0x1000376a4
mov rdi, qword [0x100152eb8]
cmp rdi, r12
je 0x1000377f9
test byte [rdi + 0x1c], r15b
je 0x1000377c1
cmp byte [rdi + 0x19], 4
jb 0x1000377c1
mov edx, 0x27
mov r9, qword [rbp + 0x28]
lea r8, [0x10001e638]
mov rcx, qword [rdi + 0x10]
call fcn.100034788
mov rdi, qword [0x100152eb8]
jmp 0x1000377c1
mov rdi, qword [0x100152eb8]
cmp rdi, r12
je 0x1000377f9
test byte [rdi + 0x1c], r15b
je 0x1000377c1
cmp byte [rdi + 0x19], 4
jb 0x1000377c1
mov edx, 0x28
mov r9, qword [rbp + 0x28]
lea r8, [0x10001e638]
mov rcx, qword [rdi + 0x10]
call fcn.100034788
mov rdi, qword [0x100152eb8]
jmp 0x1000377c1
lea r12, [0x100152eb8]
lea rcx, [0x100151100]
mov rax, qword [0x100151100]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x88], rax
mov r8d, ebx
lea rdx, [0x10001ea50]
lea rcx, [rsp + 0x88]
call fcn.100039d9c
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.100036ce8
mov r8d, ebx
mov edx, esi
mov rcx, qword [0x100157688]
call fcn.100048ca0
mov rcx, qword [0x100152eb8]
cmp rcx, r12
je 0x100037795
test byte [rcx + 0x1c], r15b
je 0x100037795
cmp byte [rcx + 0x19], r15b
jb 0x100037795
mov edx, 0x29
mov dword [rsp + 0x20], ebx
mov r9, qword [rbp + 0x28]
lea r8, [0x10001e638]
mov rcx, qword [rcx + 0x10]
call fcn.10009b2f4
nop
lea rdx, [rdi - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
cmp eax, r14d
jg 0x1000377ba
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rdi, qword [0x100152eb8]
jmp 0x1000377c1
mov rdi, qword [0x100152eb8]
cmp rdi, r12
je 0x1000377f9
test byte [rdi + 0x1c], 1
je 0x1000377f9
movzx edx, byte [rdi + 0x19]
mov eax, ebx
neg eax
sbb ecx, ecx
and ecx, 0xfffffffd
add ecx, 5
cmp edx, ecx
jl 0x1000377f9
mov edx, 0x2a
mov r9d, ebx
lea r8, [0x10001e638]
mov rcx, qword [rdi + 0x10]
call fcn.100036328
nop
mov rdx, qword [rsp + 0x78]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
dec eax
cmp eax, r14d
jg 0x10003781b
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rcx, qword [rsp + 0xb0]
cmp rcx, r14
je 0x10003782f
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 0x100037854
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 0x100037875
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