Function at 0x18000cfe8
Capabilities:
Check if file exists
Delete file
Get common file path
Get file attributes

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x198]
sub rsp, 0x298
lea rcx, [0x180029120]
call fcn.180010a08
and qword [0x180029248], 0
lea rcx, [rbp + 0x80]
mov edx, 0x104
call qword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
mov rcx, qword [0x180029070]
lea rdx, [0x180001b9c]
call fcn.18000c674
mov r13, rax
test rax, rax
je 0x18000d568
cmp byte [rax], 8
jne 0x18000d568
mov ecx, dword [rax + 0x118]
xor eax, eax
mov dword [rsp + 0x50], ecx
mov dword [rbp + 0x1f8], eax
test ecx, ecx
je 0x18000d568
xor edx, edx
mov qword [rsp + 0x58], rdx
or eax, 1
bsr ecx, eax
mov dword [rsp + 0x60], ecx
mov rcx, qword [r13 + rcx*8 + 0x10]
mov rbx, qword [rdx + rcx]
lea rdx, [0x180001dc0]
mov rcx, rbx
call fcn.18000c674
test rax, rax
je 0x18000d0a5
cmp byte [rax], 2
jne 0x18000d0a5
mov r14d, dword [rax + 0x10]
jmp 0x18000d0a8
xor r14d, r14d
lea rdx, [0x1800016a8]
mov rcx, rbx
call fcn.18000c674
test rax, rax
je 0x18000d0c7
cmp byte [rax], 2
jne 0x18000d0c7
mov r12d, dword [rax + 0x10]
jmp 0x18000d0ca
xor r12d, r12d
lea rdx, [0x180001bb0]
mov rcx, rbx
call fcn.18000c674
test rax, rax
je 0x18000d0e8
cmp byte [rax], 2
jne 0x18000d0e8
mov esi, dword [rax + 0x10]
jmp 0x18000d0ea
xor esi, esi
lea rdx, [0x18000196c]
mov rcx, rbx
call fcn.18000c674
test rax, rax
je 0x18000d109
cmp byte [rax], 4
jne 0x18000d109
mov rdi, qword [rax + 0x10]
jmp 0x18000d110
lea rdi, [0x18000175a]
lea rdx, [0x180001ba8]
mov rcx, rbx
call fcn.18000c674
test rax, rax
je 0x18000d12f
cmp byte [rax], 2
jne 0x18000d12f
mov r15d, dword [rax + 0x10]
jmp 0x18000d132
xor r15d, r15d
lea rdx, [0x180001dc8]
mov rcx, rbx
call fcn.18000c674
test rax, rax
je 0x18000d150
cmp byte [rax], 2
jne 0x18000d150
mov ebx, dword [rax + 0x10]
jmp 0x18000d155
mov ebx, 1
lea rcx, [0x180001d90]
call fcn.180004a90
test rax, rax
je 0x18000d170
call fcn.180004a90
inc rax
jmp 0x18000d173
mov rax, rcx
mov dword [rsp + 0x40], ebx
lea r8, [0x180001dd0]
mov dword [rsp + 0x38], r15d
mov r9d, r14d
mov qword [rsp + 0x30], rdi
mov edx, 0x77
mov dword [rsp + 0x28], esi
mov rcx, rax
mov dword [rsp + 0x20], r12d
call qword [0x180029278]
lea r8, [rsp + 0x70]
mov edx, r14d
lea rcx, [rsp + 0x70]
call fcn.180004fd8
lea rdx, [0x1800016f8]
mov rcx, rdi
call fcn.180025cc8
xor esi, esi
test eax, eax
je 0x18000d542
lea rdx, [0x180001e14]
mov rcx, rdi
call fcn.180025cc8
test eax, eax
je 0x18000d542
mov rax, qword [0x180027080]
mov dword [rbp + 0x1e0], esi
mov dword [rbp + 0x1e8], esi
mov dword [rbp + 0x1f0], esi
call qword [rax + 0xd8]
mov sil, al
test al, al
je 0x18000d369
mov r8d, r12d
lea rcx, [rsp + 0x70]
movzx edx, r14w
call fcn.18000cee4
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x18000d329
mov rax, qword [0x180027080]
lea rcx, [rsp + 0x70]
or r8d, 0xffffffff
movzx edx, r14w
call qword [rax + pe_nt_image_headers64]
mov r8d, eax
test eax, eax
je 0x18000d2a4
lea r15, [0x180001d90]
mov rcx, r15
call fcn.180004a90
test rax, rax
je 0x18000d272
call fcn.180004a90
inc rax
jmp 0x18000d275
mov rax, r15
mov dword [rsp + 0x20], r8d
lea r9, [rsp + 0x70]
lea r8, [0x180001e20]
mov edx, 0x9c
mov rcx, rax
call qword [0x180029278]
lea rcx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_DeleteFileA]
jmp 0x18000d542
lea rax, [rbp + 0x1e8]
movzx edx, r14w
mov qword [rsp + 0x20], rax
lea r9, [rbp + 0x1e0]
mov rax, qword [0x180027080]
lea r8, [rbp + 0x1f0]
lea rcx, [rsp + 0x70]
call qword [rax + 0x2e8]
mov r8d, eax
test eax, eax
je 0x18000d369
lea r15, [0x180001d90]
mov rcx, r15
call fcn.180004a90
test rax, rax
je 0x18000d2fd
call fcn.180004a90
inc rax
jmp 0x18000d300
mov rax, r15
mov dword [rsp + 0x28], r8d
lea r9, [rsp + 0x70]
lea r8, [0x180001e48]
mov dword [rsp + 0x20], r14d
mov edx, 0xa7
mov rcx, rax
call qword [0x180029278]
jmp 0x18000d542
lea r15, [0x180001d90]
mov rcx, r15
call fcn.180004a90
test rax, rax
je 0x18000d347
call fcn.180004a90
inc rax
jmp 0x18000d34a
mov rax, r15
lea r9, [rsp + 0x70]
mov edx, 0xad
lea r8, [0x180001e78]
mov rcx, rax
call qword [0x180029278]
jmp 0x18000d542
test r15d, r15d
jne 0x18000d542
lea rdx, [0x1800016f8]
mov rcx, rdi
call fcn.180025cc8
test eax, eax
je 0x18000d542
lea rdx, [0x180001e14]
mov rcx, rdi
call fcn.180025cc8
test eax, eax
je 0x18000d542
test sil, sil
je 0x18000d3af
test bl, 1
jne 0x18000d3b8
jmp 0x18000d542
test bl, 2
je 0x18000d542
mov edx, 0x28
xor ecx, ecx
call qword [sym.imp.KERNEL32.dll_LocalAlloc]
mov rdi, rax
test rax, rax
je 0x18000d542
and qword [rax + 0x18], 0
and qword [rax + 0x20], 0
mov word [rax + 2], r14w
movzx ecx, word [rbp + 0x1e0]
mov word [rax + 8], cx
movzx ecx, word [rbp + 0x1e8]
mov word [rax + 0xa], cx
mov ecx, dword [rbp + 0x1f0]
mov dword [rax + 4], ecx
lea rcx, [0x180029259]
mov byte [rax + 0xc], 0
call fcn.180005a44
mov ebx, dword [0x180029228]
lea rsi, [0x180029120]
mov rcx, rsi
lea edx, [rbx + 1]
call fcn.180010ab0
mov eax, ebx
or eax, 1
bsr ecx, eax
mov dword [rsp + 0x64], ecx
mov rax, qword [rsi + rcx*8]
lea rcx, [rsp + 0x70]
mov qword [rax + rbx*8], rdi
xor eax, eax
xchg byte [0x180029259], al
call qword [sym.imp.KERNEL32.dll_LoadLibraryA]
lea r15, [0x180001d90]
mov rsi, rax
mov rcx, r15
test rax, rax
jne 0x18000d4b9
call fcn.180004a90
test rax, rax
je 0x18000d475
call fcn.180004a90
lea rbx, [rax + 1]
jmp 0x18000d478
mov rbx, r15
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea r14, [0x1800272f0]
mov r8d, eax
mov rcx, r14
lea rdx, [0x180001060]
call qword [sym.imp.USER32.dll_wsprintfA]
lea r9, [rsp + 0x70]
mov qword [rsp + 0x20], r14
lea r8, [0x180001e90]
mov edx, 0xe3
mov rcx, rbx
call qword [0x180029278]
jmp 0x18000d4ee
mov qword [rdi + 0x18], rsi
call fcn.180004a90
test rax, rax
je 0x18000d4d1
call fcn.180004a90
inc rax
jmp 0x18000d4d4
mov rax, r15
movzx r9d, word [rdi + 2]
lea r8, [0x180001eb0]
mov edx, pe_nt_image_headers64
mov rcx, rax
call qword [0x180029278]
mov al, byte [rdi + 0xc]
sub al, 3
test al, 0xfd
je 0x18000d542
test rsi, rsi
je 0x18000d505
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_FreeLibrary]
and qword [rdi + 0x18], 0
mov rcx, r15
mov byte [rdi + 0xc], 4
call fcn.180004a90
test rax, rax
je 0x18000d525
call fcn.180004a90
inc rax
jmp 0x18000d528
mov rax, r15
movzx r9d, word [rdi + 2]
lea r8, [0x180001ed0]
mov edx, 0xf0
mov rcx, rax
call qword [0x180029278]
mov eax, dword [rbp + 0x1f8]
mov rdx, qword [rsp + 0x58]
inc eax
add rdx, 8
mov dword [rbp + 0x1f8], eax
mov qword [rsp + 0x58], rdx
cmp eax, dword [rsp + 0x50]
jb 0x18000d073
mov al, 1
add rsp, 0x298
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret