Function at 0x140168210
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 8], rcx
push rbp
push rbx
push rsi
push rdi
push r14
lea rbp, [rsp - 0x37]
sub rsp, 0xa0
mov rbx, r8
mov edi, edx
mov rsi, rcx
xor r14d, r14d
lea rcx, [rbp + 0x17]
call fcn.14015ccc0
movups xmm0, xmmword [rbx]
movaps xmmword [rbp - 9], xmm0
mov r9d, edi
lea r8, [rbp - 9]
lea rdx, [rbp - 0x29]
lea rcx, [rbp + 0x17]
call fcn.14015e0b0
nop
mov rax, qword [rbp - 0x29]
test rax, rax
je 0x140168270
mov qword [rbp - 0x29], r14
mov qword [rbp - 0x19], r14
mov qword [rsi], rax
jmp 0x140168587
lea rcx, [rbp + 0x17]
call fcn.14015ceb0
mov ecx, eax
xor r8d, r8d
lea edx, [r8 + 1]
call qword [sym.imp.WS2_32.dll_socket]
mov rdx, rax
lea rcx, [rbp + 7]
call fcn.14015b9c0
nop
lea rcx, [rbp + 7]
call fcn.14015bc40
test al, al
jne 0x14016831d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
mov r8b, 1
xor edx, edx
lea rcx, [rbp - 9]
call fcn.140133d00
movsd xmm0, qword [rax]
movsd qword [rbp - 0x29], xmm0
mov ebx, dword [rax + 8]
mov qword [rbp - 0x19], r14
mov ecx, 0x26
call fcn.1402c53a4
mov rdx, rax
movsd xmm0, qword [rbp - 0x29]
movsd qword [rax], xmm0
mov dword [rax + 8], ebx
movups xmm0, xmmword [str.Failed_to_create_a_socket]
movups xmmword [rax + 0xc], xmm0
movsd xmm0, qword [0x1402cf030]
movsd qword [rax + 0x1c], xmm0
movzx eax, byte [reloc.WS2_32.dll_WSACleanup]
mov byte [rdx + 0x24], al
mov byte [rdx + 0x25], 0
mov qword [rbp - 0x19], r14
mov qword [rsi], rdx
test rdx, rdx
je 0x140168598
jmp 0x14016857e
xor r8d, r8d
lea rdx, [rbp - 0x29]
lea rcx, [rbp + 7]
call fcn.14015bfe0
nop
mov rax, qword [rbp - 0x29]
test rax, rax
je 0x140168347
mov qword [rbp - 0x29], r14
mov qword [rbp - 0x19], r14
mov qword [rsi], rax
jmp 0x14016857e
lea rcx, [rbp + 7]
call fcn.14015c080
mov rdi, rax
mov dword [rbp + 0x7f], r14d
mov dword [rbp + 0x77], 1
mov dword [rsp + 0x20], 4
lea r9, [rbp + 0x77]
mov edx, 0xffff
mov r8d, 4
mov rcx, rax
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x20], 4
lea r9, [rbp + 0x77]
mov edx, 0xffff
mov r8d, 8
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x20], 4
lea r9, [rbp + 0x7f]
mov edx, 0xffff
mov r8d, pe_nt_image_headers64
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x20], 4
lea r9, [rbp + 0x77]
mov edx, 6
lea r8d, [rdx - 5]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
lea rcx, [rbp + 0x17]
call fcn.14015d1c0
mov rbx, rax
lea rcx, [rbp + 0x17]
call fcn.14015d190
mov r8d, ebx
mov rdx, rax
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x14016848b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
mov r8b, 1
xor edx, edx
lea rcx, [rbp - 9]
call fcn.140133d00
movsd xmm0, qword [rax]
movsd qword [rbp - 0x19], xmm0
mov ebx, dword [rax + 8]
mov qword [rbp - 0x29], r14
mov ecx, 0x24
call fcn.1402c53a4
mov qword [rbp - 0x29], rax
movsd xmm0, qword [rbp - 0x19]
movsd qword [rax], xmm0
mov dword [rax + 8], ebx
lea rcx, [rax + 0xc]
movups xmm0, xmmword [str.Failed_to_bind_a_socket]
movups xmmword [rcx], xmm0
mov eax, dword [0x1402cf050]
mov dword [rcx + 0x10], eax
movzx eax, word [0x1402cf054]
mov word [rcx + 0x14], ax
movzx eax, byte [reloc.WS2_32.dll_WSACleanup]
mov byte [rcx + 0x16], al
mov byte [rcx + 0x17], 0
lea rdx, [rbp - 0x29]
mov rcx, rsi
call fcn.1401360f0
nop
jmp 0x140168517
mov edx, 0x2000
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x140168536
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
mov r8b, 1
xor edx, edx
lea rcx, [rbp - 9]
call fcn.140133d00
movsd xmm0, qword [rax]
movsd qword [rbp - 0x19], xmm0
mov ebx, dword [rax + 8]
mov qword [rbp - 0x29], r14
mov ecx, 0x29
call fcn.1402c53a4
mov qword [rbp - 0x29], rax
movsd xmm0, qword [rbp - 0x19]
movsd qword [rax], xmm0
mov dword [rax + 8], ebx
lea rcx, [rax + 0xc]
movups xmm0, xmmword [str.Failed_to_listen_on_a_socket]
movups xmmword [rcx], xmm0
movsd xmm0, qword [0x1402cf1d8]
movsd qword [rcx + 0x10], xmm0
mov eax, dword [0x1402cf1e0]
mov dword [rcx + 0x18], eax
mov byte [rcx + 0x1c], 0
lea rdx, [rbp - 0x29]
mov rcx, rsi
call fcn.1401360f0
nop
mov rcx, qword [rbp - 0x29]
test rcx, rcx
je 0x14016857e
movsd xmm0, qword [rcx]
movsd qword [rbp - 0x19], xmm0
test byte [rbp - 0x19], 1
jne 0x14016857e
call fcn.1402c539c
jmp 0x14016857e
lea rcx, [rbp + 0x17]
call fcn.14015ceb0
mov edi, eax
mov ecx, 0x130
call fcn.1402c5360
mov rbx, rax
mov qword [rbp - 0x19], rax
test rax, rax
je 0x140168574
lea rdx, [rbp + 7]
lea rcx, [rbp - 9]
call fcn.14015b860
mov r8d, edi
mov rdx, rax
mov rcx, rbx
call fcn.140166eb0
jmp 0x140168577
mov rax, r14
mov qword [rsi], r14
mov qword [rsi + 8], rax
lea rcx, [rbp + 7]
call fcn.14015baf0
mov rax, rsi
add rsp, 0xa0
pop r14
pop rdi
pop rsi
pop rbx
pop rbp
ret
mov r8d, 0x1cc
lea rdx, str.D:_a_ton_ton_tdutils_td_utils_Status.h
lea rcx, str.status_.is_error__
call fcn.140153ae0
int3