Function at 0x140166db0
Capabilities:
Connect socket
Enumerate pe sections
Set socket configuration

Disassembly:
push rbp
push r15
push r14
push r12
push rsi
push rdi
push rbx
sub rsp, 0x460
lea rbp, [rsp + 0x80]
mov qword [rbp + 0x3d8], 0xfffffffffffffffe
mov r14d, r9d
mov r15, r8
mov rbx, rdx
mov rsi, rcx
mov dword [rbp + 0x1b8], 1
mov rdi, qword [rcx]
lea r8, [rbp + 0x1b8]
mov rcx, rdi
mov edx, 0x8004667e
call qword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x140166e2b
cmp word [rbx], 0
je 0x140166e40
mov ecx, dword [rbx + 0x14]
movzx eax, word [rbx + 0x1c]
rol ax, 8
mov edx, dword [rbx + 0x18]
movups xmm0, xmmword [rbx + 4]
mov r8d, 0x1c
mov bx, 0x17
jmp 0x140166e58
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov esi, eax
shl rsi, 0x20
or rsi, 2
jmp 0x1401670cb
movzx eax, word [rbx + 6]
rol ax, 8
mov ecx, dword [rbx + 2]
xorps xmm0, xmm0
mov r8d, 0x10
mov bx, 2
mov word [rbp + 0x1b8], bx
mov word [rbp + 0x1ba], ax
mov dword [rbp + 0x1bc], ecx
movups xmmword [rbp + 0x1c0], xmm0
mov dword [rbp + 0x1d0], edx
lea rdx, [rbp + 0x1b8]
mov rcx, rdi
call qword [sym.imp.ws2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140166e92
xor ebx, ebx
jmp 0x140166ea2
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov ebx, eax
shl rbx, 0x20
or rbx, 2
mov dword [rbp + 0x1b8], 0
lea r8, [rbp + 0x1b8]
mov rcx, rdi
mov edx, 0x8004667e
call qword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x140166ef2
test rbx, rbx
je 0x140166f0e
mov r12d, ebx
and r12d, 3
lea rax, [0x1401671f4]
movsxd rcx, dword [rax + r12*4]
add rcx, rax
jmp rcx
movzx eax, byte [rbx + 0x10]
cmp al, 0xd
je 0x140166f3d
mov rsi, rbx
jmp 0x1401670cb
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov esi, eax
shl rsi, 0x20
or rsi, 2
mov r12d, ebx
and r12d, 3
jmp 0x14016706a
xor esi, esi
jmp 0x1401670cb
movzx eax, byte [rbx + 0xf]
cmp al, 0xd
jne 0x140166eea
jmp 0x140166f3d
test r15, r15
jne 0x140166f53
test r14d, r14d
jne 0x140166f53
lea rsi, str.cannot_set_a_0_duration_timeout
jmp 0x14016706a
mov eax, r14d
imul rax, rax, 0x10624dd3
shr rax, 0x26
cmp r14d, 0x3e8
mov ecx, 1
mov edx, eax
cmovb edx, ecx
mov dword [rbp + 0x3c0], r15d
test r15d, r15d
cmovne edx, eax
mov dword [rbp + 0x3c4], edx
mov qword [rbp - 0x50], 1
mov qword [rbp - 0x48], rdi
lea rcx, [rbp - 0x40]
mov r8d, 0x1f8
xor edx, edx
call sub.VCRUNTIME140.dll_memset
mov qword [rbp + 0x1b8], 1
mov qword [rbp + 0x1c0], rdi
lea rcx, [rbp + 0x1c8]
mov r8d, 0x1f8
xor edx, edx
call sub.VCRUNTIME140.dll_memset
lea rax, [rbp + 0x3c0]
mov qword [rsp + 0x20], rax
lea r8, [rbp - 0x50]
lea r9, [rbp + 0x1b8]
mov ecx, 1
xor edx, edx
call qword [sym.imp.ws2_32.dll_select]
test eax, eax
je 0x140167007
cmp eax, 0xffffffff
jne 0x140167017
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
mov esi, eax
shl rsi, 0x20
or rsi, 2
jmp 0x14016706a
mov qword [rbp + 0x3d0], rbx
lea rsi, str.connection_timed_out
jmp 0x140167026
cmp dword [rbp - 0x50], 1
jne 0x140167055
mov qword [rbp + 0x3d0], rbx
xor esi, esi
cmp r12d, 1
jne 0x1401670cb
mov rdx, qword [rbp + 0x3d0]
lea rax, [rdx - 1]
mov qword [rbp + 0x3c8], rax
mov rcx, qword [rdx - 1]
mov qword [rbp + 0x3d0], rdx
mov rax, qword [rdx + 7]
call qword [rax]
jmp 0x140167091
mov rcx, rsi
call fcn.14015f780
mov rsi, rdx
test rax, rax
jne 0x14016706a
test rsi, rsi
je 0x1401670e0
test rbx, rbx
je 0x1401670cb
cmp r12d, 1
jne 0x1401670cb
lea rax, [rbx - 1]
mov qword [rbp + 0x3c8], rax
mov rcx, qword [rbx - 1]
mov rax, qword [rbx + 7]
mov qword [rbp + 0x3d0], rbx
call qword [rax]
mov rax, qword [rbp + 0x3d0]
mov rax, qword [rax + 7]
mov rdx, qword [rax + 8]
test rdx, rdx
mov rdi, qword [rbp + 0x3c8]
je 0x1401670b8
mov r8, qword [rax + 0x10]
mov rcx, qword [rdi]
call fcn.14000e8c0
mov edx, 0x18
mov r8d, 8
mov rcx, rdi
call fcn.14000e8c0
mov rax, rsi
add rsp, 0x460
pop rbx
pop rdi
pop rsi
pop r12
pop r14
pop r15
pop rbp
ret
mov qword [rbp + 0x3d0], rbx
xor esi, esi
xor ecx, ecx
call fcn.140154210
jmp 0x140167026