Function at 0x14003d8e8
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 - 0x70]
sub rsp, 0x170
mov rax, qword [0x140173708]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov r14, r8
mov qword [rsp + 0x60], r8
mov r13, rdx
mov rbx, rcx
lea r8, [0x140173048]
mov rcx, qword [0x140173048]
cmp rcx, r8
je 0x14003d95e
test byte [rcx + 0x1c], 1
je 0x14003d95e
cmp byte [rcx + 0x19], 4
jb 0x14003d95e
mov edx, 0xfe
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.14000c328
mov rcx, qword [0x140173048]
lea r8, [0x140173048]
or rax, 0xffffffffffffffff
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x48], rax
and qword [rsp + 0x50], 0
xor r15b, r15b
movups xmm0, xmmword [0x14014fdf0]
movdqu xmmword [rsp + 0x68], xmm0
and dword [rsp + 0x40], 0
mov rdx, qword [r13]
movq rax, xmm0
sub rdx, rax
jne 0x14003d9a0
mov rdx, qword [r13 + 8]
sub rdx, qword [0x14014fdf8]
test rdx, rdx
jne 0x14003d9dc
cmp rcx, r8
je 0x14003d9d2
test byte [rcx + 0x1c], 1
je 0x14003d9d2
cmp byte [rcx + 0x19], 2
jb 0x14003d9d2
mov edx, 0xff
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.14000c328
mov rcx, qword [0x140173048]
mov edi, 0x80070057
jmp 0x14003e0f8
test byte [rbx + 0x154], 1
je 0x14003da99
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, r14
call fcn.140091bf0
mov edi, eax
test eax, eax
js 0x14003e0d1
mov r12, qword [rsp + 0x50]
cmp dword [rbx + 0x150], 4
setne al
lea rcx, [rsp + 0x48]
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, r12
call fcn.1400980b4
mov edi, eax
test eax, eax
jns 0x14003db46
mov rcx, qword [0x140173048]
lea rbx, [0x140173048]
cmp rcx, rbx
je 0x14003dbda
test byte [rcx + 0x1c], 1
je 0x14003dbda
cmp byte [rcx + 0x19], 2
jb 0x14003dbda
mov edx, 0x101
mov dword [rsp + 0x20], eax
mov r9, r12
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.1400151b8
mov rax, qword [rsp + 0x48]
jmp 0x14003e023
lea r8, [rsp + 0x50]
lea rdx, str.TempMediaId
mov rcx, qword [rbx + 0x248]
call fcn.140091810
mov edi, eax
test eax, eax
js 0x14003e0d1
mov r12, qword [rsp + 0x50]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop dword [rax + rax]
test eax, eax
jne 0x14003da08
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
cmp eax, 2
je 0x14003da08
mov rcx, qword [0x140173048]
lea rbx, [0x140173048]
cmp rcx, rbx
je 0x14003db30
test byte [rcx + 0x1c], 1
je 0x14003db30
cmp byte [rcx + 0x19], 2
jb 0x14003db30
mov edx, 0x100
mov dword [rsp + 0x20], eax
mov r9, r12
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.14003fe00
mov rcx, qword [0x140173048]
test edi, edi
jle 0x14003e048
movzx edi, di
or edi, 0x80070000
jmp 0x14003e046
mov r15b, byte [rbx + 0x154]
and r15b, 1
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, 0x10
mov rdx, r13
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
nop dword [rax + rax]
test eax, eax
jne 0x14003dbe4
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x140173048]
lea rbx, [0x140173048]
cmp rcx, rbx
je 0x14003dbcd
test byte [rcx + 0x1c], 1
je 0x14003dbcd
cmp byte [rcx + 0x19], 2
jb 0x14003dbcd
mov edx, 0x102
mov dword [rsp + 0x20], eax
mov r9, r12
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.14003fe00
mov rcx, qword [0x140173048]
test edi, edi
jle 0x14003dbda
movzx edi, di
or edi, 0x80070000
mov rax, qword [rsp + 0x48]
jmp 0x14003e02a
mov r9d, dword [rsp + 0x40]
cmp r9d, 0x10
je 0x14003dc39
mov edi, 0x8007045d
mov rcx, qword [0x140173048]
lea rbx, [0x140173048]
cmp rcx, rbx
je 0x14003dbda
test byte [rcx + 0x1c], 1
je 0x14003dbda
cmp byte [rcx + 0x19], 2
jb 0x14003dbda
mov edx, 0x103
mov dword [rsp + 0x20], 0x10
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.14003f990
mov rcx, qword [0x140173048]
jmp 0x14003dbda
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
nop dword [rax + rax]
test eax, eax
jne 0x14003dcd0
call qword [sym.imp.ntdll.dll_RtlGetLastNtStatus]
nop dword [rax + rax]
mov ebx, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x140173048]
lea rax, [0x140173048]
cmp rcx, rax
je 0x14003dcb2
test byte [rcx + 0x1c], 1
je 0x14003dcb2
cmp byte [rcx + 0x19], 2
jb 0x14003dcb2
mov edx, 0x104
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], edi
mov r9, r12
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.14003fff4
mov rcx, qword [0x140173048]
test edi, edi
jle 0x14003dcbf
movzx edi, di
or edi, 0x80070000
mov rax, qword [rsp + 0x48]
lea rbx, [0x140173048]
jmp 0x14003e02a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
or qword [rsp + 0x50], 0xffffffffffffffff
test byte [rbx + 0x154], 1
jne 0x14003dd6c
mov r8d, 1
mov rdx, r14
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
nop dword [rax + rax]
test eax, eax
jne 0x14003dd69
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x140173048]
lea rbx, [0x140173048]
cmp rcx, rbx
je 0x14003db30
test byte [rcx + 0x1c], 1
je 0x14003db30
cmp byte [rcx + 0x19], 2
jb 0x14003db30
mov edx, 0x105
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
mov r9, r12
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.1400152ec
jmp 0x14003db29
mov r15b, 1
lea rax, [rsp + 0x58]
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, r14
call fcn.1400980b4
mov edi, eax
test eax, eax
jns 0x14003ddec
mov rcx, qword [0x140173048]
lea rbx, [0x140173048]
cmp rcx, rbx
je 0x14003e005
test byte [rcx + 0x1c], 1
je 0x14003e005
cmp byte [rcx + 0x19], 2
jb 0x14003e005
mov edx, 0x106
mov dword [rsp + 0x20], eax
mov r9, r14
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.1400151b8
jmp 0x14003dffe
and dword [rsp + 0x40], 0
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, 0x10
lea rdx, [rsp + 0x68]
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_ReadFile]
nop dword [rax + rax]
test eax, eax
jne 0x14003de70
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jle 0x14003de37
movzx edi, ax
or edi, 0x80070000
mov rcx, qword [0x140173048]
lea rbx, [0x140173048]
cmp rcx, rbx
je 0x14003e005
test byte [rcx + 0x1c], 1
je 0x14003e005
cmp byte [rcx + 0x19], 2
jb 0x14003e005
mov edx, 0x107
mov dword [rsp + 0x20], edi
jmp 0x14003ddd4
cmp dword [rsp + 0x40], 0x10
jne 0x14003df82
mov rax, qword [rsp + 0x68]
sub rax, qword [r13]
jne 0x14003de8f
mov rax, qword [rsp + 0x70]
sub rax, qword [r13 + 8]
test rax, rax
jne 0x14003df82
test byte [rbx + 0x154], 0x80
je 0x14003dff7
cmp byte [rbx + 0x114], al
je 0x14003dff7
lea ecx, [rax + 0x40]
call fcn.140006fcc
mov qword [rsp + 0x48], rax
test rax, rax
je 0x14003ded0
mov rcx, rax
call fcn.1400157ec
mov r14, rax
jmp 0x14003ded3
xor r14d, r14d
mov rdx, qword [rsp + 0x60]
mov rcx, r14
call fcn.14002b260
mov edi, eax
test eax, eax
js 0x14003dff7
mov r8d, 0x10
mov rdx, r13
mov rcx, r14
call fcn.140037ee0
mov edi, eax
test eax, eax
jns 0x14003df49
mov rcx, qword [0x140173048]
lea rbx, [0x140173048]
cmp rcx, rbx
je 0x14003e005
test byte [rcx + 0x1c], 1
je 0x14003e005
cmp byte [rcx + 0x19], 2
jb 0x14003e005
mov edx, 0x109
mov r9d, eax
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.14000c354
jmp 0x14003dffe
add rbx, 0x308
mov r13, qword [rbx + 8]
cmp r13, qword [rbx + 0x10]
jb 0x14003df75
lea rdx, [r13 + 1]
mov rcx, rbx
call fcn.1400109ec
test al, al
jne 0x14003df75
mov ecx, 0x8007000e
call fcn.140008e64
int3
mov rax, qword [rbx]
mov qword [rax + r13*8], r14
inc qword [rbx + 8]
jmp 0x14003dff7
mov edi, 0x8007045d
mov rcx, qword [0x140173048]
lea rbx, [0x140173048]
cmp rcx, rbx
je 0x14003e005
test byte [rcx + 0x1c], 1
je 0x14003e005
cmp byte [rcx + 0x19], 2
jb 0x14003e005
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x80]
call fcn.140091318
mov rbx, rax
mov rdx, r13
lea rcx, [rbp - 0x10]
call fcn.140091318
mov edx, 0x108
mov dword [rsp + 0x30], 0x10
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x10
mov r9, rax
lea r8, [0x1401529e0]
mov rcx, qword [0x140173048]
mov rcx, qword [rcx + 0x10]
call fcn.14003ff10
lea rbx, [0x140173048]
mov rcx, qword [0x140173048]
cmp qword [rsp + 0x58], 0xffffffffffffffff
je 0x14003e046
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rax, qword [rsp + 0x50]
mov rcx, qword [0x140173048]
cmp rax, 0xffffffffffffffff
je 0x14003e046
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, qword [0x140173048]
test edi, edi
jns 0x14003e0dd
test r15b, r15b
je 0x14003e0dd
cmp rcx, rbx
je 0x14003e086
test byte [rcx + 0x1c], 1
je 0x14003e086
cmp byte [rcx + 0x19], 4
jb 0x14003e086
mov edx, 0x10a
mov dword [rsp + 0x20], edi
mov r9, qword [rsp + 0x60]
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.1400151b8
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x60]
call fcn.1400960a8
test eax, eax
jns 0x14003e0d6
mov rcx, qword [0x140173048]
cmp rcx, rbx
je 0x14003e0dd
test byte [rcx + 0x1c], 1
je 0x14003e0dd
cmp byte [rcx + 0x19], 2
jb 0x14003e0dd
mov edx, 0x10b
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x60]
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.1400151b8
jmp 0x14003e0d6
mov r12, qword [rsp + 0x50]
mov rcx, qword [0x140173048]
test r12, r12
je 0x14003e0f8
mov rcx, r12
call qword [sym.imp.ole32.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rcx, qword [0x140173048]
lea rax, [0x140173048]
cmp rcx, rax
je 0x14003e125
test byte [rcx + 0x1c], 1
je 0x14003e125
cmp byte [rcx + 0x19], 4
jb 0x14003e125
mov edx, 0x10c
lea r8, [0x1401529e0]
mov rcx, qword [rcx + 0x10]
call fcn.14000c328
mov eax, edi
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.140007410
add rsp, 0x170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret