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

Disassembly:
push rbp
push r12
lea rbp, [rsp - 0x78]
sub rsp, 0x178
mov rax, qword [0x180331338]
xor rax, rsp
mov qword [rbp + 0x50], rax
cmp qword [rcx + 0x18], 0x10
mov r12, rcx
jb 0x18012fbeb
mov rcx, qword [rcx]
mov qword [rsp + 0x198], rbx
mov qword [rsp + 0x1a0], rsi
mov qword [rsp + 0x1a8], rdi
mov qword [rsp + 0x170], r13
mov qword [rsp + 0x168], r14
mov qword [rsp + 0x160], r15
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x18012fe36
mov rsi, qword [r12 + 0x10]
test rsi, rsi
je 0x18012feb8
xor r15d, r15d
lea r14, [0x1802b1a54]
mov rbx, 0xffffffffffffffff
nop dword [rax]
inc rbx
cmp byte [r14 + rbx], 0
jne 0x18012fc50
mov r13, qword [r12 + 0x18]
mov rdi, r12
cmp r13, 0x10
jb 0x18012fc6c
mov rdi, qword [r12]
test rbx, rbx
je 0x18012fcd6
cmp r15, rsi
jae 0x18012fcd6
xor edx, edx
lea rcx, [rsp + 0x50]
mov r8d, 0x100
call fcn.18018d080
lea rdx, [rbx + r14]
mov rcx, r14
cmp r14, rdx
je 0x18012fcb0
nop dword [rax]
nop dword [rax + rax]
movzx eax, byte [rcx]
inc rcx
mov byte [rsp + rax + 0x50], 1
cmp rcx, rdx
jne 0x18012fca0
lea rdx, [rsi + rdi]
lea rax, [rdi + r15]
cmp rax, rdx
jae 0x18012fcd6
nop dword [rax]
movzx ecx, byte [rax]
cmp byte [rsp + rcx + 0x50], 0
jne 0x18012fd51
inc rax
cmp rax, rdx
jb 0x18012fcc0
mov rax, 0xffffffffffffffff
cmp rax, 0xffffffffffffffff
mov r15, rsi
xorps xmm0, xmm0
mov r14, r12
cmovne r15, rax
xor eax, eax
cmp rsi, r15
mov qword [rsp + 0x38], rax
mov rdi, r15
mov qword [rsp + 0x40], rax
cmovb rdi, rsi
movups xmmword [rsp + 0x28], xmm0
cmp r13, 0x10
jb 0x18012fd13
mov r14, qword [r12]
movabs r13, 0x7fffffffffffffff
cmp rdi, r13
ja 0x18012fec5
mov qword [rsp + 0x40], reloc.WS2_32.dll_ntohs
cmp rdi, 0x10
jae 0x18012fd56
mov r8, rdi
mov qword [rsp + 0x38], rdi
mov rdx, r14
lea rcx, [rsp + 0x28]
call fcn.18018c9d0
mov byte [rsp + rdi + 0x28], 0
jmp 0x18012fda6
sub rax, rdi
jmp 0x18012fcdd
mov rsi, rdi
or rsi, 0xf
cmp rsi, r13
jbe 0x18012fd67
mov rsi, r13
jmp 0x18012fd74
cmp rsi, 0x16
mov eax, socket
cmovb rsi, rax
lea rdx, [rsi + 1]
lea rcx, [rsp + 0x28]
call fcn.180017dd0
mov r8, rdi
mov qword [rsp + 0x28], rax
mov rdx, r14
mov qword [rsp + 0x38], rdi
mov rcx, rax
mov qword [rsp + 0x40], rsi
mov rbx, rax
call fcn.18018c9d0
mov byte [rbx + rdi], 0
cmp qword [rsp + 0x38], 0
je 0x18012fde8
cmp qword [rsp + 0x40], 0x10
lea rcx, [rsp + 0x28]
cmovae rcx, qword [rsp + 0x28]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x18012fde8
cmp qword [rsp + 0x40], 0x10
lea rcx, [rsp + 0x28]
cmovae rcx, qword [rsp + 0x28]
call fcn.1801e864c
test eax, eax
jne 0x18012fe7f
mov rdx, qword [rsp + 0x40]
inc r15
cmp rdx, 0x10
jb 0x18012fe28
mov rcx, qword [rsp + 0x28]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x18012fe23
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18012febf
call fcn.180150e00
mov rsi, qword [r12 + 0x10]
cmp r15, rsi
jb 0x18012fc3b
mov al, 1
mov r15, qword [rsp + 0x160]
mov r14, qword [rsp + 0x168]
mov r13, qword [rsp + 0x170]
mov rdi, qword [rsp + 0x1a8]
mov rsi, qword [rsp + 0x1a0]
mov rbx, qword [rsp + 0x198]
mov rcx, qword [rbp + 0x50]
xor rcx, rsp
call fcn.180150f20
add rsp, 0x178
pop r12
pop rbp
ret
mov rdx, qword [rsp + 0x40]
cmp rdx, 0x10
jb 0x18012feb8
mov rcx, qword [rsp + 0x28]
inc rdx
mov rax, rcx
cmp rdx, 0x1000
jb 0x18012feb3
mov rcx, qword [rcx - 8]
add rdx, 0x27
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
ja 0x18012febf
call fcn.180150e00
xor al, al
jmp 0x18012fe38
call fcn.18019b584
int3
call fcn.180017bb0
int3