Function at 0x180170dc0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov qword [rsp + 0x10], rbx
push rdi
sub rsp, 0x40
cmp dword [rcx + 0x3c], 0
mov rdi, rdx
mov r9, rcx
jne case.0x180170dfa.4
movsxd r10, dword [rcx + 0x30]
cmp r10d, 5
ja case.0x180170dfa.4
lea rcx, [0x180000000]
mov r8d, dword [rcx + r10*4 + 0x17109c]
add r8, rcx
jmp r8
xor ebx, ebx
mov r10d, 0xff00
cmp word [r9 + 0x9e], r10w
setae bl
mov eax, ebx
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
mov qword [rsp + 0x50], rsi
mov rsi, qword [r9 + 0x78]
test dword [rsi + 0x14], 0x2000
je 0x180170e43
mov rsi, qword [rsp + 0x50]
xor ebx, ebx
mov eax, ebx
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
cmp dword [r9 + 0x38], 0
jne 0x180170ece
cmp dword [rsi + 0x1c], 0
jne 0x180170e85
test byte [rsi + 0x30], 2
je 0x180170ee5
lea rcx, [0x18067c258]
call qword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [rsi + 0x1c], 0
jne 0x180170e78
mov dword [rsi + 0x1c], recv
lea rcx, [0x18067c258]
call qword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor ebx, ebx
mov qword [rsp + 0x30], rbx
mov edx, ebx
mov qword [rsp + 0x38], rbx
mov r8d, ebx
test rdi, rdi
je 0x180170ed3
mov ecx, dword [rdi]
cmp edx, ecx
jg 0x180170ed3
add ecx, dword [rdi + 8]
lea eax, [r8 + rdx]
cmp eax, ecx
jl 0x180170ed3
mov rax, qword [rsp + 0x30]
mov ecx, dword [rdi + 4]
shr rax, 0x20
cmp eax, ecx
jg 0x180170ed3
mov rdx, qword [rsp + 0x38]
add ecx, dword [rdi + 0xc]
shr rdx, 0x20
add edx, eax
cmp edx, ecx
jl 0x180170ed3
mov ebx, 1
mov rsi, qword [rsp + 0x50]
mov eax, ebx
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
mov rax, qword [rsi]
xor ebx, ebx
mov ecx, ebx
mov r8, qword [rax + 0x68]
test r8, r8
je 0x180170f06
lea rdx, [rsp + 0x30]
mov rcx, rsi
call r8
mov ecx, eax
test eax, eax
jne 0x180170f16
movups xmm0, xmmword [0x1805897d8]
movups xmmword [rsp + 0x30], xmm0
test ecx, ecx
je 0x180170ece
mov r8d, dword [rsp + 0x38]
mov edx, dword [rsp + 0x30]
jmp 0x180170e96
test dword [r9 + 0x78], 0x2000
jne 0x180170f84
cmp dword [r9 + 0x38], 0
jne 0x18017107c
test rdi, rdi
je 0x180170f84
mov ecx, dword [r9 + 0x7c]
mov r8d, dword [rdx]
cmp ecx, r8d
jg 0x180170f84
mov edx, dword [r9 + 0x84]
add edx, ecx
mov ecx, dword [rdi + 8]
add ecx, r8d
cmp edx, ecx
jl 0x180170f84
mov ecx, dword [r9 + 0x80]
mov r8d, dword [rdi + 4]
cmp ecx, r8d
jg 0x180170f84
mov edx, dword [r9 + 0x88]
add edx, ecx
mov ecx, dword [rdi + 0xc]
add ecx, r8d
cmp edx, ecx
jge 0x18017107c
xor ebx, ebx
mov eax, ebx
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
mov r8d, dword [r9 + 0x78]
test r8d, r8d
je 0x180170f84
mov r11d, dword [r9 + 0x38]
test r11d, r11d
jne 0x180170fc4
mov rdx, qword [r9 + 0x80]
lea eax, [r8 - 1]
lea rax, [rax + rax*2]
add rax, rax
movsd xmm0, qword [rdx]
ucomisd xmm0, qword [rdx + rax*8]
jp 0x180170fc4
je 0x180170f84
cmp r10d, 2
jne 0x180170f84
test r11d, r11d
jne 0x18017104a
mov rcx, r9
call fcn.1801704d0
test eax, eax
jne 0x180170f84
test rdi, rdi
je 0x180170f84
mov ecx, dword [rdi + 4]
mov eax, dword [rdi + 0xc]
mov edx, dword [rdi]
add eax, ecx
movd xmm2, ecx
mov rcx, r9
cvtdq2pd xmm2, xmm2
movd xmm0, eax
mov eax, dword [rdi + 8]
add eax, edx
movd xmm1, edx
cvtdq2pd xmm0, xmm0
movd xmm3, eax
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
cvtdq2pd xmm3, xmm3
cvtdq2pd xmm1, xmm1
movsd qword [rsp + 0x20], xmm0
call fcn.1801705a0
xorps xmm0, xmm0
comisd xmm0, xmmword [rsp + 0x30]
ja 0x180170f84
movsd xmm0, qword [rsp + 0x38]
comisd xmm0, xmmword [0x1805becf0]
ja 0x180170f84
xor ebx, ebx
mov edx, ebx
test r8d, r8d
je 0x18017107c
mov r11, qword [r9 + 0x80]
mov r10d, 0xff00
mov eax, edx
lea rcx, [rax + rax*2]
add rcx, rcx
cmp word [r11 + rcx*8 + 0x2e], r10w
jb 0x180170f86
inc edx
cmp edx, r8d
jb 0x180171060
mov ebx, 1
mov eax, ebx
mov rbx, qword [rsp + 0x58]
add rsp, 0x40
pop rdi
ret
mov rbx, qword [rsp + 0x58]
xor eax, eax
add rsp, 0x40
pop rdi
ret