Function at 0x140019384
Capabilities:
Check if file exists
Delete file
Move file
Read file on windows
Write file on windows

Disassembly:
push rbp
push rbx
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x80]
sub rsp, 0x180
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov rax, qword [0x14016d608]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov rdi, r8
mov qword [rsp + 0x58], r8
mov r13, rdx
mov r14, rcx
lea rbx, [0x14016d090]
mov rcx, qword [0x14016d090]
cmp rcx, rbx
je 0x1400193fc
test byte [rcx + 0x1c], 1
je 0x1400193fc
cmp byte [rcx + 0x19], 4
jb 0x1400193fc
mov edx, 0xfe
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.140004968
mov rcx, qword [0x14016d090]
or rax, 0xffffffffffffffff
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x60], rax
and qword [rsp + 0x50], 0
xor al, al
mov dword [rsp + 0x40], eax
movups xmm0, xmmword [0x140156cf8]
movups xmmword [rsp + 0x78], xmm0
and dword [rsp + 0x48], 0
movq rax, xmm0
cmp qword [r13], rax
jne 0x140019476
mov rax, qword [r13 + 8]
cmp rax, qword [0x140156d00]
jne 0x140019476
cmp rcx, rbx
je 0x14001946c
test byte [rcx + 0x1c], 1
je 0x14001946c
cmp byte [rcx + 0x19], 2
jb 0x14001946c
mov edx, 0xff
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.140004968
mov rcx, qword [0x14016d090]
mov edi, 0x80070057
jmp 0x140019b5a
test byte [r14 + 0x154], 1
je 0x1400194a4
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, rdi
call fcn.14008290c
mov edi, eax
test eax, eax
js 0x140019b37
mov r15, qword [rsp + 0x50]
jmp 0x140019541
lea r8, [rsp + 0x50]
lea rdx, str.TempMediaId
mov rcx, qword [r14 + 0x248]
call fcn.1400829d8
mov edi, eax
test eax, eax
js 0x140019b37
mov r15, qword [rsp + 0x50]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x140019541
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 2
je 0x14001953a
mov rcx, qword [0x14016d090]
lea rax, [0x14016d090]
cmp rcx, rax
je 0x140019527
test byte [rcx + 0x1c], 1
je 0x140019527
cmp byte [rcx + 0x19], 2
jb 0x140019527
mov edx, 0x100
mov dword [rsp + 0x20], ebx
mov r9, r15
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.1400058c8
mov rcx, qword [0x14016d090]
movzx edi, bx
or edi, 0x80070000
test ebx, ebx
cmovle edi, ebx
jmp 0x140019a9c
lea rbx, [0x14016d090]
cmp dword [r14 + 0x150], 4
setne al
lea rcx, [rsp + 0x60]
mov qword [rsp + 0x38], rcx
mov byte [rsp + 0x30], al
mov dword [rsp + 0x20], 0x80
mov r9d, 2
xor r8d, r8d
mov edx, 0xc0000000
mov rcx, r15
call fcn.140086590
mov edi, eax
test eax, eax
jns 0x1400195c8
mov rcx, qword [0x14016d090]
cmp rcx, rbx
je 0x14001965b
test byte [rcx + 0x1c], 1
je 0x14001965b
cmp byte [rcx + 0x19], 2
jb 0x14001965b
mov edx, 0x101
mov dword [rsp + 0x20], eax
mov r9, r15
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.1400058c8
mov rbx, qword [rsp + 0x60]
jmp 0x140019a7f
mov r12d, dword [r14 + 0x154]
and r12d, 1
mov dword [rsp + 0x40], r12d
mov byte [rsp + 0x44], r12b
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, 0x10
mov rdx, r13
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140019665
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x14016d090]
lea rax, [0x14016d090]
cmp rcx, rax
je 0x14001964d
test byte [rcx + 0x1c], 1
je 0x14001964d
cmp byte [rcx + 0x19], 2
jb 0x14001964d
mov edx, 0x102
mov dword [rsp + 0x20], ebx
mov r9, r15
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.1400058c8
mov rcx, qword [0x14016d090]
movzx edi, bx
or edi, 0x80070000
test ebx, ebx
cmovle edi, ebx
mov rbx, qword [rsp + 0x60]
jmp 0x140019a86
mov r9d, dword [rsp + 0x48]
cmp r9d, 0x10
je 0x1400196c2
mov edi, 0x8007045d
mov rcx, qword [0x14016d090]
lea rax, [0x14016d090]
cmp rcx, rax
je 0x1400196b8
test byte [rcx + 0x1c], 1
je 0x1400196b8
cmp byte [rcx + 0x19], 2
jb 0x1400196b8
mov edx, 0x103
mov dword [rsp + 0x20], 0x10
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.14000f654
mov rcx, qword [0x14016d090]
mov dword [rsp + 0x40], r12d
jmp 0x140019a86
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x14001972f
call qword [sym.imp.ntdll.dll_RtlGetLastNtStatus]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x14016d090]
lea rax, [0x14016d090]
cmp rcx, rax
je 0x140019725
test byte [rcx + 0x1c], 1
je 0x140019725
cmp byte [rcx + 0x19], 2
jb 0x140019725
mov edx, 0x104
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], ebx
mov r9, r15
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.14000fd50
mov rcx, qword [0x14016d090]
mov dword [rsp + 0x40], r12d
jmp 0x14001964d
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or rbx, 0xffffffffffffffff
mov qword [rsp + 0x50], rbx
mov dword [rsp + 0x40], r12d
mov r12, qword [rsp + 0x58]
test byte [r14 + 0x154], 1
jne 0x1400197d9
lea r8d, [rbx + 2]
mov rdx, r12
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x1400197d3
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x14016d090]
lea rax, [0x14016d090]
cmp rcx, rax
je 0x1400197bc
test byte [rcx + 0x1c], 1
je 0x1400197bc
cmp byte [rcx + 0x19], 2
jb 0x1400197bc
mov edx, 0x105
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], r12
mov r9, r15
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.1400059f4
mov rcx, qword [0x14016d090]
movzx edi, bx
or edi, 0x80070000
test ebx, ebx
cmovle edi, ebx
mov al, byte [rsp + 0x44]
jmp 0x140019aa5
mov al, 1
mov dword [rsp + 0x40], eax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x38], rax
mov byte [rsp + 0x30], 0
mov dword [rsp + 0x20], 0x2000000
mov edx, 0x80000000
mov r9d, 3
lea r8d, [r9 - 2]
mov rcx, r12
call fcn.140086590
mov edi, eax
test eax, eax
jns 0x140019859
mov rcx, qword [0x14016d090]
lea rax, [0x14016d090]
cmp rcx, rax
je 0x140019a6c
test byte [rcx + 0x1c], 1
je 0x140019a6c
cmp byte [rcx + 0x19], 2
jb 0x140019a6c
mov edx, 0x106
mov dword [rsp + 0x20], edi
mov r9, r12
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.1400058c8
jmp 0x140019a65
and dword [rsp + 0x48], 0
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x48]
mov r8d, 0x10
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x1400198cc
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov rcx, qword [0x14016d090]
lea rax, [0x14016d090]
cmp rcx, rax
je 0x140019a6c
test byte [rcx + 0x1c], 1
je 0x140019a6c
cmp byte [rcx + 0x19], 2
jb 0x140019a6c
mov edx, 0x107
jmp 0x14001983d
cmp dword [rsp + 0x48], 0x10
jne 0x1400199eb
mov rax, qword [rsp + 0x78]
cmp rax, qword [r13]
jne 0x1400199eb
mov rax, qword [rbp - 0x80]
cmp rax, qword [r13 + 8]
jne 0x1400199eb
test byte [r14 + 0x154], 0x80
je 0x140019a65
cmp byte [r14 + 0x114], 0
je 0x140019a65
mov ecx, 0x40
call fcn.14013c810
mov qword [rsp + 0x60], rax
test rax, rax
je 0x140019931
mov rcx, rax
call fcn.140039c38
mov r12, rax
jmp 0x140019934
xor r12d, r12d
mov rdx, qword [rsp + 0x58]
mov rcx, r12
call fcn.140010780
mov edi, eax
test eax, eax
js 0x140019a65
mov r8d, 0x10
mov rdx, r13
mov rcx, r12
call fcn.140010a94
mov edi, eax
test eax, eax
jns 0x1400199aa
mov rcx, qword [0x14016d090]
lea rax, [0x14016d090]
cmp rcx, rax
je 0x140019a6c
test byte [rcx + 0x1c], 1
je 0x140019a6c
cmp byte [rcx + 0x19], 2
jb 0x140019a6c
mov edx, 0x109
mov r9d, edi
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.140004988
jmp 0x140019a65
lea rbx, [r14 + 0x308]
mov r14, qword [rbx + 8]
cmp r14, qword [rbx + 0x10]
jb 0x1400199d6
lea rdx, [r14 + 1]
mov rcx, rbx
call fcn.14000f060
test al, al
jne 0x1400199d6
mov ecx, 0x8007000e
call fcn.140001ae4
int3
mov rax, qword [rbx]
lea rcx, [rax + r14*8]
test rcx, rcx
je 0x1400199e5
mov qword [rcx], r12
inc qword [rbx + 8]
jmp 0x140019a60
mov edi, 0x8007045d
mov rcx, qword [0x14016d090]
lea rax, [0x14016d090]
cmp rcx, rax
je 0x140019a6c
test byte [rcx + 0x1c], 1
je 0x140019a6c
cmp byte [rcx + 0x19], 2
jb 0x140019a6c
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x70]
call fcn.14008264c
mov rbx, rax
mov rdx, r13
lea rcx, [rbp]
call fcn.14008264c
mov edx, 0x108
mov dword [rsp + 0x30], 0x10
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x10
mov r9, rax
lea r8, [0x140147170]
mov rcx, qword [0x14016d090]
mov rcx, qword [rcx + 0x10]
call fcn.14000fdd8
mov rbx, qword [rsp + 0x50]
mov rcx, qword [0x14016d090]
cmp qword [rsp + 0x68], 0xffffffffffffffff
je 0x140019a9c
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14016d090]
cmp rbx, 0xffffffffffffffff
je 0x140019a9c
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x14016d090]
mov r12, qword [rsp + 0x58]
mov eax, dword [rsp + 0x40]
test edi, edi
jns 0x140019b3e
test al, al
je 0x140019b3e
lea rbx, [0x14016d090]
cmp rcx, rbx
je 0x140019ae9
test byte [rcx + 0x1c], 1
je 0x140019ae9
cmp byte [rcx + 0x19], 4
jb 0x140019ae9
mov edx, 0x10a
mov dword [rsp + 0x20], edi
mov r9, r12
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.1400058c8
xor r8d, r8d
xor edx, edx
mov rcx, r12
call fcn.1400868e0
test eax, eax
jns 0x140019b2e
mov rcx, qword [0x14016d090]
cmp rcx, rbx
je 0x140019b45
test byte [rcx + 0x1c], 1
je 0x140019b45
cmp byte [rcx + 0x19], 2
jb 0x140019b45
mov edx, 0x10b
mov dword [rsp + 0x20], eax
mov r9, r12
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.1400058c8
mov rcx, qword [0x14016d090]
jmp 0x140019b45
mov r15, qword [rsp + 0x50]
jmp 0x140019b2e
lea rbx, [0x14016d090]
test r15, r15
je 0x140019b5a
mov rcx, r15
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x14016d090]
cmp rcx, rbx
je 0x140019b80
test byte [rcx + 0x1c], 1
je 0x140019b80
cmp byte [rcx + 0x19], 4
jb 0x140019b80
mov edx, 0x10c
lea r8, [0x140147170]
mov rcx, qword [rcx + 0x10]
call fcn.140004968
mov eax, edi
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.14013cc00
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret