Function at 0x140085380
Capabilities:
Check if file exists
Get file attributes

Disassembly:
push rbx
push rdi
sub rsp, 0x138
mov rbx, rcx
mov rcx, qword [0x14013f500]
mov rdi, rdx
call fcn.14002f9e0
test rdi, rdi
je 0x14008571d
cmp word [rdi], 0
je 0x14008571d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
mov edi, eax
cmp eax, 0xffffffff
jne 0x1400853d4
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, qword [0x14013b0f8]
mov dword [rcx + 0x40], eax
jmp 0x14008572b
mov rax, qword [0x14013b0f8]
mov qword [rsp + 0x160], rsi
xor esi, esi
xor edx, edx
mov rcx, rbx
mov qword [rsp + 0x130], r13
mov dword [rax + 0x40], esi
call fcn.14005e3f0
lea rcx, [rsp + 0x30]
mov edx, edi
call fcn.1400e18e0
mov rbx, qword [0x14013f500]
movzx r8d, byte [rbx + 0x23]
mov r13, rax
test r8b, r8b
jne 0x140085439
mov rcx, qword [rbx + 0x10]
xor r9d, r9d
or r8, 0xffffffffffffffff
mov rdx, rax
mov byte [rsp + 0x20], 1
call fcn.1400e6e20
mov esi, eax
jmp 0x1400856c2
mov qword [rsp + 0x150], rbp
mov dl, 1
mov qword [rsp + 0x168], r12
test rax, rax
jne 0x14008545e
xor dl, dl
mov r12, rsi
lea r13, [0x1401035ac]
jmp 0x140085480
cmp qword [rbx + 8], rax
jne 0x14008546d
mov r12, qword [rbx + 0x10]
shr r12, 1
jmp 0x140085480
or rcx, 0xffffffffffffffff
xor eax, eax
mov rdi, r13
repne scasw ax, word [rdi]
not rcx
lea r12, [rcx - 1]
lea rax, [r12 + 1]
lea rbp, [rax + rax]
cmp r8b, 2
jne 0x1400854a1
mov rdx, r12
mov rcx, r13
call fcn.140006bc0
mov esi, eax
jmp 0x1400856b2
mov rcx, qword [0x14013b0d0]
cmp rbp, rcx
jbe 0x1400854d4
cmp rbp, qword [rbx + 0x18]
jbe 0x1400854d4
lea r8, [0x1401035ac]
lea rdx, [0x140124720]
lea rcx, [0x140143150]
call fcn.14005f7b0
mov esi, eax
jmp 0x1400856b2
cmp rax, 2
jae 0x1400854f3
test dl, dl
mov rcx, rbx
setne sil
xor r8d, r8d
lea edx, [rsi + 2]
call fcn.1400e74d0
jmp 0x1400856ad
movzx eax, byte [rbx + 0x21]
test al, 2
je 0x140085510
mov rcx, qword [rbx]
and al, 0x3d
mov byte [rbx + 0x21], al
mov rax, qword [rcx]
call qword [rax + reloc.WSOCK32.dll_recv]
mov rcx, qword [0x14013b0d0]
mov r8, qword [rbx + 0x18]
and byte [rbx + 0x21], 0x82
cmp rbp, r8
jbe 0x140085687
movzx r9d, byte [rbx + 0x20]
movzx eax, r9b
cmp r9b, 1
jbe 0x140085549
cmp al, 2
je 0x140085586
mov rdi, qword [rsp + 0x158]
mov rax, qword [rsp + 0x158]
jmp 0x14008567b
mov edi, 0x80
cmp rbp, rdi
ja 0x140085586
cmp rbp, 8
ja 0x140085560
mov edi, 8
jmp 0x14008556c
mov eax, reloc.WSOCK32.dll_recv
cmp rbp, rax
cmovbe rdi, rax
mov rcx, rdi
call fcn.1400dd290
test rax, rax
je 0x1400856b2
mov byte [rbx + 0x20], 1
jmp 0x14008567b
cmp rbp, 0x20
jae 0x140085596
mov edi, SafeArrayAllocDescriptor
jmp 0x140085640
mov edi, 0x208
cmp rbp, rdi
jb 0x140085640
cmp rbp, 0x50000
jae 0x1400855fc
pxor xmm0, xmm0
cvtsi2sd xmm0, rbp
test rbp, rbp
jns 0x1400855c3
addsd xmm0, qword [0x1401279a8]
mulsd xmm0, qword [0x1401279e0]
movsd xmm1, qword [0x1401279d8]
xor eax, eax
comisd xmm0, xmm1
jbe 0x1400855f2
subsd xmm0, xmm1
comisd xmm0, xmm1
jae 0x1400855f2
movabs rdx, 0x8000000000000000
mov rax, rdx
cvttsd2si rdi, xmm0
add rdi, rax
jmp 0x140085640
cmp rbp, 0x320000
jae 0x14008560e
lea rdi, [rbp + 0x8000]
jmp 0x140085640
cmp rbp, 0xc80000
jae 0x140085639
movabs rax, 0x47ae147ae147ae15
mov rdi, rbp
mul rbp
sub rdi, rdx
shr rdi, 1
add rdi, rdx
shr rdi, 6
add rdi, rbp
jmp 0x140085640
lea rdi, [rbp + 0x20000]
cmp rdi, rcx
cmova rdi, rcx
cmp r9b, 2
jne 0x140085661
test r8, r8
je 0x140085661
mov rcx, qword [rbx + 8]
mov bpl, 1
call qword [sym.imp.MSVCR100.dll_free]
jmp 0x140085664
xor bpl, bpl
test rdi, rdi
js 0x1400856de
mov rcx, rdi
call qword [sym.imp.MSVCR100.dll_malloc]
test rax, rax
je 0x1400856de
mov byte [rbx + 0x20], 2
and byte [rbx + 0x21], 0x7f
mov qword [rbx + 8], rax
mov qword [rbx + 0x18], rdi
mov rcx, qword [rbx + 8]
cmp rcx, r13
je 0x14008569d
lea r8, [r12 + r12]
mov rdx, r13
call qword [sym.imp.MSVCR100.dll_memmove]
mov rax, qword [rbx + 8]
lea rcx, [r12 + r12]
mov word [rcx + rax], si
mov qword [rbx + 0x10], rcx
mov esi, 1
mov rbp, qword [rsp + 0x150]
mov r12, qword [rsp + 0x168]
mov r13, qword [rsp + 0x130]
mov eax, esi
mov rsi, qword [rsp + 0x160]
add rsp, 0x138
pop rdi
pop rbx
ret
test bpl, bpl
je 0x1400856f4
lea rax, [0x140141fa8]
mov qword [rbx + 0x18], rsi
mov qword [rbx + 8], rax
jmp 0x1400856fb
mov rax, qword [rbx + 8]
mov word [rax], si
lea r8, [0x1401035ac]
lea rdx, str.Out_of_memory.
lea rcx, [0x140143150]
mov qword [rbx + 0x10], rsi
call fcn.14005f7b0
mov esi, eax
jmp 0x1400856b2
mov rax, qword [0x14013b0f8]
mov dword [rax + 0x40], 0x57
mov dl, 1
mov rcx, rbx
call fcn.14005e3f0
add rsp, 0x138
pop rdi
pop rbx
ret