Function at 0x140243f4c
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 [0x14035dc30]
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 0x140243f99
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_AcquireSRWLockExclusive]
nop
lea rdi, [r14 + 0x48]
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140243faa
mov rdx, qword [rdi]
mov r8d, 1
lea rcx, [rsp + 0x30]
call fcn.140242b94
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x70]
call fcn.14026c200
mov rdx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140243fd9
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 0x14024400e
movzx eax, word [rdx + rcx]
test ax, ax
je 0x14024400e
mov word [rcx], ax
add rcx, 2
sub r8, 1
jne 0x140243fec
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 0x1402440e9
mov rcx, rdi
cmp qword [rdi + 0x18], 8
jb 0x140244070
mov rcx, qword [rdi]
lea rsi, [r14 + 0x48]
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x1402440ab
cmp qword [rsi + 0x18], 8
jb 0x140244088
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 0x1402440c3
cmp qword [rsi + 0x18], 8
jb 0x1402440b5
mov rsi, qword [rsi]
mov rdx, rsi
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_MoveFileW]
test eax, eax
jne 0x140244158
cmp qword [rdi + 0x18], 8
jb 0x1402440d5
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 0x14024411f
cmp dword [rsp + 0x38], r15d
je 0x140244119
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 0x140244130
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_ReleaseSRWLockExclusive]
mov eax, edi
mov rcx, qword [rbp + 0x180]
xor rcx, rsp
call fcn.140269300
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 0x14024418e
cmp dword [rsp + 0x38], r15d
je 0x140244188
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.1402432fc
mov rcx, r14
call fcn.140243764
mov edi, eax
jmp 0x140244122