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

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r14
push r15
lea rbp, [rsp - 0x190]
sub rsp, 0x290
mov rax, qword [0x14007e4a8]
xor rax, rsp
mov qword [rbp + 0x180], rax
mov rsi, rdx
mov r14, rcx
lea rbx, [rcx + 0x28]
mov qword [rsp + 0x60], rbx
xor r15d, r15d
test rbx, rbx
je 0x1400106cd
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
nop
lea rdi, [r14 + 0x48]
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x1400106de
mov rdx, qword [rdi]
mov r8d, 1
lea rcx, [rsp + 0x30]
call fcn.14000e7bc
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x70]
call fcn.140021f80
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x14001070d
mov rdx, qword [rdi]
mov r8d, 0x104
lea rcx, [rsp + 0x70]
lea rax, [rsp + 0x70]
sub rdx, rax
lea rax, [r8 + 0x7ffffefa]
test rax, rax
je 0x140010742
movzx eax, word [rdx + rcx]
test ax, ax
je 0x140010742
mov word [rcx], ax
add rcx, 2
sub r8, 1
jne 0x140010720
lea rax, [rcx - 2]
test r8, r8
cmovne rax, rcx
mov word [rax], r15w
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, rsi
call qword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x14001081d
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x1400107a4
mov rcx, qword [rdi]
lea rsi, [r14 + 0x48]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1400107df
cmp qword [rsi + 0x18], 8
jb 0x1400107bc
mov rsi, qword [rsi]
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
mov r9d, 2
xor r8d, r8d
lea rdx, [rsp + 0x70]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_ReplaceFileW]
jmp 0x1400107f7
cmp qword [rsi + 0x18], 8
jb 0x1400107e9
mov rsi, qword [rsi]
mov rdx, rsi
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x14001088c
cmp qword [rdi + 0x18], 8
jb 0x140010809
mov rdi, qword [rdi]
mov r8d, 4
mov rdx, rdi
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
mov rcx, qword [rsp + 0x30]
cmp rcx, 0xffffffffffffffff
je 0x140010853
cmp dword [rsp + 0x38], r15d
je 0x14001084d
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]
mov edi, r15d
test rbx, rbx
je 0x140010864
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, edi
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.140020250
mov rbx, qword [rsp + 0x2d0]
add rsp, 0x290
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret
mov rcx, qword [rsp + 0x30]
cmp rcx, 0xffffffffffffffff
je 0x1400108c2
cmp dword [rsp + 0x38], r15d
je 0x1400108bc
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, r14
call fcn.14000fa8c
mov rcx, r14
call fcn.14000fee4
mov edi, eax
jmp 0x140010856