Function at 0x14003d6a8
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 [0x14016a508]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov r14, r8
mov qword [rsp + 0x60], r8
mov r13, rdx
mov rbx, rcx
lea r8, [0x14016a048]
mov rcx, qword [0x14016a048]
cmp rcx, r8
je 0x14003d71e
test byte [rcx + 0x1c], 1
je 0x14003d71e
cmp byte [rcx + 0x19], 4
jb 0x14003d71e
mov edx, 0xfe
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.14000c0e8
mov rcx, qword [0x14016a048]
lea r8, [0x14016a048]
or rax, 0xffffffffffffffff
mov qword [rsp + 0x58], rax
mov qword [rsp + 0x48], rax
and qword [rsp + 0x50], 0
xor r15b, r15b
movups xmm0, xmmword [0x140147ba0]
movdqu xmmword [rsp + 0x68], xmm0
and dword [rsp + 0x40], 0
mov rdx, qword [r13]
movq rax, xmm0
sub rdx, rax
jne 0x14003d760
mov rdx, qword [r13 + 8]
sub rdx, qword [0x140147ba8]
test rdx, rdx
jne 0x14003d79c
cmp rcx, r8
je 0x14003d792
test byte [rcx + 0x1c], 1
je 0x14003d792
cmp byte [rcx + 0x19], 2
jb 0x14003d792
mov edx, 0xff
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.14000c0e8
mov rcx, qword [0x14016a048]
mov edi, 0x80070057
jmp 0x14003deb8
test byte [rbx + 0x154], 1
je 0x14003d859
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, r14
call fcn.14008a470
mov edi, eax
test eax, eax
js 0x14003de91
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.140090934
mov edi, eax
test eax, eax
jns 0x14003d906
mov rcx, qword [0x14016a048]
lea rbx, [0x14016a048]
cmp rcx, rbx
je 0x14003d99a
test byte [rcx + 0x1c], 1
je 0x14003d99a
cmp byte [rcx + 0x19], 2
jb 0x14003d99a
mov edx, 0x101
mov dword [rsp + 0x20], eax
mov r9, r12
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.140014f78
mov rax, qword [rsp + 0x48]
jmp 0x14003dde3
lea r8, [rsp + 0x50]
lea rdx, str.TempMediaId
mov rcx, qword [rbx + 0x248]
call fcn.14008a090
mov edi, eax
test eax, eax
js 0x14003de91
mov r12, qword [rsp + 0x50]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop dword [rax + rax]
test eax, eax
jne 0x14003d7c8
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
cmp eax, 2
je 0x14003d7c8
mov rcx, qword [0x14016a048]
lea rbx, [0x14016a048]
cmp rcx, rbx
je 0x14003d8f0
test byte [rcx + 0x1c], 1
je 0x14003d8f0
cmp byte [rcx + 0x19], 2
jb 0x14003d8f0
mov edx, 0x100
mov dword [rsp + 0x20], eax
mov r9, r12
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.14003fbc0
mov rcx, qword [0x14016a048]
test edi, edi
jle 0x14003de08
movzx edi, di
or edi, 0x80070000
jmp 0x14003de06
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 0x14003d9a4
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x14016a048]
lea rbx, [0x14016a048]
cmp rcx, rbx
je 0x14003d98d
test byte [rcx + 0x1c], 1
je 0x14003d98d
cmp byte [rcx + 0x19], 2
jb 0x14003d98d
mov edx, 0x102
mov dword [rsp + 0x20], eax
mov r9, r12
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.14003fbc0
mov rcx, qword [0x14016a048]
test edi, edi
jle 0x14003d99a
movzx edi, di
or edi, 0x80070000
mov rax, qword [rsp + 0x48]
jmp 0x14003ddea
mov r9d, dword [rsp + 0x40]
cmp r9d, 0x10
je 0x14003d9f9
mov edi, 0x8007045d
mov rcx, qword [0x14016a048]
lea rbx, [0x14016a048]
cmp rcx, rbx
je 0x14003d99a
test byte [rcx + 0x1c], 1
je 0x14003d99a
cmp byte [rcx + 0x19], 2
jb 0x14003d99a
mov edx, 0x103
mov dword [rsp + 0x20], 0x10
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.14003f750
mov rcx, qword [0x14016a048]
jmp 0x14003d99a
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FlushFileBuffers]
nop dword [rax + rax]
test eax, eax
jne 0x14003da90
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 [0x14016a048]
lea rax, [0x14016a048]
cmp rcx, rax
je 0x14003da72
test byte [rcx + 0x1c], 1
je 0x14003da72
cmp byte [rcx + 0x19], 2
jb 0x14003da72
mov edx, 0x104
mov dword [rsp + 0x28], ebx
mov dword [rsp + 0x20], edi
mov r9, r12
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.14003fdb4
mov rcx, qword [0x14016a048]
test edi, edi
jle 0x14003da7f
movzx edi, di
or edi, 0x80070000
mov rax, qword [rsp + 0x48]
lea rbx, [0x14016a048]
jmp 0x14003ddea
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 0x14003db2c
mov r8d, 1
mov rdx, r14
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_MoveFileExW]
nop dword [rax + rax]
test eax, eax
jne 0x14003db29
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
mov rcx, qword [0x14016a048]
lea rbx, [0x14016a048]
cmp rcx, rbx
je 0x14003d8f0
test byte [rcx + 0x1c], 1
je 0x14003d8f0
cmp byte [rcx + 0x19], 2
jb 0x14003d8f0
mov edx, 0x105
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r14
mov r9, r12
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.1400150ac
jmp 0x14003d8e9
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.140090934
mov edi, eax
test eax, eax
jns 0x14003dbac
mov rcx, qword [0x14016a048]
lea rbx, [0x14016a048]
cmp rcx, rbx
je 0x14003ddc5
test byte [rcx + 0x1c], 1
je 0x14003ddc5
cmp byte [rcx + 0x19], 2
jb 0x14003ddc5
mov edx, 0x106
mov dword [rsp + 0x20], eax
mov r9, r14
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.140014f78
jmp 0x14003ddbe
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 0x14003dc30
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov edi, eax
test eax, eax
jle 0x14003dbf7
movzx edi, ax
or edi, 0x80070000
mov rcx, qword [0x14016a048]
lea rbx, [0x14016a048]
cmp rcx, rbx
je 0x14003ddc5
test byte [rcx + 0x1c], 1
je 0x14003ddc5
cmp byte [rcx + 0x19], 2
jb 0x14003ddc5
mov edx, 0x107
mov dword [rsp + 0x20], edi
jmp 0x14003db94
cmp dword [rsp + 0x40], 0x10
jne 0x14003dd42
mov rax, qword [rsp + 0x68]
sub rax, qword [r13]
jne 0x14003dc4f
mov rax, qword [rsp + 0x70]
sub rax, qword [r13 + 8]
test rax, rax
jne 0x14003dd42
test byte [rbx + 0x154], 0x80
je 0x14003ddb7
cmp byte [rbx + 0x114], al
je 0x14003ddb7
lea ecx, [rax + 0x40]
call fcn.140006d9c
mov qword [rsp + 0x48], rax
test rax, rax
je 0x14003dc90
mov rcx, rax
call fcn.1400155ac
mov r14, rax
jmp 0x14003dc93
xor r14d, r14d
mov rdx, qword [rsp + 0x60]
mov rcx, r14
call fcn.14002b020
mov edi, eax
test eax, eax
js 0x14003ddb7
mov r8d, 0x10
mov rdx, r13
mov rcx, r14
call fcn.140037ca0
mov edi, eax
test eax, eax
jns 0x14003dd09
mov rcx, qword [0x14016a048]
lea rbx, [0x14016a048]
cmp rcx, rbx
je 0x14003ddc5
test byte [rcx + 0x1c], 1
je 0x14003ddc5
cmp byte [rcx + 0x19], 2
jb 0x14003ddc5
mov edx, 0x109
mov r9d, eax
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.14000c114
jmp 0x14003ddbe
add rbx, 0x308
mov r13, qword [rbx + 8]
cmp r13, qword [rbx + 0x10]
jb 0x14003dd35
lea rdx, [r13 + 1]
mov rcx, rbx
call fcn.1400107ac
test al, al
jne 0x14003dd35
mov ecx, 0x8007000e
call fcn.140008c24
int3
mov rax, qword [rbx]
mov qword [rax + r13*8], r14
inc qword [rbx + 8]
jmp 0x14003ddb7
mov edi, 0x8007045d
mov rcx, qword [0x14016a048]
lea rbx, [0x14016a048]
cmp rcx, rbx
je 0x14003ddc5
test byte [rcx + 0x1c], 1
je 0x14003ddc5
cmp byte [rcx + 0x19], 2
jb 0x14003ddc5
lea rdx, [rsp + 0x68]
lea rcx, [rbp - 0x80]
call fcn.140089b98
mov rbx, rax
mov rdx, r13
lea rcx, [rbp - 0x10]
call fcn.140089b98
mov edx, 0x108
mov dword [rsp + 0x30], 0x10
mov qword [rsp + 0x28], rbx
mov dword [rsp + 0x20], 0x10
mov r9, rax
lea r8, [0x14014a790]
mov rcx, qword [0x14016a048]
mov rcx, qword [rcx + 0x10]
call fcn.14003fcd0
lea rbx, [0x14016a048]
mov rcx, qword [0x14016a048]
cmp qword [rsp + 0x58], 0xffffffffffffffff
je 0x14003de06
mov rcx, qword [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rax, qword [rsp + 0x50]
mov rcx, qword [0x14016a048]
cmp rax, 0xffffffffffffffff
je 0x14003de06
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop dword [rax + rax]
mov rcx, qword [0x14016a048]
test edi, edi
jns 0x14003de9d
test r15b, r15b
je 0x14003de9d
cmp rcx, rbx
je 0x14003de46
test byte [rcx + 0x1c], 1
je 0x14003de46
cmp byte [rcx + 0x19], 4
jb 0x14003de46
mov edx, 0x10a
mov dword [rsp + 0x20], edi
mov r9, qword [rsp + 0x60]
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.140014f78
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x60]
call fcn.14008e928
test eax, eax
jns 0x14003de96
mov rcx, qword [0x14016a048]
cmp rcx, rbx
je 0x14003de9d
test byte [rcx + 0x1c], 1
je 0x14003de9d
cmp byte [rcx + 0x19], 2
jb 0x14003de9d
mov edx, 0x10b
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0x60]
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.140014f78
jmp 0x14003de96
mov r12, qword [rsp + 0x50]
mov rcx, qword [0x14016a048]
test r12, r12
je 0x14003deb8
mov rcx, r12
call qword [sym.imp.ole32.dll_CoTaskMemFree]
nop dword [rax + rax]
mov rcx, qword [0x14016a048]
lea rax, [0x14016a048]
cmp rcx, rax
je 0x14003dee5
test byte [rcx + 0x1c], 1
je 0x14003dee5
cmp byte [rcx + 0x19], 4
jb 0x14003dee5
mov edx, 0x10c
lea r8, [0x14014a790]
mov rcx, qword [rcx + 0x10]
call fcn.14000c0e8
mov eax, edi
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.1400071e0
add rsp, 0x170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rbx
pop rbp
ret