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

Disassembly:
mov rax, rsp
push rdi
push r14
push r15
sub rsp, 0x130
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov rax, qword [0x1801610c0]
xor rax, rsp
mov qword [rsp + 0x120], rax
mov rsi, rcx
xor r15d, r15d
mov dword [rsp + 0x40], r15d
lea rdi, [rcx + 0x10]
lea r8d, [r15 + 4]
lea rdx, str..log
mov rcx, rdi
call fcn.180029ad0
mov rdx, rdi
lea rcx, [rsp + 0xe0]
call fcn.180037890
nop
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0xe0]
call fcn.180017ee0
nop
cmp qword [rax + 0x18], 8
jb 0x1800180b2
mov rax, qword [rax]
mov qword [rsp + 0xb0], r15
mov qword [rsp + 0xb8], r15
mov qword [rsp + 0xb0], r15
mov qword [rsp + 0xb8], 7
mov word [rsp + 0xa0], r15w
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.180038970
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x48], rax
lea rcx, [rsp + 0xa0]
cmp qword [rsp + 0xb8], 8
cmovae rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x180018142
call qword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0xfffffffe
cmp eax, 1
ja 0x180018470
lea rcx, [rsp + 0xa0]
call fcn.1800389f0
jmp 0x18001817b
test al, 0x10
je 0x18001816d
bt eax, 0xa
jae 0x18001816d
lea rcx, [rsp + 0xa0]
cmp qword [rsp + 0xb8], 8
cmovae rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_RemoveDirectoryW]
nop
lea rcx, [rsp + 0xa0]
call fcn.1800389f0
nop
lea rcx, [rsp + 0xc0]
call fcn.1800389f0
nop
lea rbx, [rsp + 0xe0]
cmp qword [rsp + 0xf8], 8
cmovae rbx, qword [rsp + 0xe0]
lea r14, [rsp + 0xe0]
cmovae r14, qword [rsp + 0xe0]
lea rcx, [rsp + 0xe0]
call fcn.18008e750
lea r8, [rbx + rax*2]
mov qword [rsp + 0xd0], r15
mov qword [rsp + 0xd8], r15
mov qword [rsp + 0xd0], r15
mov qword [rsp + 0xd8], 7
mov word [rsp + 0xc0], r15w
cmp r14, r8
je 0x18001820e
sub r8, r14
sar r8, 1
mov rdx, r14
lea rcx, [rsp + 0xc0]
call fcn.180038900
nop
mov dword [rsp + 0x40], 4
xor edx, edx
lea rcx, [rsp + 0xc0]
call fcn.18008f200
mov eax, 4
and eax, 0xfffffffb
mov dword [rsp + 0x40], eax
lea rcx, [rsp + 0xc0]
call fcn.1800389f0
mov eax, dword [rsi + 0x38]
not eax
and eax, 1
shl eax, 0x1f
add eax, 0x8000080
cmp qword [rdi + 0x18], 8
jb 0x180018258
mov rdi, qword [rdi]
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], eax
mov dword [rsp + 0x20], 4
xor r9d, r9d
lea edx, [r9 + 4]
lea r8d, [r9 + 7]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov qword [rsi + 8], rax
cmp rax, 0xffffffffffffffff
je 0x18001849f
mov ecx, 8
call fcn.180091eb0
mov r14, rax
mov qword [rsp + 0x48], rax
lea rdx, [rsp + 0x100]
lea rcx, [rsp + 0xe0]
call fcn.180017fc0
nop
mov dword [rsp + 0x40], 1
cmp qword [rax + 0x18], 8
jb 0x1800182c5
mov rax, qword [rax]
mov qword [rsp + 0xd0], r15
mov qword [rsp + 0xd8], r15
mov qword [rsp + 0xd0], r15
mov qword [rsp + 0xd8], 7
mov word [rsp + 0xc0], r15w
mov rdx, rax
lea rcx, [rsp + 0xc0]
call fcn.180038970
nop
mov ebx, 3
mov dword [rsp + 0x40], ebx
mov qword [r14], r15
mov qword [rsp + 0xb0], r15
mov qword [rsp + 0xb8], r15
mov qword [rsp + 0xb0], r15
mov qword [rsp + 0xb8], 7
mov word [rsp + 0xa0], r15w
lea rdx, str.Global_
lea rcx, [rsp + 0xa0]
call fcn.180038970
nop
lea rdx, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae rdx, qword [rsp + 0xc0]
mov r8, qword [rsp + 0xd0]
lea rcx, [rsp + 0xa0]
call fcn.180029ad0
lea r8d, [rbx + 0x23]
lea rdx, str.C40CFCD4_C757_4139_A4DA_7CB51A8DBF80
lea rcx, [rsp + 0xa0]
call fcn.180029ad0
lea r8, [rsp + 0xa0]
cmp qword [rsp + 0xb8], 8
cmovae r8, qword [rsp + 0xa0]
xor edx, edx
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_CreateMutexW]
mov qword [r14], rax
test rax, rax
je 0x1800184cd
lea rcx, [rsp + 0xa0]
call fcn.1800389f0
nop
mov qword [rsp + 0x48], r14
mov rdi, qword [rsi + 0x40]
mov qword [rsi + 0x40], r14
mov qword [rsp + 0x48], rdi
test rdi, rdi
je 0x180018409
mov rcx, qword [rdi]
test rcx, rcx
je 0x1800183fb
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, 8
mov rcx, rdi
call fcn.180091f20
nop
and ebx, 0xfffffffd
mov dword [rsp + 0x40], ebx
lea rcx, [rsp + 0xc0]
call fcn.1800389f0
nop
test bl, 1
je 0x180018438
and ebx, 0xfffffffe
mov dword [rsp + 0x40], ebx
lea rcx, [rsp + 0x100]
call fcn.1800389f0
nop
jmp 0x18001843a
lea rcx, [rsp + 0xe0]
call fcn.1800389f0
mov rcx, qword [rsp + 0x120]
xor rcx, rsp
call fcn.1800916f0
lea r11, [rsp + 0x130]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
call qword [sym.imp.KERNEL32.dll_GetLastError]
nop
mov edx, eax
lea rax, str.Error_while_checking_file_exists._errorcode:
add rdx, rax
lea rcx, [rsp + 0x58]
call fcn.180035d70
lea rdx, [0x18015ddd0]
lea rcx, [rsp + 0x58]
call fcn.1800b2060
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rax, str.Failed_to_create_or_open_the_output_file_for_FileLogManager._errorcode:
add rdx, rax
lea rcx, [rsp + 0x70]
call fcn.180035d70
lea rdx, [0x18015ddd0]
lea rcx, [rsp + 0x70]
call fcn.1800b2060
nop
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
lea rax, str.Could_not_create_named_mutex._errorcode:
add rdx, rax
lea rcx, [rsp + 0x88]
call fcn.180035d70
lea rdx, [0x18015ddd0]
lea rcx, [rsp + 0x88]
call fcn.1800b2060
int3