Function at 0x140020180
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push r14
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x440
mov ebp, r9d
mov r14, r8
mov rdi, rdx
mov rsi, rcx
mov dword [rsp + 0x30], 1
mov rbx, qword [rcx]
lea r8, [rsp + 0x30]
mov rcx, rbx
mov edx, 0x8004667e
call sub.ws2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x1400201dc
cmp word [rdi], 0
je 0x1400201f0
movups xmm0, xmmword [rdi + 4]
mov eax, dword [rdi + 0x14]
mov edx, dword [rdi + 0x18]
movzx ecx, word [rdi + 0x1c]
mov r8d, 0x1c
mov r9w, 0x17
jmp 0x140020205
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
jmp 0x1400203f5
mov eax, dword [rdi + 2]
movzx ecx, word [rdi + 6]
mov r8d, 0x10
mov r9w, 2
xorps xmm0, xmm0
rol cx, 8
mov word [rsp + 0x30], r9w
mov word [rsp + 0x32], cx
mov dword [rsp + 0x34], eax
movups xmmword [rsp + 0x38], xmm0
mov dword [rsp + 0x48], edx
lea rdx, [rsp + 0x30]
mov rcx, rbx
call sub.ws2_32.dll_connect
cmp eax, 0xffffffff
je 0x140020237
xor edi, edi
jmp 0x140020246
call sub.ws2_32.dll_WSAGetLastError
mov edi, eax
shl rdi, 0x20
or rdi, 2
mov dword [rsp + 0x30], 0
lea r8, [rsp + 0x30]
mov rcx, rbx
mov edx, 0x8004667e
call sub.ws2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x140020285
test rdi, rdi
je 0x1400202a2
mov eax, edi
and eax, 3
lea rcx, [0x140107780]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
movzx eax, byte [rdi + 0x10]
jmp 0x1400202ad
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
test rdi, rdi
jne 0x1400203ed
jmp 0x1400203f5
xor esi, esi
jmp 0x1400203f5
movzx eax, byte [rdi + 0xf]
cmp al, 0xd
jne 0x1400202d4
test r14, r14
jne 0x140020300
test ebp, ebp
jne 0x140020300
lea rsi, str.cannot_set_a_0_duration_timeout
jmp 0x1400203ed
mov rax, rdi
shr rax, 0x20
cmp eax, 0x2733
je 0x1400202b1
mov rsi, rdi
jmp 0x1400203f5
mov rax, rdi
shr rax, 0x20
cmp eax, 0x28
ja case.default.0x1400202fa
lea rcx, [0x140107790]
movsxd rax, dword [rcx + rax*4]
add rax, rcx
jmp rax
xor eax, eax
jmp 0x1400202ad
cmp r14, 0x7fffffff
mov eax, 0x7fffffff
cmovb rax, r14
mov ecx, ebp
imul rcx, rcx, 0x10624dd3
shr rcx, 0x26
mov dword [rsp + 0x28], eax
test rax, rax
mov eax, 1
mov edx, ecx
cmove edx, eax
cmp ebp, 0x3e8
cmovae edx, ecx
mov dword [rsp + 0x2c], edx
lea rcx, [rsp + 0x40]
mov r8d, 0x1f8
xor edx, edx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov qword [rsp + 0x238], 1
mov qword [rsp + 0x240], rbx
lea rcx, [rsp + 0x248]
mov r8d, 0x1f8
xor edx, edx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov qword [rsp + 0x30], 1
mov qword [rsp + 0x38], rbx
lea rax, [rsp + 0x28]
mov qword [rsp + 0x20], rax
lea r8, [rsp + 0x238]
lea r9, [rsp + 0x30]
mov ecx, 1
xor edx, edx
call sub.ws2_32.dll_select
test eax, eax
je 0x1400203c1
cmp eax, 0xffffffff
jne 0x1400203ca
call sub.ws2_32.dll_WSAGetLastError
mov esi, eax
shl rsi, 0x20
or rsi, 2
jmp 0x1400203ed
lea rsi, str.connection_timed_out
jmp 0x1400203ed
cmp dword [rsp + 0x238], 1
jne 0x1400203d8
xor esi, esi
jmp 0x1400203ed
mov rcx, rsi
call sym.std::sys::pal::windows::net::Socket::take_error::hf907bebda739cf56
mov rsi, rdx
test rax, rax
jne 0x1400203ed
test rsi, rsi
je 0x1400203d4
mov rcx, rdi
call sym._ZN4core3ptr42drop_in_place_LT_std..io..error..Error_GT_17h14cde6b578e19753E.llvm.11754568423107683009
mov rax, rsi
add rsp, 0x440
add byte [rax], al
add byte [rax], al
pop rbx
pop rbp
pop rdi
pop rsi
pop r14
pop rsi
pop rsi
ret
mov al, 0x29
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 1
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 2
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 3
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 4
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 5
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 6
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 7
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 8
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 9
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0xa
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0xb
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0xc
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0xd
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0xe
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0xf
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x10
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x11
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x12
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x13
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x14
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x15
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x16
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x17
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x18
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x19
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x1a
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x1b
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x1c
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x1d
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x1e
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x1f
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x20
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x21
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x22
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x23
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x24
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x25
jmp 0x1400202ad
invalid
invalid
invalid
mov al, 0x26
jmp 0x1400202ad
mov al, 0x27
jmp 0x1400202ad
mov al, 0x28
jmp 0x1400202ad