Function at 0x18004ef00
Capabilities:
Check if file exists

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x140]
sub rsp, 0x240
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x298], rbx
mov rax, qword [0x180168908]
xor rax, rsp
mov qword [rbp + 0x130], rax
mov qword [rsp + 0x68], r8
mov r12, rdx
mov r14, rcx
xor r15d, r15d
mov r13d, r15d
mov rdi, qword [rdx + 8]
mov rbx, qword [rdx]
lea rsi, [r15 - 1]
cmp rbx, rdi
je 0x18004ef89
nop
mov rdx, qword [rbx]
sub rdx, 0x18
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18004ef7c
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
add rbx, 8
cmp rbx, rdi
jne 0x18004ef60
mov rbx, qword [r12]
mov qword [r12 + 8], rbx
lea rdx, [rsp + 0x30]
mov rcx, r14
call fcn.18004ed10
nop
call fcn.180009090
mov rcx, rax
test rax, rax
je 0x18004f6e4
mov rax, qword [rax]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x48], rbx
mov rdi, qword [r14 + 0x68]
mov r14, qword [rsp + 0x30]
mov ecx, 1
sub ecx, dword [rbx - 8]
mov eax, dword [rbx - 0xc]
sub eax, 0x104
or eax, ecx
jge 0x18004efed
mov edx, 0x104
lea rcx, [rsp + 0x48]
call fcn.180009160
mov rbx, qword [rsp + 0x48]
cmp dword [rbx - 0xc], 0x104
jl 0x18004f6ef
mov dword [rbx - 0x10], 0x104
mov word [rbx + 0x208], r15w
mov r8, rdi
mov rdx, r14
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathCombineW]
movsxd rdx, dword [rbx - 0xc]
mov rcx, rbx
call fcn.1800d7f80
test eax, eax
js 0x18004f6d9
cmp eax, dword [rbx - 0xc]
jg 0x18004f6d9
mov dword [rbx - 0x10], eax
cdqe
mov word [rbx + rax*2], r15w
cmp dword [rbx - 0x10], 0
je 0x18004f687
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x18004f687
mov rcx, rbx
call qword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
test eax, eax
jne 0x18004f687
movdqa xmm0, xmmword [0x1801106e0]
movdqu xmmword [rbp - 0x78], xmm0
mov byte [rsp + 0x78], al
lea rdx, [rsp + 0x78]
mov rcx, rbx
call fcn.18006e600
test eax, eax
jne 0x18004f11e
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x18004f0cd
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18004f0c8
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004f6fa
call fcn.1800a4c5c
movdqa xmm0, xmmword [0x1801106e0]
movdqu xmmword [rbp - 0x78], xmm0
mov byte [rsp + 0x78], 0
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18004f0f9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x18004f1ca
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
jmp 0x18004f1ca
lea rcx, [rsp + 0x78]
cmp qword [rbp - 0x70], 0x10
cmovae rcx, qword [rsp + 0x78]
call fcn.18008caa0
mov qword [rsp + 0x38], rax
test rax, rax
jne 0x18004f1ff
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x18004f17d
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18004f178
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004f700
call fcn.1800a4c5c
movdqa xmm0, xmmword [0x1801106e0]
mov byte [rsp + 0x78], 0
movdqu xmmword [rbp - 0x78], xmm0
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18004f1a9
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x18004f1c5
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov r13, qword [rsp + 0x38]
mov rcx, r13
call fcn.18008c920
mov eax, r15d
mov rcx, qword [rbp + 0x130]
xor rcx, rsp
call fcn.1800a5130
mov rbx, qword [rsp + 0x298]
add rsp, 0x240
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
lea rdx, str.session
mov rcx, rax
call fcn.18008c9d0
mov qword [rsp + 0x60], rax
test rax, rax
jne 0x18004f25c
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x18004f17d
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18004f178
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004f6cd
jmp 0x18004f178
lea rdx, str.urls_to_restore_on_startup
mov rcx, rax
call fcn.18008c9d0
mov rdi, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x18004f5c6
cmp dword [rax + 0x18], 5
jne 0x18004f5c6
mov rcx, rax
call fcn.18008c9b0
mov r14d, eax
mov dword [rsp + 0x50], eax
call fcn.180009090
mov rcx, rax
test rax, rax
je 0x18004f706
mov rax, qword [rax]
call qword [rax + 0x18]
lea rbx, [rax + 0x18]
mov qword [rsp + 0x40], rbx
mov qword [rbp - 0x58], r15
mov eax, reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x50], rax
mov byte [rbp - 0x68], 0
mov r13d, r15d
test r14d, r14d
jle 0x18004f560
nop dword [rax]
nop word [rax + rax]
mov qword [rbp - 0x38], r15
mov qword [rbp - 0x30], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x48], 0
xor r8d, r8d
lea rdx, [0x180112398]
lea rcx, [rbp - 0x48]
call fcn.18000a3d0
nop
lea r9, [rbp - 0x48]
mov r8d, r13d
mov rdx, rdi
lea rcx, [rbp - 0x28]
call fcn.18008d3f0
mov rbx, rax
lea rax, [rbp - 0x68]
cmp rax, rbx
je 0x18004f34a
lea rcx, [rbp - 0x68]
call fcn.180008ad0
movups xmm0, xmmword [rbx]
movups xmmword [rbp - 0x68], xmm0
movups xmm1, xmmword [rbx + 0x10]
movups xmmword [rbp - 0x58], xmm1
mov qword [rbx + 0x10], r15
mov qword [rbx + 0x18], reloc.WS2_32.dll_ntohs
mov byte [rbx], 0
mov rdx, qword [rbp - 0x10]
cmp rdx, 0x10
jb 0x18004f385
inc rdx
mov rcx, qword [rbp - 0x28]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18004f380
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004f711
call fcn.1800a4c5c
mov qword [rbp - 0x18], r15
mov qword [rbp - 0x10], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x28], 0
mov rdx, qword [rbp - 0x30]
cmp rdx, 0x10
jb 0x18004f3d0
inc rdx
mov rcx, qword [rbp - 0x48]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18004f3cb
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004f717
call fcn.1800a4c5c
lea r14, [rbp - 0x68]
cmp qword [rbp - 0x50], 0x10
cmovae r14, qword [rbp - 0x68]
lea rax, [rbp + 0x28]
mov qword [rbp + 0x20], rax
test r14, r14
jne 0x18004f3f7
mov rdx, r15
mov qword [rbp + 0x20], rdx
jmp 0x18004f4c0
mov rdi, rsi
nop word [rax + rax]
inc rdi
cmp byte [r14 + rdi], 0
jne 0x18004f400
inc edi
mov r9d, 0x80
lea r8, [rbp + 0x28]
mov edx, edi
lea rcx, [rbp + 0x20]
call fcn.180009580
mov dword [rsp + 0x28], edi
mov rax, qword [rbp + 0x20]
mov qword [rsp + 0x20], rax
mov r9d, edi
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, r15d
test eax, eax
sete bl
test eax, eax
jne 0x18004f4b4
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x18004f4b4
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], r15
mov r9d, edi
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, eax
mov r9d, 0x80
lea r8, [rbp + 0x28]
mov edx, eax
lea rcx, [rbp + 0x20]
call fcn.180009580
mov dword [rsp + 0x28], ebx
mov rax, qword [rbp + 0x20]
mov qword [rsp + 0x20], rax
mov r9d, edi
mov r8, r14
xor edx, edx
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, r15d
test eax, eax
sete bl
test ebx, ebx
jne 0x18004f723
mov rdx, qword [rbp + 0x20]
test rdx, rdx
jne 0x18004f4ca
mov eax, r15d
jmp 0x18004f4da
mov rax, rsi
nop dword [rax]
inc rax
cmp word [rdx + rax*2], 0
jne 0x18004f4d0
mov r8d, eax
lea rcx, [rsp + 0x40]
call fcn.180009210
nop
lea rax, [rbp + 0x28]
mov rcx, qword [rbp + 0x20]
cmp rcx, rax
je 0x18004f4fa
call fcn.1800d7598
lea rcx, [rsp + 0x40]
call fcn.18004e0a0
mov rbx, qword [rsp + 0x40]
cmp dword [rbx - 0x10], 0
je 0x18004f548
mov rdi, qword [r12 + 8]
cmp qword [r12 + 0x10], rdi
je 0x18004f533
lea rcx, [rbx - 0x18]
call fcn.180008df0
add rax, 0x18
mov qword [rdi], rax
add qword [r12 + 8], 8
jmp 0x18004f548
lea r8, [rsp + 0x40]
mov rdx, rdi
mov rcx, r12
call fcn.18004c400
mov rbx, qword [rsp + 0x40]
inc r13d
cmp r13d, dword [rsp + 0x50]
jge 0x18004f55c
mov rdi, qword [rsp + 0x58]
jmp 0x18004f2e0
mov rax, qword [rbp - 0x50]
cmp rax, 0x10
jb 0x18004f598
lea rdx, [rax + 1]
mov rcx, qword [rbp - 0x68]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18004f593
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004f71d
call fcn.1800a4c5c
mov qword [rbp - 0x58], r15
mov qword [rbp - 0x50], reloc.WS2_32.dll_ntohs
mov byte [rbp - 0x68], 0
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18004f5c1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
mov rbx, qword [rsp + 0x48]
movdqa xmm0, xmmword [0x1801106e0]
movdqu xmmword [rbp + 8], xmm0
mov byte [rbp - 8], 0
mov r8d, 0x12
lea rdx, str.restore_on_startup
lea rcx, [rbp - 8]
call fcn.18000a3d0
nop
mov r8d, esi
lea rdx, [rbp - 8]
mov rcx, qword [rsp + 0x60]
call fcn.18008d4a0
mov rcx, qword [rsp + 0x68]
mov dword [rcx], eax
mov rdx, qword [rbp + 0x10]
cmp rdx, 0x10
jb 0x18004f641
inc rdx
mov rcx, qword [rbp - 8]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18004f63c
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004f6c7
call fcn.1800a4c5c
mov r15d, 1
mov rdx, qword [rbp - 0x70]
cmp rdx, 0x10
jb 0x18004f17d
inc rdx
mov rcx, qword [rsp + 0x78]
mov rax, rcx
cmp rdx, 0x1000
jb 0x18004f178
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18004f6d3
jmp 0x18004f178
lea rdx, [rbx - 0x18]
mov eax, esi
lock xadd dword [rdx + 0x10], eax
sub eax, 1
jg 0x18004f6a1
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + 8]
nop
mov rdx, qword [rsp + 0x30]
add rdx, 0xffffffffffffffe8
lock xadd dword [rdx + 0x10], esi
sub esi, 1
jg 0x18004f1ca
mov rcx, qword [rdx]
mov r8, qword [rcx]
call qword [r8 + 8]
jmp 0x18004f1ca
call fcn.1800d79f8
nop
call fcn.1800d79f8
int3
call fcn.1800d79f8
int3
mov ecx, 0x80070057
call fcn.180008c20
nop
mov ecx, 0x80004005
call fcn.180008c20
nop
mov ecx, 0x80070057
call fcn.180008c20
int3
call fcn.1800d79f8
int3
call fcn.1800d79f8
nop
mov ecx, 0x80004005
call fcn.180008c20
nop
call fcn.1800d79f8
nop
call fcn.1800d79f8
nop
call fcn.1800d79f8
nop
mov r8d, 0x80
lea rdx, [rbp + 0x28]
mov rcx, qword [rbp + 0x20]
call fcn.180009610
call fcn.1800098d0
int3