Function at 0x180049690
Capabilities:
Check if file exists
Copy file
Create service
Delete file
Get common file path
Persist via windows service

Disassembly:
mov r11, rsp
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x370
mov qword [rsp + 0xa0], 0xfffffffffffffffe
mov qword [r11 + 8], rbx
mov rax, qword [0x180097090]
xor rax, rsp
mov qword [rsp + 0x360], rax
mov rbx, r8
mov rdi, rdx
xor r13d, r13d
mov dword [rsp + 0x70], r13d
mov edx, 0x22343
lea rcx, [r11 - 0x288]
call fcn.180049490
nop
cmp qword [rsp + 0x138], r13
jne 0x180049713
cmp qword [rsp + 0x140], 8
jb 0x180049709
mov rcx, qword [rsp + 0x128]
call fcn.1800538dc
mov eax, 1
jmp 0x180049d3b
mov word [rsp + 0x150], r13w
xor edx, edx
mov r8d, 0x206
lea rcx, [rsp + 0x152]
call fcn.1800575a0
mov r12d, r13d
mov edx, 0x104
lea rcx, [rsp + 0x150]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea rdx, str.drivers
lea rcx, [rsp + 0x150]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
lea rcx, [rsp + 0x150]
call fcn.180049598
mov rdx, rbx
lea rcx, [rsp + 0x150]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
xor r8d, r8d
lea rdx, [rsp + 0x150]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CopyFileW]
cmp eax, r13d
jne 0x18004979d
mov edi, 8
jmp 0x180049d21
lea rcx, [rsp + 0x150]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
mov ebx, 1
lea r15, str.gxdte
cmp eax, r13d
je 0x180049858
lea rcx, [rsp + 0x150]
call qword [sym.imp.SHLWAPI.dll_PathFindExtensionW]
xor edx, edx
xor ecx, ecx
mov r8d, 0xf003f
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rsi, rax
cmp rax, r13
je 0x180049858
mov qword [rsp + 0x60], r13
mov qword [rsp + 0x58], r13
mov qword [rsp + 0x50], r13
mov qword [rsp + 0x48], r13
mov qword [rsp + 0x40], r13
lea rax, [rsp + 0x150]
mov qword [rsp + 0x38], rax
mov dword [rsp + 0x30], ebx
mov dword [rsp + 0x28], 3
mov dword [rsp + 0x20], 2
mov r9d, 0xf01ff
mov r8, r15
mov rdx, r15
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, r13d
cmp rax, r13
setne dil
cmp rax, r13
je 0x18004984d
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rsi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x18004985b
mov edi, r13d
cmp edi, r13d
jne 0x18004986a
mov edi, 0xa
jmp 0x180049d05
mov r12d, ebx
mov rdx, r15
lea rcx, [rsp + 0xd0]
call fcn.18004952c
nop
lea r9, [rsp + 0x128]
cmp qword [rsp + 0x140], 8
cmovae r9, qword [rsp + 0x128]
lea rdx, [rsp + 0xd8]
cmp qword [rsp + 0xf0], 8
cmovae rdx, qword [rsp + 0xd8]
mov dword [rsp + 0x20], r13d
lea r8, str.Group
mov rbp, 0xffffffff80000002
mov rcx, rbp
call fcn.18002972c
cmp eax, r13d
je 0x180049ce8
lea rdx, [rsp + 0xd8]
cmp qword [rsp + 0xf0], 8
cmovae rdx, qword [rsp + 0xd8]
mov dword [rsp + 0x20], r13d
lea r9, str.gxdte_driver
lea r8, str.Description
mov rcx, rbp
call fcn.18002972c
cmp eax, r13d
je 0x180049ce8
mov r14d, 7
mov qword [rsp + 0x98], r14
mov qword [rsp + 0x90], r13
mov word [rsp + 0x80], r13w
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, r15
repne scasw ax, word [rdi]
not rcx
sub rcx, rbx
mov r8, rcx
mov rdx, r15
lea rcx, [rsp + 0x78]
call fcn.18000d5e0
nop
lea r8, str._Instance
lea rdx, [rsp + 0x78]
lea rcx, [rsp + 0xf8]
call fcn.18002c080
nop
cmp qword [rsp + 0x98], 8
jb 0x180049988
mov rcx, qword [rsp + 0x80]
call fcn.1800538dc
mov qword [rsp + 0x98], r14
mov qword [rsp + 0x90], r13
mov word [rsp + 0x80], r13w
lea rax, [rsp + 0xd8]
mov rdx, qword [rsp + 0xd8]
mov rdi, qword [rsp + 0xf0]
cmp rdi, 8
cmovae rax, rdx
lea rsi, str.Instances_
mov rcx, qword [rsp + 0xe8]
cmp rsi, rax
jb 0x180049a29
lea rax, [rsp + 0xd8]
cmp rdi, 8
cmovae rax, rdx
lea rax, [rax + rcx*2]
cmp rax, rsi
jbe 0x180049a29
lea rax, [rsp + 0xd8]
cmp rdi, 8
cmovae rax, rdx
sub rsi, rax
sar rsi, 1
mov edi, 0xb
mov r9, rdi
mov r8, rsi
lea rdx, [rsp + 0xd0]
lea rcx, [rsp + 0xd0]
call fcn.18000d3a0
jmp 0x180049ae0
or rax, 0xffffffffffffffff
sub rax, rcx
mov edi, 0xb
cmp rax, rdi
jbe 0x180049a43
lea rax, [rcx + 0xb]
cmp rax, rcx
jae 0x180049a50
call fcn.180052c48
mov rcx, qword [rsp + 0xe8]
lea rbp, [rcx + 0xb]
xor r8d, r8d
mov rdx, rbp
lea rcx, [rsp + 0xd0]
call fcn.18000d7b0
cmp al, r13b
je 0x180049ad9
lea rcx, [rsp + 0xd8]
mov rdx, qword [rsp + 0xf0]
cmp rdx, 8
cmovae rcx, qword [rsp + 0xd8]
mov rax, qword [rsp + 0xe8]
sub rdx, rax
lea rcx, [rcx + rax*2]
add rdx, rdx
mov r9d, socket
mov r8, rsi
call fcn.1800538e4
mov qword [rsp + 0xe8], rbp
lea rax, [rsp + 0xd8]
cmp qword [rsp + 0xf0], 8
cmovae rax, qword [rsp + 0xd8]
mov word [rax + rbp*2], r13w
mov rbp, 0xffffffff80000002
jmp 0x180049ae0
mov rbp, 0xffffffff80000002
lea r9, [rsp + 0x100]
cmp qword [rsp + 0x118], 8
cmovae r9, qword [rsp + 0x100]
lea rdx, [rsp + 0xd8]
cmp qword [rsp + 0xf0], 8
cmovae rdx, qword [rsp + 0xd8]
mov dword [rsp + 0x20], r13d
lea r8, str.DefaultInstance
mov rcx, rbp
call fcn.18002972c
cmp eax, r13d
jne 0x180049b7f
cmp qword [rsp + 0x118], 8
jb 0x180049b45
mov rcx, qword [rsp + 0x100]
call fcn.1800538dc
mov qword [rsp + 0x118], r14
mov qword [rsp + 0x110], r13
mov word [rsp + 0x100], r13w
cmp qword [rsp + 0xf0], 8
jb 0x180049d05
mov rcx, qword [rsp + 0xd8]
call fcn.1800538dc
jmp 0x180049d05
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rsp + 0xf8]
lea rcx, [rsp + 0xd0]
call fcn.18000d3a0
mov r8d, 0x22343
lea rdx, [0x18007e51c]
lea rcx, [rsp + 0xa8]
call fcn.1800295a4
cmp qword [rax + 0x20], 8
jb 0x180049bc2
mov r9, qword [rax + 8]
jmp 0x180049bc6
lea r9, [rax + 8]
lea rdx, [rsp + 0xd8]
cmp qword [rsp + 0xf0], 8
cmovae rdx, qword [rsp + 0xd8]
mov dword [rsp + 0x20], r13d
lea r8, str.Altitude
mov rcx, rbp
call fcn.18002972c
cmp eax, r13d
je 0x180049c32
lea rdx, [rsp + 0xd8]
cmp qword [rsp + 0xf0], 8
cmovae rdx, qword [rsp + 0xd8]
mov dword [rsp + 0x20], r13d
xor r9d, r9d
lea r8, str.Flags
mov rcx, rbp
call fcn.1800296f4
cmp eax, r13d
je 0x180049c32
mov bl, r13b
cmp qword [rsp + 0xc8], 8
jb 0x180049c4a
mov rcx, qword [rsp + 0xb0]
call fcn.1800538dc
cmp bl, r13b
je 0x180049c9a
cmp qword [rsp + 0x118], 8
jb 0x180049c67
mov rcx, qword [rsp + 0x100]
call fcn.1800538dc
mov qword [rsp + 0x118], r14
mov qword [rsp + 0x110], r13
mov word [rsp + 0x100], r13w
cmp qword [rsp + 0xf0], 8
jb 0x180049d05
mov rcx, qword [rsp + 0xd8]
call fcn.1800538dc
jmp 0x180049d05
mov edi, r13d
cmp qword [rsp + 0x118], 8
jb 0x180049cb5
mov rcx, qword [rsp + 0x100]
call fcn.1800538dc
mov qword [rsp + 0x118], r14
mov qword [rsp + 0x110], r13
mov word [rsp + 0x100], r13w
cmp qword [rsp + 0xf0], 8
jb 0x180049d21
mov rcx, qword [rsp + 0xd8]
call fcn.1800538dc
jmp 0x180049d21
mov edi, 0xb
cmp qword [rsp + 0xf0], 8
jb 0x180049d05
mov rcx, qword [rsp + 0xd8]
call fcn.1800538dc
lea rcx, [rsp + 0x150]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
cmp r12d, r13d
je 0x180049d21
mov rcx, r15
call fcn.180029cac
nop
cmp qword [rsp + 0x140], 8
jb 0x180049d39
mov rcx, qword [rsp + 0x128]
call fcn.1800538dc
mov eax, edi
mov rcx, qword [rsp + 0x360]
xor rcx, rsp
call fcn.180052d60
mov rbx, qword [rsp + 0x3b0]
add rsp, 0x370
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret