Function at 0x140037170
Capabilities:
Create service
Query service configuration
Query service status
Start service

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rsi
mov qword [rsp + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rsp - 0x47]
sub rsp, 0x100
mov rax, qword [0x1400a1090]
xor rax, rsp
mov qword [rbp + 0x37], rax
mov r14, rcx
mov ecx, 0x20
call fcn.1400535c0
xor r15d, r15d
mov dword [rax + 1], r15d
mov word [rax + 5], r15w
mov byte [rax + 7], r15b
mov byte [rax], r15b
mov qword [rax + 8], 0xffffffffffffffff
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
mov qword [r14], rax
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rcx, rax
mov rax, qword [r14]
mov qword [rax + 0x10], rcx
mov rax, qword [r14]
cmp qword [rax + 0x10], r15
jne 0x140037223
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x140037210
lea rcx, str.MSRNO_ADMIN
call fcn.140019a70
jmp 0x140037320
mov edx, eax
lea rcx, str.MSRERROR__u
call fcn.140019a70
jmp 0x140037320
xorps xmm0, xmm0
movdqu xmmword [rbp - 0x41], xmm0
mov r9, r15
mov qword [rbp - 0x31], r15
mov rdx, qword [rbp - 0x41]
mov rcx, qword [rbp - 0x39]
cmp rdx, rcx
jne 0x140037246
mov eax, 0x104
jmp 0x140037252
mov rax, rcx
sub rax, rdx
sar rax, 1
add rax, rax
mov r8, rcx
sub r8, rdx
sar r8, 1
cmp rax, r8
jae 0x14003726a
lea rcx, [rdx + rax*2]
mov qword [rbp - 0x39], rcx
jmp 0x1400372a8
jbe 0x1400372a8
sub r9, rdx
sar r9, 1
cmp rax, r9
jbe 0x140037289
mov rdx, rax
lea rcx, [rbp - 0x41]
call fcn.140037910
mov rcx, qword [rbp - 0x39]
jmp 0x1400372a4
sub rax, r8
lea rbx, [rcx + rax*2]
mov r8, rbx
sub r8, rcx
xor edx, edx
call fcn.140055ed0
mov rcx, rbx
mov qword [rbp - 0x39], rbx
mov rdx, qword [rbp - 0x41]
sub rcx, rdx
sar rcx, 1
mov r8d, ecx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400372cd
mov r9, qword [rbp - 0x31]
jmp 0x140037232
test eax, eax
je 0x14003734c
mov edx, eax
lea rcx, str.MSRPATHHFAIL__u
call fcn.140019a70
nop
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x140037320
mov rdx, qword [rbp - 0x31]
sub rdx, rcx
sar rdx, 1
add rdx, rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003731b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140037890
call fcn.140053604
mov rax, r14
mov rcx, qword [rbp + 0x37]
xor rcx, rsp
call fcn.1400535a0
lea r11, [rsp + 0x100]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret
mov rax, qword [rbp - 0x39]
add rax, 0xfffffffffffffffe
mov rdx, qword [rbp - 0x41]
cmp rax, rdx
je 0x140037383
nop dword [rax]
movzx ecx, word [rax]
cmp cx, 0x5c
je 0x14003737a
cmp cx, 0x2f
je 0x14003737a
sub rax, 2
cmp rax, rdx
jne 0x140037360
jmp 0x140037383
mov word [rax + 2], r15w
mov rdx, qword [rbp - 0x41]
lea rcx, [rbp - 9]
call fcn.1400039c0
mov rbx, rax
mov rcx, qword [rax + 0x10]
mov rdx, qword [rax + 0x18]
mov rax, rdx
sub rax, rcx
cmp rax, 0xf
jb 0x1400373d4
lea rsi, [rcx + 0xf]
mov qword [rbx + 0x10], rsi
mov rdi, rbx
cmp rdx, 8
jb 0x1400373b7
mov rdi, qword [rbx]
lea rcx, [rdi + rcx*2]
mov r8d, 0x1e
lea rdx, str.WinRing0x64.sys
call fcn.140055820
mov word [rdi + rsi*2], r15w
jmp 0x1400373f9
mov qword [rsp + 0x20], socket
lea r9, str.WinRing0x64.sys
movzx r8d, byte [rbp - 0x49]
mov edx, select
mov rcx, rbx
call fcn.140037a20
mov rbx, rax
mov qword [rbp - 0x29], r15
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], r15
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x29], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rbp - 0x19], xmm1
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], 7
mov word [rbx], r15w
mov rdx, qword [rbp + 0xf]
cmp rdx, 8
jb 0x140037464
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 9]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003745f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140037896
call fcn.140053604
mov qword [rbp + 7], r15
mov qword [rbp + 0xf], 7
mov word [rbp - 9], r15w
mov rcx, qword [r14]
mov r8d, 0xf01ff
lea rdx, str.WinRing0_1_2_0
mov rcx, qword [rcx + 0x10]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
mov rax, qword [r14]
mov qword [rax + 0x18], rcx
mov rax, qword [r14]
cmp qword [rax + 0x18], 0
je 0x1400375c7
lea rcx, str.MSRSERVICE_ALREADY_EXISTS
call fcn.140019a70
mov rcx, qword [r14]
lea rdx, [rbp + 0x17]
mov rcx, qword [rcx + 0x18]
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x1400376ba
mov dword [rbp - 0x45], r15d
mov rcx, qword [r14]
lea r9, [rbp - 0x45]
xor r8d, r8d
xor edx, edx
mov rcx, qword [rcx + 0x18]
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1400375b7
mov edi, dword [rbp - 0x45]
mov rbx, r15
mov rsi, r15
test rdi, rdi
je 0x140037554
cmp rdi, 0x1000
jb 0x140037535
lea rcx, [rdi + 0x27]
cmp rcx, rdi
jbe 0x14003789c
call fcn.1400535c0
test rax, rax
je 0x1400378a2
lea rbx, [rax + 0x27]
and rbx, 0xffffffffffffffe0
mov qword [rbx - 8], rax
jmp 0x140037540
mov rcx, rdi
call fcn.1400535c0
mov rbx, rax
lea rsi, [rbx + rdi]
mov r8, rsi
sub r8, rbx
xor edx, edx
mov rcx, rbx
call fcn.140055ed0
sub rsi, rbx
mov rax, qword [r14]
lea r9, [rbp - 0x45]
mov r8d, esi
mov rdx, rbx
mov rcx, qword [rax + 0x18]
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test eax, eax
je 0x140037582
mov rdx, qword [rbx + 0x10]
lea rcx, str.MSRSERVICE_PATH__s
call fcn.140019a70
test rbx, rbx
je 0x1400375b7
mov rax, rbx
cmp rsi, 0x1000
jb 0x1400375ac
add rsi, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400378a2
mov rdx, rsi
mov rcx, rbx
call fcn.140053604
cmp dword [rbp + 0x1b], 4
jne 0x1400376ba
mov rax, qword [r14]
mov byte [rax], 1
mov rcx, qword [r14]
cmp byte [rcx], 0
jne 0x14003779d
lea rax, [rbp - 0x29]
cmp qword [rbp - 0x11], 8
cmovae rax, qword [rbp - 0x29]
mov qword [rsp + 0x60], r15
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x48], r15
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], 1
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 1
mov r9d, 0xf01ff
lea r8, str.WinRing0_1_2_0
lea rdx, str.WinRing0_1_2_0
mov rcx, qword [rcx + 0x10]
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rcx, rax
mov rax, qword [r14]
mov qword [rax + 0x18], rcx
mov rax, qword [r14]
mov rcx, qword [rax + 0x18]
test rcx, rcx
jne 0x140037763
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.MSRINSTALLFAIL__u
call fcn.140019a70
nop
mov rdx, qword [rbp - 0x11]
cmp rdx, 8
jb 0x1400376a4
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
cmp rdx, 0x1000
mov rax, rcx
jb 0x14003769f
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140037884
call fcn.140053604
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], 7
mov word [rbp - 0x29], r15w
jmp 0x1400372e0
mov rcx, qword [r14]
call fcn.1400370a0
test al, al
jne 0x1400375c7
mov rdx, qword [rbp - 0x11]
cmp rdx, 8
jb 0x14003770a
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140037705
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x1400378a8
call fcn.140053604
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], 7
mov word [rbp - 0x29], r15w
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x140037320
mov rdx, qword [rbp - 0x31]
sub rdx, rcx
sar rdx, 1
add rdx, rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003731b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x14003788a
jmp 0x14003731b
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x14003779d
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x14003779d
cmp eax, 2
jne 0x140037790
lea rcx, str.MSRFILE_NOT_FOUND
call fcn.140019a70
mov rcx, qword [r14]
call fcn.1400370a0
jmp 0x140037664
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, 0xc0000000
lea rcx, str..WinRing0_1_2_0
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, rax
mov rax, qword [r14]
mov qword [rax + 8], rcx
mov rax, qword [r14]
cmp qword [rax + 8], 0xffffffffffffffff
jne 0x1400377f3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rcx, str.MSRCONNECT_FAIL__u
call fcn.140019a70
nop
mov rdx, qword [rbp - 0x11]
cmp rdx, 8
jb 0x14003782f
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x29]
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003782a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140037884
call fcn.140053604
mov qword [rbp - 0x19], r15
mov qword [rbp - 0x11], 7
mov word [rbp - 0x29], r15w
mov rcx, qword [rbp - 0x41]
test rcx, rcx
je 0x140037320
mov rdx, qword [rbp - 0x31]
sub rdx, rcx
sar rdx, 1
add rdx, rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x14003731b
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140037890
jmp 0x14003731b
call fcn.14005fd14
nop
call fcn.14005fd14
int3
call fcn.14005fd14
nop
call fcn.14005fd14
int3
call fcn.140003360
int3
call fcn.14005fd14
nop
call fcn.14005fd14
int3