Function at 0x140019770
Capabilities:
Check if file exists
Copy file
Create directory
Move file

Disassembly:
mov rax, rsp
push rbp
push rdi
push r14
lea rbp, [rax - 0x1a8]
sub rsp, 0x290
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rax + 0x18], rbx
mov qword [rax + 0x20], rsi
mov rax, qword [0x14007d370]
xor rax, rsp
mov qword [rbp + 0x180], rax
mov r14, rdx
mov rsi, rcx
lea rbx, [rcx + 0x28]
mov qword [rsp + 0x68], rbx
test rbx, rbx
je 0x1400197c5
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
nop
lea rdi, [rsi + 0x48]
cmp qword [rdi + 0x18], 8
jb 0x1400197d5
mov rdx, qword [rdi]
jmp 0x1400197d8
mov rdx, rdi
mov r8d, 1
lea rcx, [rsp + 0x30]
call fcn.140017c10
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x70]
call fcn.140022cd0
cmp qword [rdi + 0x18], 8
jb 0x140019806
mov r8, qword [rdi]
jmp 0x140019809
mov r8, rdi
mov edx, 0x104
lea rcx, [rsp + 0x70]
call fcn.1400196f8
lea rcx, [rsp + 0x70]
call qword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
xor r8d, r8d
lea rdx, [rsp + 0x70]
xor ecx, ecx
call qword [sym.imp.SHELL32.dll_SHCreateDirectoryExW]
lea rdx, str.trusted.tmp
lea rcx, [rsp + 0x70]
call qword [sym.imp.SHLWAPI.dll_PathAppendW]
xor r8d, r8d
lea rdx, [rsp + 0x70]
mov rcx, r14
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x14001993d
cmp qword [rdi + 0x18], 8
jb 0x14001986a
mov rcx, qword [rdi]
jmp 0x14001986d
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1400198a8
cmp qword [rdi + 0x18], 8
jb 0x140019883
mov rcx, qword [rdi]
jmp 0x140019886
mov rcx, rdi
and qword [rsp + 0x28], 0
and qword [rsp + 0x20], 0
mov r9d, 2
xor r8d, r8d
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_ReplaceFileW]
jmp 0x1400198c2
cmp qword [rdi + 0x18], 8
jb 0x1400198b4
mov rdx, qword [rdi]
jmp 0x1400198b7
mov rdx, rdi
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x1400198e6
cmp qword [rdi + 0x18], 8
jb 0x1400198d0
mov rdi, qword [rdi]
mov r8d, 4
mov rdx, rdi
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
jmp 0x14001993d
mov rcx, qword [rsp + 0x30]
cmp rcx, 0xffffffffffffffff
je 0x14001991c
cmp dword [rsp + 0x38], 0
je 0x140019916
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
or r8d, 0xffffffff
mov r9d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_UnlockFileEx]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, str.67136527_5D6B_4AC9_865B_3E392E982420
call qword [sym.imp.KERNEL32.dll_GlobalAddAtomW]
mov rcx, rsi
call fcn.140018e34
mov rcx, rsi
call fcn.140019188
mov edi, eax
jmp 0x140019975
mov rcx, qword [rsp + 0x30]
cmp rcx, 0xffffffffffffffff
je 0x140019973
cmp dword [rsp + 0x38], 0
je 0x14001996d
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
or r8d, 0xffffffff
mov r9d, r8d
xor edx, edx
call qword [sym.imp.KERNEL32.dll_UnlockFileEx]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
test rbx, rbx
je 0x140019983
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, edi
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.140021430
lea r11, [rsp + 0x290]
mov rbx, qword [r11 + 0x30]
mov rsi, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop rdi
pop rbp
ret