Function at 0x140046bac
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbp
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbx
sub rsp, 0x4f8
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x470], 0xfffffffffffffffe
mov r14, rdx
mov rsi, rcx
lea rax, [rbp + 0x3c8]
mov qword [rax], r8
mov qword [rax + 8], r9
lea rcx, [rbp - 0x50]
mov qword [rcx], rax
lea rax, [0x14002dd00]
mov qword [rcx + 8], rax
lea rax, [rbp + 0x4e0]
mov qword [rcx + 0x10], rax
lea rax, str._rustc_36fb58e433c782e27dd41034284e157cf86d587flibrarycore_srccharmethods.rsPA
lea rdx, [rbp + 0x1c0]
mov qword [rdx], rax
push 2
pop rax
mov qword [rdx + 8], rax
and qword [rdx + 0x20], 0
lea r8, [fcn.1400303a0]
mov qword [rcx + 0x18], r8
mov qword [rdx + 0x10], rcx
mov qword [rdx + 0x18], rax
lea rdi, [rbp + 0x3d8]
mov rcx, rdi
call fcn.140045669
mov rbx, qword [rdi]
mov r8, qword [rdi + 0x10]
lea rdi, [rbp + 0x1c0]
mov rcx, rdi
mov rdx, rbx
call fcn.14009f4b0
mov rax, qword [rdi]
test rax, rax
je 0x140046d57
mov ecx, dword [rbp + 0x1c1]
mov edx, dword [rbp + 0x1c4]
mov dword [rbp + 0x3f4], edx
mov dword [rbp + 0x3f1], ecx
mov rcx, qword [rbp + 0x1c8]
movups xmm0, xmmword [rbp + 0x1d0]
movups xmmword [rbp + 0x400], xmm0
mov byte [rbp + 0x3f0], al
mov qword [rbp + 0x3f8], rcx
mov rax, qword [rbp + 0x400]
cmp rax, qword [rbp + 0x408]
je 0x140046d67
lea rcx, [rax + 0x20]
mov qword [rbp + 0x400], rcx
movzx edi, word [rax]
mov r12d, dword [rax + 0x14]
mov r13d, dword [rax + 0x18]
movzx r15d, word [rax + 0x1c]
mov byte [rbp + 0x1c0], 0x1f
cmp di, 2
je 0x140046d6e
movzx ecx, word [rax + 0x12]
mov word [rbp - 0x40], cx
movups xmm0, xmmword [rax + 2]
movaps xmmword [rbp - 0x50], xmm0
lea rcx, [rbp + 0x1c0]
call fcn.14003e12f
movzx eax, word [rbp - 0x40]
mov word [rbp + 0x420], ax
movaps xmm0, xmmword [rbp - 0x50]
movaps xmmword [rbp + 0x430], xmm0
mov word [rbp + 0x440], ax
mov rax, qword [r14]
mov rdx, qword [rax + 0x178]
mov r8d, dword [rax + 0x180]
lea r14, [rbp + 0x1c0]
mov rcx, r14
call fcn.1400421b2
mov r14d, dword [r14 + 8]
cmp r14d, 0x3b9aca01
jne 0x140046daf
mov rax, qword [rbp + 0x1c0]
mov byte [rsi], 0x19
mov qword [rsi + 8], rax
jmp 0x140046d7f
mov rax, qword [rbp + 0x1c8]
mov byte [rsi], 0x19
mov qword [rsi + 8], rax
jmp 0x140046d8b
mov byte [rbp + 0x1c0], 0x1f
movups xmm0, xmmword [rbp + 0x1c0]
movups xmmword [rbp + 0x412], xmm0
movups xmmword [rsi], xmm0
lea rcx, [rbp + 0x3f0]
call fcn.14004a1d8
mov rdx, qword [rbp + 0x3e0]
mov rcx, rbx
call fcn.140060616
nop
add rsp, 0x4f8
pop rbx
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
pop rbp
ret
cmp r14d, 0x3b9aca00
mov qword [rbp + 0x468], r15
jne 0x140046f16
mov r15, qword [rbp + 0x436]
cmp di, 3
je 0x14004723e
mov dword [rbp + 0x460], r12d
mov ebx, dword [rbp + 0x43e]
movzx eax, word [rbp + 0x434]
mov word [rbp + 0x45c], ax
mov eax, dword [rbp + 0x430]
mov dword [rbp + 0x458], eax
lea rax, [rbp + 0x410]
and qword [rax], 0
xor r12d, r12d
lea r14, [rbp + 0x1c0]
cmp di, 2
je 0x140046f9c
movzx eax, word [rbp + 0x45c]
mov word [rbp - 0x4c], ax
mov eax, dword [rbp + 0x458]
mov dword [rbp - 0x50], eax
mov qword [rbp - 0x4a], r15
mov dword [rbp - 0x42], ebx
mov rax, qword [0x1401c6d90]
cmp rax, 3
jne 0x140046f0c
mov rcx, r14
mov edx, edi
push 1
pop r8
call fcn.14009ff60
cmp qword [rbp + 0x1c0], 0
mov r12, qword [rbp + 0x1c8]
jne 0x140046ef0
test di, di
je 0x140046e87
mov cx, 0x17
movups xmm0, xmmword [rbp - 0x4e]
mov rax, qword [rbp + 0x468]
mov edx, dword [rbp + 0x460]
push 0x1c
jmp 0x140046e97
movzx eax, word [rbp - 0x4c]
mov edx, dword [rbp - 0x50]
mov cx, 2
xorps xmm0, xmm0
push 0x10
pop r8
rol ax, 8
mov word [rbp + 0x1c0], cx
mov word [rbp + 0x1c2], ax
mov dword [rbp + 0x1c4], edx
movups xmmword [rbp + 0x1c8], xmm0
mov dword [rbp + 0x1d8], r13d
mov rcx, r12
mov rdx, r14
call qword [sym.imp.ws2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x140046fc4
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov edi, eax
shl rdi, 0x20
or rdi, 2
mov rcx, r12
call qword [sym.imp.ws2_32.dll_closesocket]
mov r12, rdi
lea rcx, [rbp + 0x410]
call fcn.140047806
mov qword [rbp + 0x410], r12
mov di, 2
jmp 0x140046e10
call fcn.140111d50
jmp 0x140046e46
mov ebx, r12d
mov rax, qword [rbp + 0x1c0]
mov qword [rbp + 0x460], rax
mov rax, qword [0x1401c6d90]
cmp rax, 3
jne 0x1400470a5
lea r15, [rbp + 0x1c0]
push 1
pop r12
mov rcx, r15
mov edx, edi
mov r8d, r12d
call fcn.14009ff60
cmp qword [r15], 0
mov r15, qword [r15 + 8]
jne 0x14004723e
lea r8, [rbp + 0x1c0]
mov dword [r8], 1
mov rcx, r15
mov edx, 0x8004667e
call qword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x140046faf
test di, di
je 0x140046fd8
push 0x1c
pop r8
mov ax, 0x17
movups xmm0, xmmword [rbp + 0x432]
mov rcx, qword [rbp + 0x468]
jmp 0x140046ff0
test r12, r12
lea r15, str.could_not_resolve_to_any_addresses
cmovne r15, r12
jmp 0x14004723e
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
jmp 0x140047232
lea rcx, [rbp + 0x410]
call fcn.140047806
mov r15, r12
jmp 0x1400472eb
push 0x10
pop r8
movzx ecx, word [rbp + 0x434]
mov ebx, dword [rbp + 0x430]
mov ax, 2
xorps xmm0, xmm0
rol cx, 8
lea rdx, [rbp + 0x1c0]
mov word [rdx], ax
mov word [rdx + 2], cx
mov dword [rdx + 4], ebx
movups xmmword [rdx + 8], xmm0
mov dword [rdx + 0x18], r13d
mov rcx, r15
call qword [sym.imp.ws2_32.dll_connect]
cmp eax, 0xffffffff
je 0x14004701f
xor edi, edi
jmp 0x14004702f
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov edi, eax
shl rdi, 0x20
or rdi, 2
lea r8, [rbp + 0x1c0]
and dword [r8], 0
mov rcx, r15
mov edx, 0x8004667e
call qword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x140047079
test rdi, rdi
je 0x1400472eb
mov qword [rbp + 0x468], r15
mov r15d, edi
and r15d, 3
lea rax, [0x140047544]
movsxd rcx, dword [rax + r15*4]
add rcx, rax
jmp rcx
mov al, byte [rdi + 0x10]
jmp 0x1400470c0
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
test rdi, rdi
je 0x140047232
mov qword [rbp + 0x468], r15
mov r15d, edi
and r15d, 3
jmp 0x1400471cc
call fcn.140111d50
jmp 0x140046f38
mov al, byte [rdi + 0xf]
jmp 0x1400470c0
mov rcx, rdi
shr rcx, 0x20
call fcn.14008ff10
cmp al, 0xd
jne 0x1400470e1
mov rax, qword [rbp + 0x460]
test rax, rax
jne 0x14004710f
test r14d, r14d
jne 0x14004710f
lea rbx, str.cannot_set_a_0_duration_timeout
jmp 0x1400471cc
mov rbx, rdi
jmp 0x14004722b
mov ecx, 0x7fffffff
cmp rax, rcx
cmovb rcx, rax
mov r8d, 0x3e8
mov eax, r14d
xor edx, edx
div r8d
lea rdx, [rbp + 0x410]
mov dword [rdx], ecx
test rcx, rcx
mov ecx, eax
cmove ecx, r12d
cmp r14d, r8d
cmovae ecx, eax
mov dword [rdx + 4], ecx
lea r14, [rbp + 0x1d0]
mov r8d, 0x1f8
mov rcx, r14
xor edx, edx
mov ebx, r12d
call fcn.140100820
push 1
pop r12
lea rcx, [rbp - 0x40]
mov qword [rcx - 0x10], r12
mov r13, qword [rbp + 0x468]
mov qword [rcx - 8], r13
mov r8d, 0x1f8
xor edx, edx
call fcn.140100820
mov qword [r14 - 0x10], r12
mov qword [r14 - 8], r13
lea rax, [rbp + 0x410]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x50]
lea r9, [rbp + 0x1c0]
mov ecx, ebx
xor edx, edx
call qword [sym.imp.ws2_32.dll_select]
test eax, eax
je 0x140047265
cmp eax, 0xffffffff
jne 0x140047271
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
lea rax, [r15 - 2]
cmp rax, 2
jb 0x14004722b
test r15, r15
je 0x14004722b
lea rax, [rdi - 1]
mov qword [rbp + 0x460], rax
mov rcx, qword [rdi - 1]
mov rax, qword [rdi + 7]
mov qword [rbp + 0x450], rcx
mov qword [rbp + 0x448], rax
call qword [rax]
mov rax, qword [rbp + 0x448]
cmp qword [rax + 8], 0
je 0x14004721c
mov rdx, qword [rax + 0x10]
mov rcx, qword [rbp + 0x450]
call fcn.14002a040
push 8
pop rdx
mov rcx, qword [rbp + 0x460]
call fcn.14002a040
mov r15, qword [rbp + 0x468]
mov rcx, r15
call qword [sym.imp.ws2_32.dll_closesocket]
mov r15, rbx
mov qword [rsi + 8], r15
mov al, 0x19
mov byte [rsi], al
lea rcx, [rbp + 0x3f0]
call fcn.14004a1d8
mov rcx, qword [rbp + 0x3d8]
mov rdx, qword [rbp + 0x3e0]
jmp 0x140046d95
lea rbx, str.connection_timed_out
xor r14d, r14d
jmp 0x14004727c
mov r14b, 1
cmp dword [rbp - 0x50], 1
jne 0x1400472f6
xor ebx, ebx
lea rax, [r15 - 2]
cmp rax, 2
jb 0x1400472db
test r15, r15
je 0x1400472db
lea rax, [rdi - 1]
mov qword [rbp + 0x460], rax
mov rcx, qword [rdi - 1]
mov rax, qword [rdi + 7]
mov qword [rbp + 0x450], rcx
mov qword [rbp + 0x448], rax
call qword [rax]
mov rax, qword [rbp + 0x448]
cmp qword [rax + 8], 0
je 0x1400472cc
mov rdx, qword [rax + 0x10]
mov rcx, qword [rbp + 0x450]
call fcn.14002a040
push 8
pop rdx
mov rcx, qword [rbp + 0x460]
call fcn.14002a040
test r14b, r14b
mov r15, qword [rbp + 0x468]
je 0x140047232
mov qword [rsi + 8], r15
mov al, 0x2c
jmp 0x140047244
lea r9, [rbp + 0x42c]
and dword [r9], 0
lea rax, [rbp + 0x458]
mov dword [rax], 4
mov qword [rsp + 0x20], rax
mov rcx, qword [rbp + 0x468]
mov edx, 0xffff
mov r8d, 0x1007
call qword [sym.imp.ws2_32.dll_getsockopt]
cmp eax, 0xffffffff
je 0x1400471bc
mov ebx, dword [rbp + 0x42c]
test ebx, ebx
jne 0x1400471c4
jmp 0x14004727a