Function at 0x140058e60
Capabilities:
Delete file

Disassembly:
push rbp
push rbx
push rsi
push r14
push r15
mov rbp, rsp
sub rsp, 0x70
mov rsi, rcx
lea r15, [rcx + 0x10]
test dl, dl
je 0x140058ede
mov rcx, qword [r15]
cmp dword [rcx - 0x10], 0
je 0x140058ede
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 1]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi + 0x20], rax
cmp rax, 0xffffffffffffffff
je 0x140058ed1
mov edx, dword [rsi + 0x18]
cmp edx, 0xffffffff
je 0x140058ed1
and dword [rbp + 0x38], 0
xor r9d, r9d
lea r8, [rbp + 0x38]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp qword [rsi + 0x20], 0xffffffffffffffff
setne al
jmp 0x14005911c
lea rdx, [rbp + 0x40]
mov rcx, rsi
call fcn.140059210
nop
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov rcx, rsi
call fcn.1400592a4
mov rcx, qword [rax]
call fcn.14001d434
test eax, eax
jne 0x140058f10
xor bl, bl
jmp 0x1400590f3
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov ebx, 1
mov dword [rsp + 0x20], ebx
xor r9d, r9d
mov r8d, ebx
mov edx, 0x40000000
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x14005909c
lea rax, [rbp - 0x30]
mov qword [rbp + 0x48], rax
lea rax, [rbp - 0x30]
mov qword [rbp - 0x10], rax
mov rcx, qword [rbp + 0x40]
add rcx, 0xffffffffffffffe8
call fcn.1400028e4
add rax, 0x18
mov qword [rbp - 0x30], rax
lea rdx, [rbp - 0x30]
mov rcx, rsi
call fcn.140058be0
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x14005909c
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
lea rax, [rbp + 0x48]
mov qword [rbp - 0x10], rax
mov rcx, qword [rbp + 0x40]
add rcx, 0xffffffffffffffe8
call fcn.1400028e4
add rax, 0x18
mov qword [rbp + 0x48], rax
lea rcx, [rbp + 0x48]
call fcn.14000c63c
lea r8, str..xml
lea rdx, [rbp + 0x48]
lea rcx, [rbp - 0x18]
call fcn.14001aca0
nop
lea rax, [rbp - 0x20]
mov qword [rbp - 0x28], rax
mov rdx, qword [rbp - 0x18]
lea rcx, [rbp - 0x20]
call fcn.140002cec
lea rdx, [rbp - 0x20]
mov rcx, rsi
call fcn.140058d20
and qword [rsp + 0x30], 0
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], ebx
xor r9d, r9d
mov r8d, ebx
mov edx, 0x40000000
mov rcx, qword [rbp + 0x40]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov r14, rax
cmp rax, 0xffffffffffffffff
jne 0x140059051
lea rax, [rbp - 0x28]
mov qword [rbp - 0x10], rax
lea rax, [rbp - 0x28]
mov qword [rbp - 8], rax
mov rcx, qword [rbp + 0x40]
add rcx, 0xffffffffffffffe8
call fcn.1400028e4
add rax, 0x18
mov qword [rbp - 0x28], rax
lea rdx, [rbp - 0x28]
mov rcx, rsi
call fcn.140058be0
mov r14, rax
mov rdx, qword [rbp - 0x18]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140059070
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
nop
lea rax, [rbp + 0x48]
mov qword [rbp - 8], rax
mov rdx, qword [rbp + 0x48]
add rdx, 0xffffffffffffffe8
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x140059096
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
cmp r14, 0xffffffffffffffff
je 0x1400590d8
mov rcx, qword [rbp + 0x40]
add rcx, 0xffffffffffffffe8
call fcn.1400028e4
lea rbx, [rax + 0x18]
mov qword [rbp - 0x10], rbx
lea rdx, [rbp - 0x10]
mov rcx, r15
call fcn.140006324
nop
lea rdx, [rbx - 0x18]
or eax, 0xffffffff
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x1400590d8
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov qword [rsi + 0x20], r14
lea rdx, [0x14006d114]
mov rcx, rsi
call fcn.140059128
cmp qword [rsi + 0x20], 0xffffffffffffffff
setne bl
lea rax, [rbp + 0x40]
mov qword [rbp + 0x48], rax
mov rdx, qword [rbp + 0x40]
add rdx, 0xffffffffffffffe8
or ecx, 0xffffffff
lock xadd dword [rdx + 0x10], ecx
sub ecx, 1
jg 0x14005911a
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [rreloc.OLEAUT32.dll_VariantClear + 8]
mov al, bl
add rsp, 0x70
pop r15
pop r14
pop rsi
pop rbx
pop rbp
ret