Function at 0x140005840
Capabilities:
Check if file exists
Delete file
Enumerate files on windows

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x5f8]
sub rsp, 0x6d0
mov rax, qword [0x14009b978]
xor rax, rsp
mov qword [rbp + 0x5c0], rax
mov r13d, r8d
mov esi, edx
mov r14, rcx
mov qword [rsp + 0x48], rcx
mov rcx, qword [0x14009b020]
lea rdi, [0x14009b020]
cmp rcx, rdi
je 0x1400058b8
test byte [rcx + 0x1c], 4
je 0x1400058b8
cmp byte [rcx + 0x19], 5
jb 0x1400058b8
mov rcx, qword [rcx + 0x10]
lea r8, [0x14008ba10]
mov edx, 0x89
call fcn.1400042fc
xor ebx, ebx
lea rdx, [rsp + 0x50]
mov rcx, r14
mov r12d, ebx
call qword [sym.imp.KERNEL32.dll_FindFirstFileW]
nop dword [rax + rax]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x140005944
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
cmp eax, 2
je 0x14000593a
mov rax, qword [0x14009b020]
cmp rax, rdi
je 0x140005933
test byte [rax + 0x1c], 4
je 0x140005933
cmp byte [rax + 0x19], 3
jb 0x140005933
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x14009b020]
lea r8, [0x14008ba10]
mov edx, 0x8a
mov qword [rsp + 0x20], r14
mov r9d, eax
mov rcx, qword [rcx + 0x10]
call fcn.14000c6bc
xor eax, eax
jmp 0x140005d64
mov eax, 1
jmp 0x140005d64
lea rdx, [rbp + 0x3b0]
mov rcx, r14
call fcn.14006c580
mov edi, eax
test eax, eax
je 0x1400059a0
mov rcx, qword [0x14009b020]
lea rax, [0x14009b020]
cmp rcx, rax
je 0x140005990
test byte [rcx + 0x1c], 4
je 0x140005990
cmp byte [rcx + 0x19], 2
jb 0x140005990
mov rcx, qword [rcx + 0x10]
lea r8, [0x14008ba10]
mov edx, 0x8b
mov r9d, edi
call fcn.140004668
mov ecx, edi
call qword [sym.imp.KERNEL32.dll_SetLastError]
nop dword [rax + rax]
jmp 0x140005933
movabs rax, 0xc92a69c000
lea r14, [0x14009b020]
imul rsi, rax
lea rcx, [rsp + 0x30]
call qword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
nop dword [rax + rax]
mov eax, dword [rsp + 0x54]
mov edx, dword [rsp + 0x58]
mov ecx, dword [rsp + 0x34]
shl rcx, 0x20
shl rdx, 0x20
or rdx, rax
mov eax, dword [rsp + 0x30]
or rcx, rax
sub rcx, rdx
cmp rcx, rsi
jbe 0x140005c04
lea rax, [rsp + 0x7c]
mov edx, 0x104
lea r9, [rbp + 0x3b0]
mov qword [rsp + 0x20], rax
lea r8, [0x14008b500]
lea rcx, [rbp + 0x1a0]
call fcn.140004280
test eax, eax
jns 0x140005a5e
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x140005c04
test byte [rcx + 0x1c], 4
je 0x140005c04
cmp byte [rcx + 0x19], 2
jb 0x140005c04
mov rcx, qword [rcx + 0x10]
lea r8, [0x14008ba10]
mov edx, 0x8c
mov r9d, eax
call fcn.140004328
jmp 0x140005c04
lea rcx, [rbp + 0x1a0]
call qword [sym.imp.KERNEL32.dll_DeleteFileW]
nop dword [rax + rax]
test eax, eax
jne 0x140005ad1
mov rax, qword [0x14009b020]
cmp rax, r14
je 0x140005c04
test byte [rax + 0x1c], 4
je 0x140005c04
cmp byte [rax + 0x19], 2
jb 0x140005c04
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x14009b020]
lea r9, [rbp + 0x1a0]
mov edx, 0x8d
mov dword [rsp + 0x20], eax
lea r8, [0x14008ba10]
mov rcx, qword [rcx + 0x10]
call fcn.1400045e8
jmp 0x140005c04
mov edx, 0x5c
mov qword [rsp + 0x38], rbx
lea rcx, [rbp + 0x1a0]
lea r12d, [rdx - 0x5b]
call qword [sym.imp.msvcrt.dll_wcsrchr]
nop dword [rax + rax]
mov rdi, rax
test rax, rax
je 0x140005bd0
add rdi, 2
je 0x140005bd0
lea r9, [rsp + 0x38]
mov rdx, rdi
lea r8, [rsp + 0x40]
call fcn.140006440
test eax, eax
je 0x140005b63
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x140005c04
test byte [rcx + 0x1c], 4
je 0x140005c04
cmp byte [rcx + 0x19], 2
jb 0x140005c04
mov rcx, qword [rcx + 0x10]
lea r8, [0x14008ba10]
mov edx, 0x8f
mov dword [rsp + 0x20], eax
mov r9, rdi
call fcn.14000c558
jmp 0x140005c04
mov rdi, qword [rsp + 0x38]
mov eax, r13d
mov rcx, qword [rsp + 0x40]
neg eax
mov r9, rdi
mov r8d, r12d
sbb edx, edx
and edx, 0x20
add edx, 0x20
call fcn.140058b24
test eax, eax
je 0x140005bba
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x140005bba
test byte [rcx + 0x1c], 4
je 0x140005bba
cmp byte [rcx + 0x19], 2
jb 0x140005bba
mov rcx, qword [rcx + 0x10]
lea r8, [0x14008ba10]
mov edx, 0x90
movzx r9d, ax
call fcn.14000c678
test rdi, rdi
je 0x140005c04
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_LocalFree]
nop dword [rax + rax]
jmp 0x140005c04
mov rcx, qword [0x14009b020]
cmp rcx, r14
je 0x140005c04
test byte [rcx + 0x1c], 4
je 0x140005c04
cmp byte [rcx + 0x19], 2
jb 0x140005c04
mov rcx, qword [rcx + 0x10]
lea r9, [rbp + 0x1a0]
mov edx, 0x8e
lea r8, [0x14008ba10]
call fcn.1400044cc
lea rdx, [rsp + 0x50]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindNextFileW]
nop dword [rax + rax]
test eax, eax
jne 0x1400059b5
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov r14, qword [rsp + 0x48]
mov edi, eax
cmp eax, 0x12
je 0x140005c76
mov rcx, qword [0x14009b020]
lea rsi, [0x14009b020]
cmp rcx, rsi
je 0x140005c7d
test byte [rcx + 0x1c], 4
je 0x140005c7d
cmp byte [rcx + 0x19], 2
jb 0x140005c7d
mov rcx, qword [rcx + 0x10]
lea r8, [0x14008ba10]
mov edx, SysAllocStringByteLen
mov qword [rsp + 0x20], r14
mov r9d, eax
call fcn.14000c6bc
jmp 0x140005c7d
lea rsi, [0x14009b020]
mov rcx, r15
call qword [sym.imp.KERNEL32.dll_FindClose]
nop dword [rax + rax]
test eax, eax
jne 0x140005cc5
mov rcx, qword [0x14009b020]
cmp rcx, rsi
je 0x140005cc5
test byte [rcx + 0x1c], 4
je 0x140005cc5
cmp byte [rcx + 0x19], 2
jb 0x140005cc5
mov rcx, qword [rcx + 0x10]
lea r8, [0x14008ba10]
mov edx, SysAllocStringByteLen
mov qword [rsp + 0x20], r14
mov r9d, edi
call fcn.14000c6bc
cmp r12d, 1
jne 0x140005d5c
lea rcx, [0x14009f340]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
nop dword [rax + rax]
mov rax, qword [0x14009f528]
lea rcx, [0x14009f340]
or qword [rax + 0x38], 0xffffffffffffffff
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
nop dword [rax + rax]
mov rcx, qword [0x14009f0e8]
call qword [sym.imp.KERNEL32.dll_SetEvent]
nop dword [rax + rax]
test eax, eax
jne 0x140005d5c
mov rax, qword [0x14009b020]
cmp rax, rsi
je 0x140005d5c
test byte [rax + 0x1c], 4
je 0x140005d5c
cmp byte [rax + 0x19], 2
jb 0x140005d5c
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop dword [rax + rax]
mov rcx, qword [0x14009b020]
lea r8, [0x14008ba10]
mov edx, SysAllocStringByteLen
movzx r9d, ax
mov rcx, qword [rcx + 0x10]
call fcn.14000c678
cmp edi, 0x12
sete bl
mov eax, ebx
mov rcx, qword [rbp + 0x5c0]
xor rcx, rsp
call fcn.1400018f0
lea r11, [rsp + 0x6d0]
mov rbx, qword [r11 + 0x38]
mov rsi, qword [r11 + 0x40]
mov rdi, qword [r11 + 0x48]
mov rsp, r11
pop r15
pop r14
pop r13
pop r12
pop rbp
ret