Function at 0x180160ed0
Capabilities:
Check if file exists

Disassembly:
push rbp
push r12
push r13
push r14
push r15
sub rsp, 0x40
lea rbp, [rsp + 0x20]
mov qword [rbp + 0x50], rbx
mov qword [rbp + 0x58], rsi
mov qword [rbp + 0x60], rdi
mov rax, qword [0x1802658e0]
xor rax, rbp
mov qword [rbp + 0x10], rax
mov rdi, qword [rbp + 0x80]
xor r14d, r14d
or rbx, 0xffffffffffffffff
mov r12, r9
mov dword [rbp], r8d
mov r15, rdx
mov qword [rbp + 8], rdx
mov r13, rcx
movabs rsi, 0xffffffffffffff0
test rdi, rdi
je 0x18016111c
cmp word [rdi], r14w
je 0x18016111c
mov rcx, rdi
mov esi, r14d
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x180160f5b
mov ecx, 2
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1801612f4
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
mov rax, rbx
jne 0x180160fd0
mov rsi, rdi
mov r15, r14
inc rax
cmp word [rdi + rax*2], r14w
jne 0x180160f71
inc eax
cmp eax, 0x3fffffff
jg 0x180161028
lea r8d, [rax + rax]
cdqe
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x180160fa4
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.18017e6d0
sub rsp, rcx
mov r9d, 3
lea rcx, [rsp + 0x20]
mov rdx, rdi
call fcn.180163000
jmp 0x18016102b
inc rax
cmp word [rdi + rax*2], si
jne 0x180160fd0
inc eax
cmp eax, 0x3fffffff
jle 0x180160fe7
mov r15, r14
jmp 0x180161028
lea r8d, [rax + rax]
cdqe
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x180161003
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.18017e6d0
sub rsp, rcx
mov r9d, 3
lea rcx, [rsp + 0x20]
mov rdx, rdi
call fcn.180163000
mov r15, rax
mov rax, r14
mov r8, r15
mov r15, qword [rbp + 8]
mov rdx, rax
mov rcx, r15
call fcn.180003550
test eax, eax
jne 0x180161053
mov ecx, reloc.WS2_32.dll_listen
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1801612f4
mov rcx, r15
call fcn.180003530
test eax, eax
jne 0x180161071
mov ecx, 0x65b
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1801612f4
cmp dword [r13 + 0x10], 1
jne 0x180161112
test byte [rbp], 1
je 0x180161112
test rsi, rsi
je 0x180161112
mov rax, rbx
inc rax
cmp word [rsi + rax*2], r14w
jne 0x180161092
inc eax
cmp eax, 0x3fffffff
jle 0x1801610aa
mov rax, r14
jmp 0x1801610e8
lea r8d, [rax + rax]
cdqe
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1801610c6
movabs rcx, 0xffffffffffffff0
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.18017e6d0
sub rsp, rcx
mov r9d, 3
lea rcx, [rsp + 0x20]
mov rdx, rsi
call fcn.180163000
mov rcx, rax
call fcn.1800065c0
test rax, rax
jne 0x180161107
mov ecx, 0x10d2
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1801612f4
mov rdx, rax
mov rcx, r15
call fcn.180006450
movabs rsi, 0xffffffffffffff0
test r12, r12
je 0x1801612ef
cmp word [r12], r14w
je 0x1801612ef
mov rcx, r12
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x180160f49
mov rcx, r12
call qword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x180160f49
mov rdi, qword [rbp + 0x70]
test rdi, rdi
je 0x180160f49
cmp word [rdi], r14w
je 0x180160f49
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x180160f49
mov rcx, rdi
call qword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x180160f49
mov rdx, qword [rbp + 0x78]
test rdx, rdx
je 0x1801611f7
cmp word [rdx], r14w
je 0x1801611f7
mov rax, rbx
nop dword [rax]
inc rax
cmp word [rdx + rax*2], r14w
jne 0x1801611a0
inc eax
cmp eax, 0x3fffffff
jle 0x1801611b8
mov rax, r14
jmp 0x1801611ec
lea r8d, [rax + rax]
cdqe
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x1801611cd
mov rcx, rsi
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.18017e6d0
sub rsp, rcx
mov r9d, 3
lea rcx, [rsp + 0x20]
call fcn.180163000
mov rdx, rax
mov rcx, r15
call fcn.180002d50
mov rax, rbx
nop word [rax + rax]
inc rax
cmp word [rdi + rax*2], r14w
jne 0x180161200
inc eax
cmp eax, 0x3fffffff
jle 0x180161218
mov rax, r14
jmp 0x18016124f
lea r8d, [rax + rax]
cdqe
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x18016122d
mov rcx, rsi
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.18017e6d0
sub rsp, rcx
mov r9d, 3
lea rcx, [rsp + 0x20]
mov rdx, rdi
call fcn.180163000
mov r8d, 1
mov rdx, rax
mov rcx, r15
call fcn.180007e90
test eax, eax
jne 0x180161274
lea ecx, [rax + 0x56]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1801612f4
inc rbx
cmp word [r12 + rbx*2], r14w
jne 0x180161274
inc ebx
cmp ebx, 0x3fffffff
jg 0x1801612c3
movsxd rax, ebx
lea r8d, [rbx + rbx]
add rax, rax
lea rcx, [rax + 0xf]
cmp rcx, rax
ja 0x18016129e
mov rcx, rsi
and rcx, 0xfffffffffffffff0
mov rax, rcx
call fcn.18017e6d0
sub rsp, rcx
mov r9d, 3
lea rcx, [rsp + 0x20]
mov rdx, r12
call fcn.180163000
mov r14, rax
mov rdx, r14
mov rcx, r15
call fcn.180008dd0
test eax, eax
je 0x180161041
mov rcx, r15
call fcn.1800017c0
test eax, eax
jne 0x1801612ef
lea ecx, [rax + 0xc]
call qword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x1801612f4
mov eax, 1
mov rcx, qword [rbp + 0x10]
xor rcx, rbp
call fcn.180179370
mov rbx, qword [rbp + 0x50]
mov rsi, qword [rbp + 0x58]
mov rdi, qword [rbp + 0x60]
lea rsp, [rbp + 0x20]
pop r15
pop r14
pop r13
pop r12
pop rbp
ret