Function at 0x140087a80
Capabilities:
Connect socket
Get socket status
Resolve dns
Set socket configuration

Disassembly:
mov rax, rsp
mov qword [rax + 0x18], rbx
mov dword [rax + 0x20], r9d
mov dword [rax + 0x10], edx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rax - 0x408]
sub rsp, 0x4d0
xor r12d, r12d
mov edi, r8d
mov r14, rcx
mov ebx, r12d
test rcx, rcx
je 0x140087e8f
lea ecx, [r12 + 2]
lea eax, [rcx + 0x15]
bt r8d, 0x1c
jae 0x140087ad3
mov esi, eax
btr edi, 0x1c
jmp 0x140087ad5
mov esi, ecx
mov eax, 1
test edi, edi
mov ecx, esi
cmove edi, eax
xor r8d, r8d
mov edx, edi
call qword [sym.imp.WS2_32.dll_socket]
mov r15, rax
cmp eax, 0xffffffff
je 0x140087e8f
mov rcx, r14
call fcn.14014ecc0
mov r13, rax
mov eax, reloc.WS2_32.dll_socket
cmp esi, eax
jne 0x140087b6a
cmp dword [0x1406483d4], r12d
je 0x140087e79
lea r8, [rsp + 0x70]
mov rdx, r13
mov ecx, eax
call fcn.140087954
test eax, eax
jg 0x140087b61
lea r9, [rsp + 0x68]
xor r8d, r8d
xor edx, edx
mov rcx, r13
call qword [0x1406483e0]
test rax, rax
jne 0x140087e79
mov rcx, qword [rsp + 0x68]
mov rax, qword [rcx + 0x20]
movups xmm0, xmmword [rax + 8]
movdqu xmmword [rsp + 0x70], xmm0
call qword [0x1406483e8]
mov r14d, dword [rbp + 0x410]
jmp 0x140087ba5
mov rcx, r13
call qword [sym.imp.WS2_32.dll_inet_addr]
mov r14d, eax
cmp eax, 0xffffffff
jne 0x140087b93
mov rcx, r13
call qword [sym.imp.WS2_32.dll_gethostbyname]
test rax, rax
je 0x140087b93
mov rax, qword [rax + 0x18]
mov rcx, qword [rax]
mov r14d, dword [rcx]
cmp r14d, 0xffffffff
mov eax, r12d
setne al
test eax, eax
je 0x140087e79
mov r12, qword [rbp + 0x430]
xor eax, eax
cmp dword [rbp + 0x438], eax
jne 0x140087bc2
test r12, r12
je 0x140087c14
cmp word [r12], ax
je 0x140087c14
xor edx, edx
lea rcx, [rbp - 0x70]
lea r8d, [rdx + 0x1c]
call sub.msvcrt.dll_memset
xor edx, edx
lea rcx, [rbp - 0x80]
lea r8d, [rdx + 0x10]
call sub.msvcrt.dll_memset
mov eax, dword [rbp + 0x438]
xor ecx, ecx
mov dword [rsp + 0x28], eax
cmp esi, 0x17
lea r9, [rbp - 0x70]
lea r8, [rbp - 0x80]
movsxd rdx, r15d
sete cl
mov qword [rsp + 0x20], r12
call fcn.1400881c4
xor r12d, r12d
test eax, eax
je 0x140087e79
jmp 0x140087c17
xor r12d, r12d
xor edx, edx
cmp esi, 0x17
jne 0x140087c54
lea r8d, [rdx + 0x1c]
lea rcx, [rsp + 0x48]
call sub.msvcrt.dll_memset
movzx ecx, word [rbp + 0x418]
mov r14d, esi
mov word [rsp + 0x48], r14w
call qword [sym.imp.WS2_32.dll_htons]
movups xmm0, xmmword [rsp + 0x70]
mov word [rsp + 0x4a], ax
movdqu xmmword [rsp + 0x50], xmm0
jmp 0x140087c8b
lea rcx, [rsp + 0x30]
mov r8d, reloc.WS2_32.dll_recv
call sub.msvcrt.dll_memset
movzx ecx, word [rbp + 0x418]
mov eax, 2
mov word [rsp + 0x30], ax
call qword [sym.imp.WS2_32.dll_htons]
mov dword [rsp + 0x34], r14d
mov word [rsp + 0x32], ax
mov r14d, reloc.WS2_32.dll_socket
mov eax, 1
cmp edi, eax
movsxd rdi, r15d
mov rcx, rdi
jne 0x140087dfe
mov r14d, dword [rbp + 0x428]
test r14d, r14d
jle 0x140087d95
lea r8, [rbp + 0x410]
mov edx, 0x8004667e
mov dword [rbp + 0x410], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x140087e79
mov eax, reloc.WS2_32.dll_socket
mov rcx, rdi
cmp esi, eax
jne 0x140087ce5
lea r8d, [rax + 5]
lea rdx, [rsp + 0x48]
jmp 0x140087cf0
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x140087e79
lea esi, [rax + 2]
mov eax, 0x10624dd3
lea ecx, [r15 + 1]
lea r9, [rbp + 0x1c0]
lea r8, [rbp - 0x50]
mov qword [rbp - 0x48], rdi
imul r14d
sar edx, 6
mov dword [rbp - 0x50], esi
mov qword [rbp + 0x1c8], rdi
mov eax, edx
mov dword [rbp + 0x1c0], esi
shr eax, 0x1f
add edx, eax
mov dword [rsp + 0x40], edx
imul eax, edx, 0x3e8
sub r14d, eax
xor edx, edx
imul eax, r14d, 0x3e8
mov dword [rsp + 0x44], eax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x20], rax
call qword [sym.imp.WS2_32.dll_select]
cmp eax, esi
jne 0x140087d77
lea rdx, [rbp - 0x50]
mov rcx, rdi
call sub.WS2_32.dll___WSAFDIsSet
test eax, eax
cmovne rbx, rsi
lea r8, [rbp + 0x410]
mov edx, 0x8004667e
mov rcx, rdi
mov dword [rbp + 0x410], r12d
call qword [sym.imp.WS2_32.dll_ioctlsocket]
jmp 0x140087dca
mov eax, reloc.WS2_32.dll_socket
cmp esi, eax
jne 0x140087da9
lea r8d, [rax + 5]
lea rdx, [rsp + 0x48]
jmp 0x140087db4
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140087e79
mov esi, 1
mov ebx, esi
test rbx, rbx
je 0x140087e79
mov rcx, qword [0x140646f64]
xor edx, edx
lea r8d, [rdx + 0x18]
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x140087e79
mov dword [rax], esi
mov qword [rax + 8], rdi
mov qword [rax + 0x10], r12
jmp 0x140087e79
lea r8, [rbp + 0x410]
mov edx, 0x8004667e
mov dword [rbp + 0x410], eax
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
jne 0x140087e79
mov rcx, qword [0x140646f64]
lea r8d, [rax + 0x50]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_HeapAlloc]
mov rbx, rax
test rax, rax
je 0x140087e79
mov eax, 2
mov dword [rbx], eax
cmp esi, r14d
jne 0x140087e5e
movups xmm0, xmmword [rsp + 0x48]
movups xmmword [rbx + 4], xmm0
movsd xmm1, qword [rsp + 0x58]
movsd qword [rbx + 0x14], xmm1
mov eax, dword [rsp + 0x60]
mov dword [rbx + 0x1c], eax
jmp 0x140087e68
movups xmm0, xmmword [rsp + 0x30]
movdqu xmmword [rbx + 4], xmm0
cmp esi, r14d
mov qword [rbx + 0x30], rdi
mov qword [rbx + 0x28], r12
sete al
mov byte [rbx + 0x20], al
mov rcx, r13
call fcn.14014ecb0
test rbx, rbx
jne 0x140087e8f
movsxd rcx, r15d
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, rbx
mov rbx, qword [rsp + 0x520]
add rsp, 0x4d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret