Function at 0x140120950
Capabilities:
Set socket configuration

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r15
sub rsp, 0x188
mov rax, qword [0x1402ba030]
xor rax, rsp
mov qword [rsp + 0x170], rax
mov rsi, qword [rcx + 0x10]
xor r13b, r13b
mov rbx, rdx
mov r15, rcx
mov qword [rsi + 0x98], 0xffffffffffffffff
cmp qword [rdx + 0x280], 0
je 0x140120a00
mov rax, qword [rdx + 0xd8]
lea rdi, [rdx + 0xd0]
test rax, rax
je 0x1401209b1
mov byte [rax + 0x18b], 1
jmp 0x1401209c0
mov rcx, qword [rdi]
test rcx, rcx
je 0x1401209c0
mov byte [rcx + 0x18b], 1
mov rcx, qword [rbx + 0x288]
lea r8, [rsi + 8]
xor edx, edx
call qword [rbx + 0x280]
mov qword [rsi + 0x98], rax
mov rax, qword [rbx + 0xd8]
test rax, rax
je 0x1401209ef
mov byte [rax + 0x18b], r13b
jmp 0x140120a17
mov rax, qword [rdi]
test rax, rax
je 0x140120a17
mov byte [rax + 0x18b], r13b
jmp 0x140120a17
mov r8d, dword [rsi + 0x10]
mov edx, dword [rsi + 0xc]
mov ecx, dword [rsi + 8]
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsi + 0x98], rax
cmp qword [rsi + 0x98], 0xffffffffffffffff
mov qword [rsp + 0x1d0], rbp
mov qword [rsp + 0x180], r14
je 0x140120c68
mov rdx, rbx
mov rcx, r15
call fcn.140120890
mov edi, eax
test eax, eax
jne 0x140120c6d
mov r9d, dword [rsi + 0xd0]
lea r8, [rsi + 0xa0]
lea rdx, str.__Trying__s:_d...
mov rcx, rbx
call fcn.140106050
cmp dword [rsi + 8], 2
jne 0x140120bbe
cmp dword [rsi + 0xc], 1
jne 0x140120bbe
cmp byte [rbx + 0xaac], r13b
je 0x140120ad5
mov rcx, qword [rsi + 0x98]
lea r9, [rsp + 0x50]
lea edx, [rdi + 6]
mov dword [rsp + 0x50], 1
lea r8d, [rdi + 1]
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140120ad5
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ecx, eax
lea rdx, [rsp + 0x70]
call fcn.1400e7750
mov r8, rax
lea rdx, str.Could_not_set_TCP_NODELAY:__s
mov rcx, rbx
call fcn.140106050
mov rcx, qword [rsi + 0x98]
call fcn.14011fcf0
cmp byte [rbx + 0xab3], r13b
je 0x140120bca
mov rbp, qword [rsi + 0x98]
lea r9, [rsp + 0x50]
mov rcx, rbp
mov dword [rsp + 0x50], 1
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 8
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140120b39
mov r8, rbp
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__d
mov rcx, rbx
call fcn.140106050
jmp 0x140120bca
mov eax, dword [rbx + 0xa1c]
lea r8, [rsp + 0x58]
xor ecx, ecx
mov dword [rsp + 0x58], 1
mov qword [rsp + 0x40], rcx
btr eax, 0x1f
mov qword [rsp + 0x38], rcx
mov edx, 0x98000004
imul eax, eax, 0x3e8
lea r9d, [rcx + 0xc]
mov dword [rsp + 0x5c], eax
imul eax, dword [rbx + 0xa20], 0x3e8
mov dword [rsp + 0x50], eax
mov dword [rsp + 0x60], eax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], ecx
mov qword [rsp + 0x20], rcx
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x140120bca
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, ebp
lea rdx, str.Failed_to_set_SIO_KEEPALIVE_VALS_on_fd__d:__d
mov r9d, eax
mov rcx, rbx
call fcn.140106050
jmp 0x140120bca
mov rcx, qword [rsi + 0x98]
call fcn.14011fcf0
cmp qword [rbx + 0x270], 0
je 0x140120c36
mov rax, qword [rbx + 0xd8]
lea r14, [rbx + 0xd0]
test rax, rax
jne 0x140120bef
mov rax, qword [r14]
test rax, rax
je 0x140120bf6
mov byte [rax + 0x18b], 1
mov rdx, qword [rsi + 0x98]
xor r8d, r8d
mov rcx, qword [rbx + 0x278]
call qword [rbx + 0x270]
mov ecx, eax
mov rax, qword [rbx + 0xd8]
test rax, rax
jne 0x140120c23
mov rax, qword [r14]
test rax, rax
je 0x140120c2a
mov byte [rax + 0x18b], r13b
cmp ecx, 2
jne 0x140120ceb
mov r13b, 1
cmp dword [rsi + 8], 2
jne 0x140120cfd
mov r8, qword [rsi + 0x98]
mov r9d, 2
mov rdx, qword [r15 + 0x18]
mov rcx, rbx
call fcn.14011fde0
mov edi, eax
test eax, eax
je 0x140120cfd
cmp eax, 1
jne 0x140120c6d
mov edi, 7
mov rbp, qword [rsi + 0x98]
cmp rbp, 0xffffffffffffffff
je 0x140120d4c
mov r15, qword [r15 + 0x18]
test r15, r15
je 0x140120d38
cmp qword [r15 + 0x38], 0
mov rdx, rbp
mov rcx, rbx
je 0x140120d33
call fcn.1400f68f0
mov rax, qword [rbx + 0xd8]
lea r14, [rbx + 0xd0]
test rax, rax
jne 0x140120cbc
mov rax, qword [r14]
test rax, rax
je 0x140120cc3
mov byte [rax + 0x18b], 1
mov rcx, qword [r15 + 0x40]
mov rdx, rbp
call qword [r15 + gethostname]
mov rax, qword [rbx + 0xd8]
test rax, rax
jne 0x140120ce2
mov rax, qword [r14]
test rax, rax
je 0x140120d41
mov byte [rax + 0x18b], 0
jmp 0x140120d41
test ecx, ecx
je 0x140120c36
mov edi, Ordinal_46
jmp 0x140120c6d
mov rcx, qword [rsi + 0x98]
lea r8, [rsp + 0x50]
mov edx, 0x8004667e
mov dword [rsp + 0x50], 1
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test r13b, r13b
je 0x140120d4c
mov rdx, rbx
mov rcx, r15
call fcn.1401206e0
mov byte [r15 + 0x24], 1
jmp 0x140120d4c
call fcn.1400f68f0
mov rcx, rbp
call qword [sym.imp.WS2_32.dll_closesocket]
mov qword [rsi + 0x98], 0xffffffffffffffff
mov r14, qword [rsp + 0x180]
mov eax, edi
mov rbp, qword [rsp + 0x1d0]
mov rcx, qword [rsp + 0x170]
xor rcx, rsp
call fcn.1401526c0
add rsp, 0x188
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret