Function at 0x1401b8af0
Capabilities:
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x98
mov rax, qword [0x1403721e8]
xor rax, rsp
mov qword [rsp + 0x88], rax
mov rdi, r9
mov r14, r8
mov rbp, rdx
mov rsi, rcx
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rsp + 0x70], xmm0
mov qword [rsp + 0x80], rax
movzx r9d, byte [r9 + 0x161]
lea r8, str.createSocket
mov rdx, rdi
lea rcx, [rsp + 0x70]
call fcn.1400f6520
nop
call fcn.1401b7140
test al, al
je 0x1401b8b6b
test r14, r14
jne 0x1401b8b9a
mov rax, qword [rdi]
lea rdx, str.NULL_pointer_passed_to_createSocket_ipv6
mov rcx, rdi
call qword [rax + 0x28]
xor bl, bl
lea rcx, [rsp + 0x70]
call fcn.1400f65e0
movzx eax, bl
mov rcx, qword [rsp + 0x88]
xor rcx, rsp
call fcn.1402545b0
add rsp, 0x98
pop r15
pop r14
pop rdi
pop rsi
pop rbp
pop rbx
ret
mov rcx, rsi
call fcn.1401b9890
mov bl, 1
mov r15d, dword [r14 + 4]
mov r8d, dword [r14 + 0xc]
mov edx, dword [r14 + 8]
mov ecx, r15d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsi + 0x298], rax
cmp rax, 0xffffffffffffffff
jne 0x1401b8bf0
mov ecx, dword [r14 + 4]
cmp ecx, 2
je 0x1401b8bda
mov eax, 2
cmp ecx, 0x17
cmovne ecx, eax
mov edx, 1
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsi + 0x298], rax
cmp qword [rsi + 0x298], 0xffffffffffffffff
jne 0x1401b8c61
mov r8d, dword [r14 + 4]
lea rdx, str.ai_family
mov rcx, rdi
call fcn.1400f6d00
mov r8d, dword [r14 + 8]
lea rdx, str.ai_socktype
mov rcx, rdi
call fcn.1400f6d00
mov r8d, dword [r14 + 0xc]
lea rdx, str.ai_protocol
mov rcx, rdi
call fcn.1400f6d00
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
mov r8, rdi
xor edx, edx
mov ecx, eax
call fcn.1401baf60
cmp ebx, 0x2726
jne 0x1401b8c5f
mov rax, qword [rdi]
lea rdx, str.See_https:__social.msdn.microsoft.com_Forums_windowsdesktop_en_US_3076a9cd_57a0_418d_8de1_07adc3b486bb_socket_fails_with_error_10022_when_application_is_run_from_certain_network_shares_on_vista_and_forumwsk_for_a_possible_cause_of_this_error.
mov rcx, rdi
call qword [rax + 0x30]
xor bl, bl
mov eax, dword [r14 + 4]
mov dword [rsi + 0x2a0], eax
cmp byte [rbp + 0xf3c], 0
jne 0x1401b8c7f
mov rdx, rdi
mov rcx, rsi
call fcn.1401b7090
cmp byte [rbp + 0xf44], 0
jne 0x1401b8c93
mov rdx, rdi
mov rcx, rsi
call fcn.1401b6fe0
mov rcx, qword [rsi + 0x298]
cmp rcx, 0xffffffffffffffff
je 0x1401b8b6d
mov dword [rsp + 0x58], 1
mov dword [rsp + 0x60], 1
mov dword [rsp + 0x68], 0x7148
mov dword [rsp + 0x64], 0x1d0d8
xor edx, edx
mov dword [rsp + 0x54], edx
mov qword [rsp + 0x40], rdx
mov qword [rsp + 0x38], rdx
lea rax, [rsp + 0x54]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], edx
mov qword [rsp + 0x20], rdx
lea r9d, [rdx + 0xc]
lea r8, [rsp + 0x60]
mov edx, 0x98000004
call qword [sym.imp.WS2_32.dll_WSAIoctl]
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x58]
mov edx, 0xffff
mov r8d, 8
mov rcx, qword [rsi + 0x298]
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp byte [rsp + 0xf0], 0
je 0x1401b8b6d
lea rcx, [rbp + 0xf48]
call fcn.1400da410
test eax, eax
jne 0x1401b8d4a
cmp dword [rbp + 0xfd8], eax
je 0x1401b8b6d
lea r8, [rbp + 0xf48]
lea rdx, str.bindIpAddr3
mov rcx, rdi
call fcn.1400f70c0
mov r8d, dword [rbp + 0xfd8]
test r8d, r8d
je 0x1401b8d7b
lea rdx, str.bindPort
mov rcx, rdi
call fcn.1400f6d00
mov byte [rsp + 0x50], 0
lea rcx, [rbp + 0xf48]
call fcn.1400da480
mov r8, rax
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x50]
movzx edx, word [rbp + 0xfd8]
mov rcx, rsi
cmp r15d, 0x17
jne 0x1401b8db0
call fcn.1401b6e60
jmp 0x1401b8db5
call fcn.1401b6d30
movzx ebx, al
test al, al
jne 0x1401b8b6d
mov rax, qword [rdi]
lea rdx, str.Failed_to_bind_to_local_IP_address
mov rcx, rdi
call qword [rax + 0x28]
mov rcx, rsi
call fcn.1401b9890
jmp 0x1401b8b6d