Function at 0x140019f08
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 [0x140172608]
xor rax, rsp
mov qword [rbp + 0x70], rax
mov rbx, r8
mov qword [rsp + 0x50], rbx
mov r13, rdx
mov r14, rcx
lea rdx, [0x1401720a0]
mov r15d, 1
mov rcx, qword [0x1401720a0]
cmp rcx, rdx
je 0x140019f8d
test byte [rcx + 0x1c], r15b
je 0x140019f8d
cmp byte [rcx + 0x19], 4
jb 0x140019f8d
mov edx, 0xfe
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140004b74
mov rcx, qword [0x1401720a0]
lea rdx, [0x1401720a0]
or rax, 0xffffffffffffffff
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x48], rax
and qword [rsp + 0x60], 0
xor r12b, r12b
mov dword [rsp + 0x58], r12d
movups xmm0, xmmword [0x140154f60]
movups xmmword [rsp + 0x78], xmm0
and dword [rsp + 0x40], 0
movq rax, xmm0
cmp qword [r13], rax
jne 0x14001a009
mov rax, qword [r13 + 8]
cmp rax, qword [0x140154f68]
jne 0x14001a009
cmp rcx, rdx
je 0x140019fff
test byte [rcx + 0x1c], r15b
je 0x140019fff
cmp byte [rcx + 0x19], 2
jb 0x140019fff
mov edx, 0xff
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140004b74
mov rcx, qword [0x1401720a0]
mov edi, 0x80070057
jmp 0x14001a741
test byte [r14 + 0x154], r15b
je 0x14001a036
xor r8d, r8d
lea rdx, [rsp + 0x60]
mov rcx, rbx
call fcn.140084ef8
mov edi, eax
test eax, eax
js 0x14001a71a
mov r15, qword [rsp + 0x60]
jmp 0x14001a0db
lea r8, [rsp + 0x60]
lea rdx, str.TempMediaId
mov rcx, qword [r14 + 0x248]
call fcn.140084fcc
mov edi, eax
test eax, eax
js 0x14001a71a
mov r15, qword [rsp + 0x60]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x14001a0db
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
cmp eax, 2
je 0x14001a0d6
mov rcx, qword [0x1401720a0]
lea r13, [0x1401720a0]
cmp rcx, r13
je 0x14001a0bd
mov eax, 1
test byte [rcx + 0x1c], al
je 0x14001a0bd
cmp byte [rcx + 0x19], 2
jb 0x14001a0bd
mov edx, 0x100
mov dword [rsp + 0x20], ebx
mov r9, r15
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140005b60
mov rcx, qword [0x1401720a0]
movzx edi, bx
or edi, 0x80070000
test ebx, ebx
cmovle edi, ebx
mov r12d, 1
jmp 0x14001a68e
mov rbx, qword [rsp + 0x50]
cmp dword [r14 + 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, r15
call fcn.140088c94
mov edi, eax
test eax, eax
jns 0x14001a16f
mov rcx, qword [0x1401720a0]
lea r13, [0x1401720a0]
cmp rcx, r13
je 0x14001a66d
mov eax, 1
test byte [rcx + 0x1c], al
je 0x14001a66d
cmp byte [rcx + 0x19], 2
jb 0x14001a66d
mov edx, 0x101
mov dword [rsp + 0x20], edi
mov r9, r15
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140005b60
mov rcx, qword [0x1401720a0]
jmp 0x14001a66d
mov eax, 1
test byte [r14 + 0x154], al
movzx r12d, r12b
cmovne r12d, eax
mov dword [rsp + 0x58], r12d
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
lea r8d, [rax + 0xf]
mov rdx, r13
mov rdi, qword [rsp + 0x48]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x14001a20d
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x1401720a0]
lea r13, [0x1401720a0]
cmp rcx, r13
je 0x14001a1fa
mov eax, 1
test byte [rcx + 0x1c], al
je 0x14001a1fa
cmp byte [rcx + 0x19], 2
jb 0x14001a1fa
mov edx, 0x102
mov dword [rsp + 0x20], ebx
mov r9, r15
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140005b60
mov rcx, qword [0x1401720a0]
movzx edi, bx
or edi, 0x80070000
test ebx, ebx
cmovle edi, ebx
jmp 0x14001a66d
mov r9d, dword [rsp + 0x40]
cmp r9d, 0x10
je 0x14001a277
mov edi, 0x8007045d
mov rcx, qword [0x1401720a0]
lea r13, [0x1401720a0]
cmp rcx, r13
je 0x14001a66d
mov r12d, 1
test byte [rcx + 0x1c], r12b
je 0x14001a673
cmp byte [rcx + 0x19], 2
jb 0x14001a673
mov edx, 0x103
mov dword [rsp + 0x20], 0x10
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.14000ffdc
mov rcx, qword [0x1401720a0]
jmp 0x14001a673
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
test eax, eax
jne 0x14001a2f3
call qword [sym.imp.ntdll.dll_RtlGetLastNtStatus]
mov edi, eax
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x1401720a0]
lea r13, [0x1401720a0]
mov r12d, 1
cmp rcx, r13
je 0x14001a2e0
test byte [rcx + 0x1c], r12b
je 0x14001a2e0
cmp byte [rcx + 0x19], 2
jb 0x14001a2e0
mov edx, 0x104
mov dword [rsp + 0x28], edi
mov dword [rsp + 0x20], eax
mov r9, r15
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140010730
mov rcx, qword [0x1401720a0]
movzx edi, bx
or edi, 0x80070000
test ebx, ebx
cmovle edi, ebx
jmp 0x14001a673
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
or qword [rsp + 0x60], 0xffffffffffffffff
mov r12d, 1
test byte [r14 + 0x154], r12b
jne 0x14001a39b
mov r8d, r12d
mov rdx, rbx
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
test eax, eax
jne 0x14001a396
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov rcx, qword [0x1401720a0]
lea r13, [0x1401720a0]
cmp rcx, r13
je 0x14001a37e
test byte [rcx + 0x1c], r12b
je 0x14001a37e
mov r14, qword [rsp + 0x50]
cmp byte [rcx + 0x19], 2
jb 0x14001a383
mov edx, 0x105
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
mov r9, r15
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140005c9c
mov rcx, qword [0x1401720a0]
jmp 0x14001a383
mov r14, qword [rsp + 0x50]
movzx edi, bx
or edi, 0x80070000
test ebx, ebx
cmovle edi, ebx
jmp 0x14001a693
mov byte [rsp + 0x58], r12b
lea rax, [rsp + 0x68]
mov qword [rsp + 0x38], rax
mov byte [rsp + 0x30], 0
mov dword [rsp + 0x20], 0x2000000
mov r9d, 3
mov r8d, r12d
mov edx, 0x80000000
mov rcx, rbx
call fcn.140088c94
mov edi, eax
test eax, eax
jns 0x14001a421
mov rcx, qword [0x1401720a0]
lea r13, [0x1401720a0]
cmp rcx, r13
je 0x14001a64c
test byte [rcx + 0x1c], r12b
je 0x14001a64c
cmp byte [rcx + 0x19], 2
jb 0x14001a64c
mov edx, 0x106
mov dword [rsp + 0x20], eax
mov r9, rbx
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140005b60
mov rcx, qword [0x1401720a0]
jmp 0x14001a64c
and dword [rsp + 0x40], 0
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
mov r8d, 0x10
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x14001a498
call qword [sym.imp.KERNEL32.dll_GetLastError]
movzx edi, ax
or edi, 0x80070000
test eax, eax
cmovle edi, eax
mov rcx, qword [0x1401720a0]
lea r13, [0x1401720a0]
cmp rcx, r13
je 0x14001a64c
test byte [rcx + 0x1c], r12b
je 0x14001a64c
cmp byte [rcx + 0x19], 2
jb 0x14001a64c
mov edx, 0x107
mov dword [rsp + 0x20], edi
jmp 0x14001a402
cmp dword [rsp + 0x40], 0x10
jne 0x14001a5c9
mov rax, qword [rsp + 0x78]
cmp rax, qword [r13]
jne 0x14001a5c9
mov rax, qword [rbp - 0x80]
cmp rax, qword [r13 + 8]
jne 0x14001a5c9
test byte [r14 + 0x154], 0x80
je 0x14001a63e
cmp byte [r14 + 0x114], 0
je 0x14001a63e
mov ecx, 0x40
call fcn.1401418e0
mov qword [rsp + 0x48], rax
test rax, rax
je 0x14001a4fd
mov rcx, rax
call fcn.14003adec
mov r12, rax
jmp 0x14001a500
xor r12d, r12d
mov rdx, rbx
mov rcx, r12
call fcn.1400111cc
mov edi, eax
test eax, eax
js 0x14001a5c1
mov r8d, 0x10
mov rdx, r13
mov rcx, r12
call fcn.1400114f0
mov edi, eax
test eax, eax
jns 0x14001a57a
mov rcx, qword [0x1401720a0]
lea r13, [0x1401720a0]
mov r12d, 1
cmp rcx, r13
je 0x14001a64c
test byte [rcx + 0x1c], r12b
je 0x14001a64c
cmp byte [rcx + 0x19], 2
jb 0x14001a64c
mov edx, 0x109
mov r9d, eax
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140004b98
jmp 0x14001a415
lea rbx, [r14 + 0x308]
mov r14, qword [rbx + 8]
cmp r14, qword [rbx + 0x10]
jb 0x14001a5a6
lea rdx, [r14 + 1]
mov rcx, rbx
call fcn.14000fa14
test al, al
jne 0x14001a5a6
mov ecx, 0x8007000e
call fcn.140001b00
int3
mov rax, qword [rbx]
lea rcx, [rax + r14*8]
test rcx, rcx
je 0x14001a5b5
mov qword [rcx], r12
mov r12d, 1
add qword [rbx + 8], r12
jmp 0x14001a63e
mov r12d, 1
jmp 0x14001a63e
mov edi, 0x8007045d
mov rcx, qword [0x1401720a0]
lea rax, [0x1401720a0]
cmp rcx, rax
je 0x14001a645
test byte [rcx + 0x1c], r12b
je 0x14001a645
cmp byte [rcx + 0x19], 2
jb 0x14001a645
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x70]
call fcn.140084c1c
mov rbx, rax
mov rdx, r13
lea rcx, [rbp]
call fcn.140084c1c
mov edx, 0x108
mov dword [rsp + 0x30], 0x10
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x10
mov r9, rax
lea r8, [0x14014be60]
mov rcx, qword [0x1401720a0]
mov rcx, qword [rcx + 0x10]
call fcn.1400107c0
mov rcx, qword [0x1401720a0]
lea r13, [0x1401720a0]
cmp qword [rsp + 0x68], 0xffffffffffffffff
je 0x14001a68e
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1401720a0]
mov rax, qword [rsp + 0x60]
jmp 0x14001a678
mov r12d, 1
mov rax, qword [rsp + 0x48]
cmp rax, 0xffffffffffffffff
je 0x14001a68e
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [0x1401720a0]
mov r14, qword [rsp + 0x50]
test edi, edi
jns 0x14001a726
cmp byte [rsp + 0x58], 0
je 0x14001a726
cmp rcx, r13
je 0x14001a6d3
test byte [rcx + 0x1c], r12b
je 0x14001a6d3
cmp byte [rcx + 0x19], 4
jb 0x14001a6d3
mov edx, 0x10a
mov dword [rsp + 0x20], edi
mov r9, r14
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140005b60
xor r8d, r8d
xor edx, edx
mov rcx, r14
call fcn.140088ff0
test eax, eax
jns 0x14001a71f
mov rcx, qword [0x1401720a0]
cmp rcx, r13
je 0x14001a726
test byte [rcx + 0x1c], r12b
je 0x14001a726
cmp byte [rcx + 0x19], 2
jb 0x14001a726
mov edx, 0x10b
mov dword [rsp + 0x20], eax
mov r9, r14
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140005b60
jmp 0x14001a71f
mov r15, qword [rsp + 0x60]
mov rcx, qword [0x1401720a0]
test r15, r15
je 0x14001a73b
mov rcx, r15
call qword [sym.imp.ole32.dll_CoTaskMemFree]
mov rcx, qword [0x1401720a0]
mov r15d, 1
lea rax, [0x1401720a0]
cmp rcx, rax
je 0x14001a76e
test byte [rcx + 0x1c], r15b
je 0x14001a76e
cmp byte [rcx + 0x19], 4
jb 0x14001a76e
mov edx, 0x10c
lea r8, [0x14014be60]
mov rcx, qword [rcx + 0x10]
call fcn.140004b74
mov eax, edi
mov rcx, qword [rbp + 0x70]
xor rcx, rsp
call fcn.140141cf0
add rsp, 0x180
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret