Function at 0x140039530
Capabilities:
Set socket configuration

Disassembly:
mov qword [rsp + 0x18], rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x70]
sub rsp, 0x170
mov rax, qword [0x14009b900]
xor rax, rsp
mov qword [rbp + 0x60], rax
mov r15, qword [rcx + 0x10]
mov r13, rcx
lea rcx, [rsp + 0x48]
mov rsi, rdx
call fcn.14003bf70
lea r14, [r15 + 0x98]
mov rcx, rsi
lea rdx, [r15 + 8]
mov r8, r14
movups xmm0, xmmword [rax]
movups xmmword [r15 + 0x108], xmm0
call fcn.140039d70
mov ebx, eax
test eax, eax
jne 0x140039603
mov rbx, qword [r13 + 0x10]
mov edx, dword [rbx + 0x14]
lea r9, [rbx + 0xfc]
lea r8, [rbx + 0xa0]
lea rcx, [rbx + 0x18]
call fcn.140032010
test al, al
jne 0x14003966b
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov ecx, dword [rax]
mov dword [rbx + 0x14c], ecx
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov ebx, dword [rax]
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, ebx
mov rdi, rax
call fcn.140016190
mov r8d, dword [rdi]
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov r9, rax
mov rcx, rsi
call fcn.14002f510
mov ebx, 2
mov r9, qword [r14]
cmp r9, 0xffffffffffffffff
je 0x140039625
mov rdx, qword [r13 + 0x18]
mov r8d, 1
mov rcx, rsi
call fcn.140039c50
mov qword [r14], 0xffffffffffffffff
mov rax, qword [r14]
lea r8, str.cf_socket_open_______d__fd_qd
mov r9d, ebx
mov qword [rsp + 0x20], rax
mov rdx, r13
mov rcx, rsi
call fcn.14002f650
mov eax, ebx
mov rcx, qword [rbp + 0x60]
xor rcx, rsp
call fcn.140078d10
mov rbx, qword [rsp + 0x1c0]
add rsp, 0x170
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
xor ebx, ebx
cmp dword [r15 + 8], 0x17
jne 0x1400396a2
mov rcx, qword [r14]
lea r9, [rsp + 0x38]
mov edx, reloc.WLDAP32.dll_Ordinal_41
mov dword [rsp + 0x38], ebx
mov r8d, reloc.WLDAP32.dll_Ordinal_27
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
lea rdx, str.__Trying___s_:_d...
jmp 0x1400396a9
lea rdx, str.__Trying__s:_d...
mov r9d, dword [r15 + 0xfc]
lea r8, [r15 + 0xa0]
mov rcx, rsi
call fcn.14002f600
mov eax, dword [r15 + 8]
cmp eax, 2
je 0x1400396cd
cmp eax, 0x17
jne 0x140039738
cmp dword [r15 + 0xc], 1
jne 0x140039738
mov dil, 1
cmp byte [rsi + 0xa72], bl
je 0x14003973b
mov rcx, qword [r14]
lea r9, [rsp + 0x38]
mov edx, 6
mov dword [rsp + 0x38], 1
mov r8d, 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x14003973b
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8d, 0x100
lea rdx, [rsp + 0x60]
mov ecx, eax
call fcn.140016190
mov r8, rax
lea rdx, str.Could_not_set_TCP_NODELAY:__s
mov rcx, rsi
call fcn.14002f600
jmp 0x14003973b
xor dil, dil
mov eax, dword [0x14009c100]
mov r12, qword [r14]
mov dword [rsp + 0x38], 0x4020
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x40], 4
test eax, eax
jne 0x140039799
mov r9d, 2
mov dword [rsp + 0x20], 3
xor r8d, r8d
xor edx, edx
mov ecx, 6
call fcn.14006bd90
test al, al
je 0x14003978d
mov dword [0x14009c100], 2
jmp 0x1400397f0
mov dword [0x14009c100], 1
jmp 0x14003979e
cmp eax, 2
je 0x1400397f0
lea rax, [rsp + 0x40]
mov edx, 0xffff
lea r9, [rsp + 0x30]
mov qword [rsp + 0x20], rax
mov r8d, 0x1001
mov rcx, r12
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x1400397cf
mov eax, dword [rsp + 0x38]
cmp dword [rsp + 0x30], eax
jg 0x1400397f0
lea r9, [rsp + 0x38]
mov dword [rsp + 0x20], 4
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, r12
call qword [sym.imp.WS2_32.dll_setsockopt]
test dil, dil
je 0x140039935
cmp byte [rsi + 0xa79], 0
je 0x140039935
mov rdi, qword [r14]
lea r9, [rsp + 0x30]
mov rcx, rdi
mov dword [rsp + 0x30], 1
mov edx, 0xffff
mov dword [rsp + 0x20], 4
mov r8d, 8
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140039848
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Failed_to_set_SO_KEEPALIVE_on_fd__qd:_errno__d
jmp 0x140039927
mov ecx, dword [rsi + 0x9e4]
call fcn.1400337d0
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], eax
mov edx, 6
mov dword [rsp + 0x20], 4
mov r8d, 3
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140039897
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8, rdi
lea rdx, str.Failed_to_set_TCP_KEEPIDLE_on_fd__qd:_errno__d
mov r9d, eax
mov rcx, rsi
call fcn.14002f600
mov ecx, dword [rsi + 0x9e8]
call fcn.1400337d0
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], eax
mov edx, 6
mov dword [rsp + 0x20], 4
mov r8d, reloc.WS2_32.dll_recvfrom
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x1400398e6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov r8, rdi
lea rdx, str.Failed_to_set_TCP_KEEPINTVL_on_fd__qd:_errno__d
mov r9d, eax
mov rcx, rsi
call fcn.14002f600
mov ecx, dword [rsi + 0x9ec]
call fcn.1400337d0
lea r9, [rsp + 0x30]
mov dword [rsp + 0x30], eax
mov edx, 6
mov dword [rsp + 0x20], 4
mov r8d, reloc.WS2_32.dll_recv
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x140039935
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
lea rdx, str.Failed_to_set_TCP_KEEPCNT_on_fd__qd:_errno__d
mov r9d, eax
mov r8, rdi
mov rcx, rsi
call fcn.14002f600
cmp qword [rsi + 0x290], 0
je 0x140039980
mov dl, 1
mov rcx, rsi
call fcn.14001acd0
mov rdx, qword [r14]
xor r8d, r8d
mov rcx, qword [rsi + 0x298]
call qword [rsi + 0x290]
xor edx, edx
mov rcx, rsi
mov edi, eax
call fcn.14001acd0
cmp edi, 2
jne 0x140039972
mov r12b, 1
jmp 0x140039983
test edi, edi
je 0x140039980
mov ebx, Ordinal_46
jmp 0x140039603
xor r12b, r12b
mov eax, dword [r15 + 8]
cmp eax, 2
je 0x140039991
cmp eax, 0x17
jne 0x1400399ca
lea rcx, [r15 + 0x18]
call fcn.14006c2b0
mov r9d, dword [r15 + 8]
mov rcx, rsi
mov r8, qword [r14]
mov rdx, qword [r13 + 0x18]
mov dword [rsp + 0x20], eax
call fcn.140038f50
mov ebx, eax
test eax, eax
je 0x1400399ca
cmp eax, 1
jne 0x140039603
mov ebx, 7
jmp 0x140039603
mov rcx, qword [r14]
mov edx, 1
call fcn.14006c280
test eax, eax
jns 0x1400399f2
mov ebx, 1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [r15 + 0x14c], eax
jmp 0x140039603
cmp dword [r15 + 0xc], 2
setne al
mov byte [r15 + 0x153], al
test ebx, ebx
jne 0x140039603
test r12b, r12b
je 0x140039625
mov rdx, rsi
mov rcx, r13
call fcn.140039ad0
lea rcx, [rsp + 0x48]
call fcn.14003bf70
movups xmm0, xmmword [rax]
movups xmmword [r15 + 0x118], xmm0
mov byte [r13 + 0x24], 1
jmp 0x140039625