Function at 0x140036480
Capabilities:
Check if file exists
Delete file

Disassembly:
mov rax, rsp
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x480
mov qword [rsp + 0x40], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rbp
mov qword [rax + 0x20], rsi
mov rax, qword [0x1400e71f0]
xor rax, rsp
mov qword [rsp + 0x470], rax
mov r12, rcx
mov r14d, 1
test rcx, rcx
jne 0x1400364cf
xor eax, eax
jmp 0x140036b47
xor edx, edx
mov r8d, 0x208
lea rcx, [rsp + 0x260]
call fcn.140080d50
lea rcx, [rsp + 0x260]
call fcn.140021ee0
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x140036b44
xor r15d, r15d
or r13, 0xffffffffffffffff
nop
nop
call fcn.1400696cc
mov ecx, r15d
test rax, rax
setne cl
test ecx, ecx
je 0x140036b39
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x20], rbx
test r12, r12
je 0x140036617
test r12, 0xffffffffffff0000
jne 0x140036578
movzx edi, r12w
mov ecx, edi
call fcn.1400696b8
test rax, rax
je 0x140036669
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x20]
call fcn.140003a40
mov rbx, qword [rsp + 0x20]
jmp 0x140036669
xor eax, eax
mov rcx, r13
mov rdi, r12
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov rdi, rcx
test ecx, ecx
je 0x140036617
mov esi, dword [rbx - 0x10]
mov rbp, r12
sub rbp, rbx
sar rbp, 1
mov edx, 1
sub edx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, ecx
or eax, edx
jge 0x1400365c3
mov edx, ecx
lea rcx, [rsp + 0x20]
call fcn.140003180
mov rbx, qword [rsp + 0x20]
cmp rbp, rsi
ja 0x1400365e3
movsxd rax, edi
lea rsi, [rax + rax]
lea r8, [rbx + rbp*2]
mov r9, rsi
mov rdx, rsi
mov rcx, rbx
call fcn.140081c40
jmp 0x1400365fb
movsxd rax, edi
lea rsi, [rax + rax]
mov r9, rsi
mov r8, r12
mov rdx, rsi
mov rcx, rbx
call fcn.140080540
test edi, edi
js 0x140036ad7
cmp edi, dword [rbx - 0xc]
jg 0x140036ad7
mov dword [rbx - 0x10], edi
mov word [rsi + rbx], 0
jmp 0x140036669
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], 0
je 0x140036669
cmp dword [rdx + 0x10], 0
jge 0x14003663f
cmp dword [rbx - 0xc], 0
jl 0x140036ae2
mov dword [rbx - 0x10], r15d
mov word [rbx], 0
jmp 0x140036669
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140036657
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x20], rbx
mov r8d, 3
lea rdx, [rsp + 0x38]
lea rcx, [rsp + 0x20]
call fcn.140003710
nop
mov rdx, qword [rax]
lea rdi, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rdi, rbx
je 0x140036739
cmp dword [rbx + 0x10], 0
jl 0x14003672a
mov rcx, qword [rdi]
cmp rcx, qword [rbx]
jne 0x14003672a
mov rax, qword [rcx]
call qword [rax + 0x20]
mov rcx, rax
cmp dword [rdi + 0x10], 0
jl 0x1400366c7
cmp rax, qword [rdi]
jne 0x1400366c7
mov rsi, rdi
lock add dword [rdi + 0x10], 1
jmp 0x140036704
mov rax, qword [rax]
mov r8d, 2
mov edx, dword [rdi + 8]
call qword [rax]
mov rsi, rax
test rax, rax
je 0x140036aed
mov ecx, dword [rdi + 8]
mov dword [rax + 8], ecx
mov ecx, dword [rdi + 8]
add ecx, 1
movsxd rdx, ecx
lea r9, [rdx + rdx]
lea r8, [rdi + 0x18]
add rdx, rdx
lea rcx, [rax + 0x18]
call fcn.140080540
mov eax, r13d
lock xadd dword [rbx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14003671f
mov rcx, qword [rbx]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rsi + 0x18]
mov qword [rsp + 0x20], rax
jmp 0x140036739
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x20]
call fcn.140003c40
nop
mov rdx, qword [rsp + 0x38]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x14003675a
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rdx, r12
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_lstrcpyW]
lea rcx, [rsp + 0x260]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd r8, eax
add r8, r8
lea rdx, [rsp + 0x260]
lea rcx, [rsp + 0x50]
call fcn.140084bf0
test eax, eax
je 0x1400367ea
lea rcx, [rsp + 0x260]
call qword [sym.imp.KERNEL32.dll_lstrlenW]
movsxd rcx, eax
cmp word [rsp + rcx*2 + 0x25e], 0x5c
je 0x1400367cd
mov r9, r12
lea r8, [rsp + 0x260]
lea rdx, [0x1400a3e08]
lea rcx, [rsp + 0x50]
call qword [sym.imp.USER32.dll_wsprintfW]
jmp 0x1400367ea
mov r9, r12
lea r8, [rsp + 0x260]
lea rdx, [0x1400a3e50]
lea rcx, [rsp + 0x50]
call qword [sym.imp.USER32.dll_wsprintfW]
xor edx, edx
mov rcx, r12
call fcn.140022120
test eax, eax
jne 0x140036a92
lea rcx, [rsp + 0x50]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
mov r14d, eax
test eax, eax
jne 0x14003684f
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 2
jb 0x140036af3
cmp eax, 3
jbe 0x140036844
cmp eax, 5
je 0x140036839
cmp eax, 0x20
jne 0x140036af3
lea r14d, [rax - 0x1f]
jmp 0x140036a92
mov r14d, 1
jmp 0x140036a92
mov r14d, 1
jmp 0x140036a92
call fcn.1400696cc
mov ecx, r15d
test rax, rax
setne cl
test ecx, ecx
je 0x140036b2e
mov rdx, qword [rax]
mov rcx, rax
call qword [rdx + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x28], rbx
lea rcx, [rsp + 0x50]
lea rax, [rsp + 0x50]
test rax, 0xffffffffffff0000
jne 0x1400368b6
movzx edi, cx
mov ecx, edi
call fcn.1400696b8
test rax, rax
je 0x1400369ae
mov r8d, edi
mov rdx, rax
lea rcx, [rsp + 0x28]
call fcn.140003a40
mov rbx, qword [rsp + 0x28]
jmp 0x1400369ae
xor eax, eax
mov rcx, r13
lea rdi, [rsp + 0x50]
repne scasw ax, word [rdi]
not rcx
sub rcx, 1
mov rdi, rcx
test ecx, ecx
jne 0x14003692a
lea rdx, [rbx - 0x18]
mov rdi, qword [rdx]
cmp dword [rdx + 8], eax
je 0x1400369ae
cmp dword [rdx + 0x10], eax
jge 0x1400368fb
cmp dword [rbx - 0xc], eax
jl 0x140036b18
mov dword [rbx - 0x10], r15d
mov word [rbx], ax
jmp 0x1400369ae
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140036913
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rax, qword [rdi]
mov rcx, rdi
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x28], rbx
jmp 0x1400369ae
mov esi, dword [rbx - 0x10]
lea rbp, [rsp + 0x50]
sub rbp, rbx
sar rbp, 1
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, edi
or eax, ecx
jge 0x14003695a
mov edx, edi
lea rcx, [rsp + 0x28]
call fcn.140003180
mov rbx, qword [rsp + 0x28]
cmp rbp, rsi
ja 0x14003697a
movsxd rax, edi
lea rsi, [rax + rax]
lea r8, [rbx + rbp*2]
mov r9, rsi
mov rdx, rsi
mov rcx, rbx
call fcn.140081c40
jmp 0x140036994
movsxd rax, edi
lea rsi, [rax + rax]
mov r9, rsi
lea r8, [rsp + 0x50]
mov rdx, rsi
mov rcx, rbx
call fcn.140080540
test edi, edi
js 0x140036b23
cmp edi, dword [rbx - 0xc]
jg 0x140036b23
mov dword [rbx - 0x10], edi
mov word [rsi + rbx], 0
mov r8d, 3
lea rdx, [rsp + 0x30]
lea rcx, [rsp + 0x28]
call fcn.140003710
nop
mov rdx, qword [rax]
lea rcx, [rdx - 0x18]
add rbx, 0xffffffffffffffe8
cmp rcx, rbx
je 0x140036a1f
cmp dword [rbx + 0x10], 0
jl 0x140036a10
mov rax, qword [rbx]
cmp qword [rcx], rax
jne 0x140036a10
call fcn.1400031e0
mov rdi, rax
mov ecx, r13d
lock xadd dword [rbx + 0x10], ecx
add ecx, 0xffffffff
test ecx, ecx
jg 0x140036a05
mov rcx, qword [rbx]
mov rax, qword [rcx]
mov rdx, rbx
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rax, [rdi + 0x18]
mov qword [rsp + 0x28], rax
jmp 0x140036a1f
mov r8d, dword [rdx - 0x10]
lea rcx, [rsp + 0x28]
call fcn.140003c40
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140036a40
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
lea rdx, [0x1400a8de0]
mov rdi, qword [rsp + 0x28]
mov rcx, rdi
call fcn.1400807e0
test eax, eax
je 0x140036a6b
lea rdx, [0x1400a8dd8]
mov rcx, rdi
call fcn.1400807e0
test eax, eax
jne 0x140036a76
lea rcx, [rsp + 0x50]
call fcn.1400344b0
nop
lea rdx, [rdi - 0x18]
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140036a92
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cdqe
lea r12, [r12 + rax*2]
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
mov eax, r13d
lock xadd dword [rdx + 0x10], eax
add eax, 0xffffffff
test eax, eax
jg 0x140036ac5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, r12
call qword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x140036b44
jmp 0x140036510
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, 0x80070057
call fcn.140001000
nop
call fcn.1400019f0
nop
mov rdx, qword [rsp + 0x20]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], r13d
add r13d, 0xffffffff
test r13d, r13d
jg 0x140036b14
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
xor eax, eax
jmp 0x140036b47
mov ecx, 0x80070057
call fcn.140001000
int3
mov ecx, 0x80070057
call fcn.140001000
nop
mov ecx, 0x80004005
call fcn.140001000
nop
mov ecx, 0x80004005
call fcn.140001000
int3
mov eax, r14d
mov rcx, qword [rsp + 0x470]
xor rcx, rsp
call fcn.140081050
lea r11, [rsp + 0x480]
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