Function at 0x140076604
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 [0x140150a10]
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 0x140076651
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
nop
lea rdi, [r14 + 0x48]
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140076662
mov rdx, qword [rdi]
mov r8d, 1
lea rcx, [rsp + 0x30]
call fcn.140075250
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x70]
call fcn.1400ae360
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140076691
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 0x1400766c6
movzx eax, word [rdx + rcx]
test ax, ax
je 0x1400766c6
mov word [rcx], ax
add rcx, 2
sub r8, 1
jne 0x1400766a4
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 0x1400767a1
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140076728
mov rcx, qword [rdi]
lea rsi, [r14 + 0x48]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x140076763
cmp qword [rsi + 0x18], 8
jb 0x140076740
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 0x14007677b
cmp qword [rsi + 0x18], 8
jb 0x14007676d
mov rsi, qword [rsi]
mov rdx, rsi
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x140076810
cmp qword [rdi + 0x18], 8
jb 0x14007678d
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 0x1400767d7
cmp dword [rsp + 0x38], r15d
je 0x1400767d1
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 0x1400767e8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, edi
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.1400ab6c0
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 0x140076846
cmp dword [rsp + 0x38], r15d
je 0x140076840
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.1400759b4
mov rcx, r14
call fcn.140075e1c
mov edi, eax
jmp 0x1400767da