Function at 0x140178428
Capabilities:
Contain obfuscated stackstrings
Create service
Get common file path
Get program files directory
Query service configuration
Query service status
Start service

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x300]
sub rsp, 0x400
mov rax, qword [0x1404e8f18]
xor rax, rsp
mov qword [rbp + 0x2f0], rax
mov r13, rdx
mov rsi, rcx
mov qword [rbp - 0x70], rdx
xor r15d, r15d
mov dword [rsp + 0x70], r15d
lea r12d, [r15 + 0x20]
mov ecx, r12d
call fcn.14033576c
test rax, rax
je 0x14017849a
mov dword [rax + 1], r15d
mov word [rax + 5], r15w
mov byte [rax + 7], r15b
mov byte [rax], r15b
or qword [rax + 8], 0xffffffffffffffff
mov qword [rax + 0x10], r15
mov qword [rax + 0x18], r15
jmp 0x14017849d
mov rax, r15
mov qword [rsi], rax
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rcx, rax
mov rax, qword [rsi]
mov qword [rax + 0x10], rcx
mov rax, qword [rsi]
cmp qword [rax + 0x10], r15
jne 0x1401784ce
call qword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x140178570
xorps xmm0, xmm0
movdqu xmmword [rsp + 0x78], xmm0
mov qword [rbp - 0x78], r15
mov rdi, r15
mov r14, qword [rbp - 0x80]
mov rbx, qword [rsp + 0x78]
cmp rbx, r14
mov edx, 0x104
je 0x1401784f5
lea rdx, [rdi + rdi]
lea rcx, [rsp + 0x78]
call fcn.140178f14
mov r14, qword [rbp - 0x80]
mov rdi, r14
mov rbx, qword [rsp + 0x78]
sub rdi, rbx
sar rdi, 1
mov r8d, edi
mov rdx, rbx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
je 0x1401784e7
test eax, eax
je 0x1401785a6
test rbx, rbx
je 0x140178570
mov edi, 0x1000
mov rax, qword [rbp - 0x78]
sub rax, rbx
sar rax, 1
lea rdx, [rax + rax]
mov rax, rbx
cmp rdx, rdi
jb 0x140178567
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140178d68
mov rcx, rbx
call fcn.1403357a8
nop
mov rcx, qword [r13]
call fcn.1403357a8
mov rax, rsi
mov rcx, qword [rbp + 0x2f0]
xor rcx, rsp
call fcn.1403358f0
mov rbx, qword [rsp + 0x450]
add rsp, 0x400
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rax, [r14 - 2]
cmp rax, rbx
je 0x1401785e8
mov r9, rax
mov rcx, rax
mov r8, rax
movzx edx, word [rax]
cmp dx, 0x5c
je 0x1401785df
cmp dx, 0x2f
je 0x1401785db
lea rax, [r9 - 2]
mov rcx, rax
mov r9, rax
mov r8, rax
cmp rax, rbx
jne 0x1401785b8
jmp 0x1401785e8
cmp dx, 0x5c
cmove rcx, r8
mov word [rcx + 2], r15w
xorps xmm0, xmm0
movups xmmword [rbp - 0x68], xmm0
movdqa xmm1, xmmword [0x1403c41a0]
movdqu xmmword [rbp - 0x58], xmm1
mov word [rbp - 0x68], r15w
mov edi, 0x1000
cmp qword [r13 + 8], r15
je 0x140178825
lea rdx, [0x140370c0d]
cmp qword [r13], r15
cmovne rdx, qword [r13]
movups xmmword [rbp + 0x20], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x30], xmm1
or r8, 0xffffffffffffffff
inc r8
cmp byte [rdx + r8], r15b
jne 0x140178630
lea rcx, [rbp + 0x20]
call fcn.140003aa8
nop
lea rcx, [rbp + 0x20]
cmp qword [rbp + 0x38], 0x10
cmovae rcx, qword [rbp + 0x20]
mov r8, qword [rbp + 0x30]
add r8, rcx
lea rdx, [rbp + 0x20]
cmp qword [rbp + 0x38], 0x10
cmovae rdx, qword [rbp + 0x20]
xorps xmm0, xmm0
movups xmmword [rbp + 0x80], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0x90], xmm1
cmp rdx, r8
jne 0x14017869a
movdqa xmm0, xmmword [0x1403c41a0]
movdqu xmmword [rbp + 0x90], xmm0
mov word [rbp + 0x80], r15w
jmp 0x1401786ad
mov r9, r8
sub r9, rdx
lea rcx, [rbp + 0x80]
call fcn.140178188
nop
mov dword [rbp + 0x40], r15d
call fcn.140084dbc
mov qword [rbp + 0x48], rax
lea rdx, [rbp + 0x40]
lea rcx, [rbp + 0x60]
call fcn.140086d6c
mov dword [rsp + 0x70], 1
cmp dword [rbp + 0x40], r15d
jne 0x140178d6e
xorps xmm0, xmm0
movups xmmword [rbp + 0xa0], xmm0
xorps xmm1, xmm1
movdqu xmmword [rbp + 0xb0], xmm1
lea rdx, [rbp + 0x60]
cmp qword [rbp + 0x78], 8
cmovae rdx, qword [rbp + 0x60]
mov r8, qword [rbp + 0x70]
lea rcx, [rbp + 0xa0]
call fcn.14008484c
mov dword [rsp + 0x70], 3
lea r8, [rbp + 0x80]
lea rdx, [rbp + 0xa0]
lea rcx, [rbp + 0xc0]
call fcn.140178110
mov r14, rax
lea rax, [rbp - 0x68]
cmp rax, r14
je 0x1401787a7
mov rdx, qword [rbp - 0x50]
cmp rdx, 8
jb 0x140178776
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, rdi
jb 0x140178771
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140178d83
call fcn.1403357a8
movdqa xmm0, xmmword [0x1403c41a0]
movdqu xmmword [rbp - 0x58], xmm0
mov word [rbp - 0x68], r15w
mov r8, r12
mov rdx, r14
lea rcx, [rbp - 0x68]
call fcn.140336c00
mov qword [r14 + 0x10], r15
mov qword [r14 + 0x18], 7
mov word [r14], r15w
lea rcx, [rbp + 0xc0]
call fcn.140085a7c
nop
lea rcx, [rbp + 0xa0]
call fcn.140085a7c
nop
lea rcx, [rbp + 0x60]
call fcn.140085a7c
nop
lea rcx, [rbp + 0x80]
call fcn.140085a7c
nop
mov rdx, qword [rbp + 0x38]
cmp rdx, 0x10
jb 0x14017880f
inc rdx
mov rcx, qword [rbp + 0x20]
mov rax, rcx
cmp rdx, rdi
jb 0x14017880a
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140178d89
call fcn.1403357a8
movdqa xmm0, xmmword [0x140372210]
movdqu xmmword [rbp + 0x30], xmm0
mov byte [rbp + 0x20], r15b
jmp 0x140178a2e
call fcn.1400aed48
neg al
sbb edx, edx
and edx, 0xc
add edx, 0x1a
lea rax, [rbp + 0xe0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea rdx, [rbp + 0xe0]
lea rcx, [rbp - 0x68]
call fcn.140178e3c
mov r9d, 0x4d2e
mov dword [rbp - 0x40], 0x4d724d2e
mov dword [rbp - 0x3c], 0x4d5f4d68
mov dword [rbp - 0x38], 0x4d554d5e
lea r8d, [r9 + 0x27]
mov dword [rbp - 0x34], 0x4d514d5f
lea edx, [r9 + 0x23]
mov dword [rbp - 0x30], 0x4d7a4d69
mov dword [rbp - 0x2c], 0x4d5a4d5e
lea ecx, [rdx - 7]
mov dword [rbp - 0x28], 0x4d664d4a
mov dword [rbp - 0x24], 0x4d6e4d6c
mov dword [rbp - 0x20], 0x4d0a4d0b
mov dword [rbp - 0x1c], 0x4d334d11
mov dword [rbp - 0x18], 0x4d314d38
lea eax, [rdx - 0xe]
mov word [rbp - 0x14], ax
lea eax, [rdx - 0xd]
xor ax, word [0x1403cdd7c]
mov word [rbp - 0x12], ax
lea eax, [rdx - 0xc]
xor ax, word [0x1403cdd7e]
mov word [rbp - 0x10], ax
lea eax, [rdx - 0xb]
xor ax, word [str..WinRing0_1_2_0]
mov word [rbp - 0xe], ax
lea eax, [rdx - 0xa]
xor ax, word [0x1403cdd82]
mov word [rbp - 0xc], ax
lea eax, [rdx - 9]
xor ax, word [0x1403cdd84]
mov word [rbp - 0xa], ax
lea eax, [rdx - 8]
xor ax, word [0x1403cdd86]
mov word [rbp - 8], ax
xor cx, word [0x1403cdd88]
mov word [rbp - 6], cx
lea eax, [rdx - 6]
xor ax, word [0x1403cdd8a]
mov word [rbp - 4], ax
lea eax, [rdx - 5]
xor ax, word [0x1403cdd8c]
mov word [rbp - 2], ax
lea eax, [rdx - 4]
xor ax, word [0x1403cdd8e]
mov word [rbp], ax
lea eax, [rdx - 3]
xor ax, word [0x1403cdd90]
mov word [rbp + 2], ax
lea eax, [rdx - 2]
xor ax, word [0x1403cdd92]
mov word [rbp + 4], ax
lea eax, [rdx - 1]
xor ax, word [0x1403cdd94]
mov word [rbp + 6], ax
xor dx, word [0x1403cdd96]
mov word [rbp + 8], dx
lea eax, [r9 + 0x24]
xor ax, word [0x1403cdd98]
mov word [rbp + 0xa], ax
lea eax, [r9 + 0x25]
xor ax, word [0x1403cdd9a]
mov word [rbp + 0xc], ax
lea eax, [r9 + 0x26]
xor ax, word [0x1403cdd9c]
mov word [rbp + 0xe], ax
xor r8w, word [0x1403cdd9e]
mov word [rbp + 0x10], r8w
lea eax, [r9 + 0x28]
xor ax, word [0x1403cdda0]
mov word [rbp + 0x12], ax
lea eax, [r9 + 0x29]
xor ax, word [0x1403cdda2]
mov word [rbp + 0x14], ax
lea eax, [r9 + 0x2a]
xor ax, word [0x1403cdda4]
mov word [rbp + 0x16], ax
xor eax, eax
mov word [rbp + 0x18], ax
mov rcx, r15
lea eax, [r9 + rcx]
xor word [rbp + rcx*2 - 0x3e], ax
inc rcx
cmp rcx, 0x2b
jae 0x140178a0a
movzx r9d, word [rbp - 0x40]
jmp 0x1401789f1
mov word [rbp + 0x18], r15w
lea rax, [rbp - 0x3e]
or r8, 0xffffffffffffffff
inc r8
cmp word [rax + r8*2], r15w
jne 0x140178a17
lea rdx, [rbp - 0x3e]
lea rcx, [rbp - 0x68]
call fcn.1400ac40c
mov rcx, qword [rsi]
mov r8d, 0xf01ff
mov rdx, qword [str.WinRing0_1_2_0]
mov rcx, qword [rcx + 0x10]
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rcx, rax
mov rax, qword [rsi]
mov qword [rax + 0x18], rcx
mov rax, qword [rsi]
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140178b31
lea rdx, [rbp + 0x40]
call qword [sym.imp.ADVAPI32.dll_QueryServiceStatus]
test eax, eax
je 0x140178bdc
mov dword [rsp + 0x70], r15d
mov rcx, qword [rsi]
lea r9, [rsp + 0x70]
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 0x140178b21
mov r12d, dword [rsp + 0x70]
mov r14, r15
test r12, r12
je 0x140178ad2
mov ecx, r12d
cmp r12, rdi
jb 0x140178abb
call fcn.140002db0
jmp 0x140178ac0
call fcn.14033576c
mov r14, rax
lea r15, [r12 + rax]
mov rdx, r15
mov rcx, rax
call fcn.140026adc
sub r15, r14
mov rax, qword [rsi]
lea r9, [rsp + 0x70]
mov r8d, r15d
mov rdx, r14
mov rcx, qword [rax + 0x18]
call qword [sym.imp.ADVAPI32.dll_QueryServiceConfigA]
test r14, r14
je 0x140178b1e
cmp r15, rdi
jb 0x140178b13
add r15, 0x27
mov rcx, qword [r14 - 8]
sub r14, rcx
lea rax, [r14 - 8]
cmp rax, 0x1f
ja 0x140178d8f
mov r14, rcx
mov rdx, r15
mov rcx, r14
call fcn.1403357a8
xor r15d, r15d
cmp dword [rbp + 0x44], 4
jne 0x140178bdc
mov rax, qword [rsi]
mov byte [rax], 1
mov qword [rsp + 0x30], r15
mov r14d, 0x80
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov r12d, 0xc0000000
mov edx, r12d
lea rcx, str..WinRing0_1_2_0
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, rax
mov rax, qword [rsi]
mov qword [rax + 8], rcx
mov rcx, qword [rsi]
cmp qword [rcx + 8], 0xffffffffffffffff
je 0x140178c7b
mov byte [rcx], 1
mov rdx, qword [rbp - 0x50]
cmp rdx, 8
jb 0x140178bbc
mov rcx, qword [rbp - 0x68]
lea rdx, [rdx*2 + 2]
mov rax, rcx
cmp rdx, rdi
jb 0x140178bb7
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140178d5c
call fcn.1403357a8
movdqa xmm0, xmmword [0x1403c41a0]
movdqu xmmword [rbp - 0x58], xmm0
mov word [rbp - 0x68], r15w
test rbx, rbx
je 0x140178570
jmp 0x140178538
mov rcx, qword [rsi]
call fcn.140178f84
test al, al
jne 0x140178b31
mov rdx, qword [rbp - 0x50]
cmp rdx, 8
jb 0x140178c28
lea rdx, [rdx*2 + 2]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, rdi
jb 0x140178c23
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140178d95
call fcn.1403357a8
movdqa xmm0, xmmword [0x1403c41a0]
movdqu xmmword [rbp - 0x58], xmm0
mov word [rbp - 0x68], r15w
test rbx, rbx
je 0x140178570
mov rax, qword [rbp - 0x78]
sub rax, rbx
sar rax, 1
lea rdx, [rax + rax]
mov rax, rbx
cmp rdx, rdi
jb 0x140178567
add rdx, 0x27
mov rbx, qword [rbx - 8]
sub rax, rbx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x140178d62
jmp 0x140178567
cmp byte [rcx], r15b
jne 0x140178d25
lea rax, [rbp - 0x68]
cmp qword [rbp - 0x50], 8
cmovae rax, qword [rbp - 0x68]
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
mov rdx, qword [str.WinRing0_1_2_0]
mov r8, rdx
mov rcx, qword [rcx + 0x10]
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov rcx, rax
mov rax, qword [rsi]
mov qword [rax + 0x18], rcx
mov rax, qword [rsi]
mov rcx, qword [rax + 0x18]
test rcx, rcx
je 0x140178b80
xor r8d, r8d
xor edx, edx
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x140178d25
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x420
je 0x140178d25
mov rcx, qword [rsi]
call fcn.140178f84
jmp 0x140178b80
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], r14d
mov dword [rsp + 0x20], 3
xor r9d, r9d
xor r8d, r8d
mov edx, r12d
lea rcx, str..WinRing0_1_2_0
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rcx, rax
mov rax, qword [rsi]
mov qword [rax + 8], rcx
jmp 0x140178b80
call fcn.14033cba4
nop
call fcn.14033cba4
int3
call fcn.14033cba4
nop
lea r8, [rbp + 0x60]
lea rdx, [rbp + 0x40]
lea rcx, str.temp_directory_path
call fcn.1400859b0
nop
call fcn.14033cba4
nop
call fcn.14033cba4
int3
call fcn.14033cba4
nop
call fcn.14033cba4
int3