Function at 0x1401663d0
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rbx
mov qword [rsp + 8], rcx
push rbp
push rsi
push rdi
push r14
push r15
mov rbp, rsp
sub rsp, 0x80
mov r14, rdx
mov rsi, rcx
xor r15d, r15d
mov rcx, rdx
call fcn.14015ceb0
mov ecx, eax
lea edx, [r15 + 1]
lea r8d, [r15 + 6]
call qword [sym.imp.WS2_32.dll_socket]
mov rdx, rax
lea rcx, [rbp - 0x38]
call fcn.14015b9c0
nop
lea rcx, [rbp - 0x38]
call fcn.14015bc40
test al, al
jne 0x1401664a0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
mov r8b, 1
xor edx, edx
lea rcx, [rbp - 0x48]
call fcn.140133d00
movsd xmm0, qword [rax]
movsd qword [rbp + 0x40], xmm0
mov ebx, dword [rax + 8]
mov qword [rbp + 0x48], r15
lea ecx, [r15 + 0x26]
call fcn.1402c53a4
mov rdx, rax
movsd xmm0, qword [rbp + 0x40]
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], r15b
mov qword [rbp + 0x48], r15
mov qword [rsi], rdx
test rdx, rdx
je 0x140166694
jmp 0x140166657
xor r8d, r8d
lea rdx, [rbp + 0x48]
lea rcx, [rbp - 0x38]
call fcn.14015bfe0
mov rax, qword [rbp + 0x48]
test rax, rax
jne 0x14016652d
lea rcx, [rbp - 0x38]
call fcn.14015c080
mov rbx, rax
mov dword [rbp + 0x40], 1
mov dword [rsp + 0x20], 4
lea r9, [rbp + 0x40]
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 + 0x40]
mov edx, 0xffff
mov r8d, 8
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
mov dword [rsp + 0x20], 4
lea r9, [rbp + 0x40]
mov edx, 6
lea r8d, [rdx - 5]
mov rcx, rbx
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, r15
test rax, rax
je 0x14016653a
mov qword [rsi], rax
jmp 0x140166657
lea rdx, [rbp - 0x28]
mov rcx, r14
call fcn.14015cee0
lea rax, str.D:_a_ton_ton_tdutils_tdutilsportSocketFd.cpp
mov qword [rbp - 0x48], rax
mov dword [rbp - 0x40], 0x250
lea rcx, [rbp - 0x28]
call fcn.14015d1c0
mov qword [rbp + 0x40], rax
lea rdx, [rbp + 0x40]
lea rcx, [rbp - 0x48]
call fcn.1401497e0
mov edi, eax
lea rcx, [rbp - 0x28]
call fcn.14015d190
mov rbx, rax
lea rcx, [rbp - 0x38]
call fcn.14015c080
mov r8d, edi
mov rdx, rbx
mov rcx, rax
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x14016661a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r9d, eax
mov r8b, 1
xor edx, edx
lea rcx, [rbp - 0x48]
call fcn.140133d00
movsd xmm0, qword [rax]
movsd qword [rbp + 0x40], xmm0
mov ebx, dword [rax + 8]
mov qword [rbp + 0x48], r15
mov ecx, 0x24
call fcn.1402c53a4
mov r8, rax
movsd xmm0, qword [rbp + 0x40]
movsd qword [rax], xmm0
mov dword [rax + 8], ebx
movups xmm0, xmmword [str.Failed_to_bind_a_socket]
movups xmmword [rax + 0xc], xmm0
mov ecx, dword [0x1402cf050]
mov dword [rax + 0x1c], ecx
movzx eax, word [0x1402cf054]
mov word [r8 + 0x20], ax
movzx eax, byte [reloc.WS2_32.dll_WSACleanup]
mov byte [r8 + 0x22], al
mov byte [r8 + 0x23], 0
mov qword [rbp + 0x48], r15
mov qword [rsi], r8
test r8, r8
je 0x14016667a
jmp 0x140166657
mov ecx, 0x1c0
call fcn.1402c5360
mov rbx, rax
mov qword [rbp + 0x40], rax
test rax, rax
je 0x14016664d
lea rdx, [rbp - 0x38]
lea rcx, [rbp - 0x48]
call fcn.14015b860
mov r8, r14
mov rdx, rax
mov rcx, rbx
call fcn.140163c60
jmp 0x140166650
mov rax, r15
mov qword [rsi], r15
mov qword [rsi + 8], rax
lea rcx, [rbp - 0x38]
call fcn.14015baf0
mov rax, rsi
mov rbx, qword [rsp + 0xb8]
add rsp, 0x80
pop r15
pop r14
pop rdi
pop rsi
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
nop
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