Function at 0x140004658
Capabilities:
Check if file exists
Delete file
Get file attributes

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x270
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x140017060]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov r14, rcx
xor edx, edx
xor ecx, ecx
call qword [sym.imp.ole32.dll_CoInitializeEx]
xor r13d, r13d
test eax, eax
js 0x140004897
lea r15, [r14 + 0x10]
mov qword [rsp + 0x20], r15
lea r9, [0x140002810]
xor edx, edx
lea r8d, [r13 + 1]
lea rcx, [0x140002838]
call qword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
js 0x140004891
mov rcx, qword [r15]
mov rax, qword [rcx]
xor edx, edx
call qword [rax + 0x50]
mov rax, qword [r14 + 0x18]
mov rcx, qword [rax]
test rcx, rcx
jne 0x1400046f6
mov ebx, r13d
mov qword [rsp + 0x38], rbx
jmp 0x140004714
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rbx, rax
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x140004714
mov ecx, 0x8007000e
call fcn.140004a98
nop
test rbx, rbx
je 0x140004731
mov rcx, qword [r15]
mov rax, qword [rcx]
lea r9, [rsp + 0x48]
xor r8d, r8d
mov rdx, rbx
call qword [rax + 0x20]
mov edi, eax
jmp 0x140004736
mov edi, 0x8007000e
test edi, edi
js 0x140004888
mov r12b, 1
mov rbp, qword [r14 + 0x28]
test rbp, rbp
je 0x140004789
or rax, 0xffffffffffffffff
inc rax
cmp word [rbp + rax*2], r13w
jne 0x14000474e
cmp rax, 5
jb 0x140004888
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
je 0x1400047b1
test al, 0x10
jne 0x1400047b1
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
test eax, eax
jne 0x1400047b1
mov edi, 0x80004005
jmp 0x1400047b1
mov qword [rsp + 0x30], 0x104
lea r8, [rsp + 0x30]
lea rdx, [rsp + 0x50]
call fcn.1400048d0
mov edi, eax
lea rbp, [rsp + 0x50]
test eax, eax
cmovs rbp, r13
mov r12b, r13b
test edi, edi
js 0x140004888
test rbp, rbp
jne 0x1400047c8
mov rdi, r13
mov qword [rsp + 0x30], r13
jmp 0x1400047e9
mov rcx, rbp
call qword [sym.imp.OLEAUT32.dll_SysReAllocString]
mov rdi, rax
mov qword [rsp + 0x30], rax
test rax, rax
jne 0x1400047e9
mov ecx, 0x8007000e
call fcn.140004a98
nop
mov rcx, qword [r15]
mov rax, qword [rcx]
mov rdx, rdi
call qword [rax + 0x48]
test eax, eax
js 0x14000487e
mov ecx, 0x20
call fcn.14000a20c
mov rsi, rax
test rax, rax
je 0x14000483c
mov dl, byte [r14 + 0x22]
mov cl, byte [r14 + 0x20]
mov rax, qword [r14 + 8]
lea r8, [0x140003850]
mov qword [rsi], r8
mov dword [rsi + 8], 1
mov qword [rsi + 0x10], rax
mov byte [rsi + 0x18], cl
mov byte [rsi + 0x19], r12b
mov byte [rsi + 0x1a], dl
jmp 0x14000483f
mov rsi, r13
test rsi, rsi
je 0x14000487e
mov rcx, qword [r15]
mov rax, qword [rcx]
mov rdx, rsi
call qword [rax + 0x28]
test eax, eax
js 0x140004874
mov byte [r14 + 0x21], 1
mov rcx, qword [r15]
mov rax, qword [rcx]
call qword [rax + 0x40]
mov byte [r14 + 0x21], r13b
test r12b, r12b
jne 0x140004874
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + 0x10]
nop
mov rcx, rdi
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
nop
mov rcx, rbx
call qword [sym.imp.OLEAUT32.dll_SysStringLen]
call qword [sym.imp.ole32.dll_CoUninitialize]
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.14000a5c0
lea r11, [rsp + 0x270]
mov rbx, qword [r11 + 0x38]
mov rbp, qword [r11 + 0x40]
mov rsi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rdi
ret