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

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
mov rbp, rsp
sub rsp, 0x58
mov rdi, rcx
xor r12d, r12d
mov qword [rbp - 0x20], r12
mov qword [rbp - 0x18], r12
mov r15b, 1
mov r14d, r12d
mov rcx, qword [rcx + 0x70]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
test eax, eax
jle 0x140250c1a
lea r13, [0x140379908]
mov esi, 0xffffffff
nop word [rax + rax]
mov rcx, qword [rdi + 0x70]
mov rax, qword [rcx]
mov r8d, r14d
lea rdx, [rbp + 0x48]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
nop
lea rdx, [rbp + 0x48]
lea rcx, [rbp + 0x58]
call fcn.140015780
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop
test al, 0x10
je 0x140250a41
cmp eax, 0xffffffff
je 0x140250a41
test byte [rdi + 0x40], 8
je 0x140250b90
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x140250a93
mov rax, qword [rcx]
lea rdx, [rbp + 0x48]
call qword [rax + reloc.OLEAUT32.dll_SafeArrayGetDim]
jmp 0x140250a8b
test byte [rdi + 0x40], 4
je 0x140250b90
mov rax, qword [rbp + 0x48]
cmp byte [rax], 0
je 0x140250b90
lea rdx, [rbp + 0x48]
lea rcx, [rbp + 0x60]
call fcn.140015780
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
nop
cmp eax, 0xffffffff
je 0x140250b90
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x140250a93
mov rax, qword [rcx]
lea rdx, [rbp + 0x48]
call qword [rax + reloc.WS2_32.dll_htonl]
test al, al
je 0x140250b90
lea rbx, [rdi + 0x50]
test r15b, r15b
je 0x140250abc
mov rcx, rbx
call fcn.1400033c0
cmp dword [rbx + 8], 0
je 0x140250ab5
mov rcx, qword [rbx]
call fcn.1400e0818
mov qword [rbx], r12
mov dword [rbx + 8], r12d
xor r15b, r15b
mov eax, dword [rbx + 0xc]
inc eax
cmp eax, dword [rbx + 8]
jle 0x140250ae1
mov ecx, eax
test eax, eax
jns 0x140250acf
lea ecx, [rax + 1]
sar ecx, 1
lea edx, [rcx + 8]
add edx, eax
and edx, 0xfffffff8
mov rcx, rbx
call fcn.1400042c0
movsxd rcx, dword [rbx + 0xc]
lea eax, [rcx + 1]
mov dword [rbx + 0xc], eax
mov rax, qword [rbx]
lea rdx, [rax + rcx*8]
mov rax, qword [rbp + 0x48]
mov qword [rdx], rax
mov rcx, qword [rbp + 0x48]
mov eax, dword [rcx - 0x10]
nop
test eax, 0x30000000
jne 0x140250b0c
lock inc dword [rcx - 0x10]
lea r8, [rdi + 0x48]
lea rdx, [rbp + 0x50]
lea rcx, [rbp + 0x48]
call fcn.140175f10
mov rbx, rax
mov ecx, dword [rbp - 0x14]
lea edx, [rcx + 1]
cmp edx, dword [rbp - 0x18]
jle 0x140250b4a
mov ecx, edx
test edx, edx
jns 0x140250b34
lea ecx, [rdx + 1]
sar ecx, 1
add edx, 8
add edx, ecx
and edx, 0xfffffff8
lea rcx, [rbp - 0x20]
call fcn.1400042c0
mov ecx, dword [rbp - 0x14]
lea eax, [rcx + 1]
mov dword [rbp - 0x14], eax
movsxd rcx, ecx
mov rax, qword [rbp - 0x20]
lea rdx, [rax + rcx*8]
mov rax, qword [rbx]
mov qword [rdx], rax
mov qword [rbx], r13
mov eax, dword [0x1403798f8]
nop
test eax, 0x30000000
jne 0x140250b90
mov eax, esi
lock xadd dword [0x1403798f8], eax
dec eax
cmp eax, 0xffffffff
jne 0x140250b90
lea rcx, [0x1403798f8]
call fcn.1400da0f0
nop
mov rcx, qword [rbp + 0x48]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x140250bb4
mov eax, esi
lock xadd dword [rcx], eax
dec eax
cmp eax, 0xffffffff
jne 0x140250bb4
call fcn.1400da0f0
inc r14d
mov rcx, qword [rdi + 0x70]
mov rax, qword [rcx]
call qword [rax + reloc.WS2_32.dll_htonl]
cmp r14d, eax
jl 0x1402509f0
cmp dword [rbp - 0x14], 0
jle 0x140250c1a
lea r8, [0x14037fb04]
lea rdx, [rbp + 0x48]
lea rcx, [rbp - 0x20]
call fcn.140163cb0
nop
lea rcx, [rdi + 0x230]
xor r8d, r8d
mov rdx, rax
call fcn.14027e100
nop
mov rcx, qword [rbp + 0x48]
add rcx, 0xfffffffffffffff0
mov eax, dword [rcx]
nop
test eax, 0x30000000
jne 0x140250c1a
lock xadd dword [rcx], esi
dec esi
cmp esi, 0xffffffff
jne 0x140250c1a
call fcn.1400da0f0
lea rcx, [rdi - 0xd8]
call fcn.140250c60
nop
lea rcx, [rbp - 0x20]
call fcn.1400033c0
mov rcx, qword [rbp - 0x20]
add rsp, 0x58
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
jmp fcn.1400e0818