Function at 0x548160
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push r15
push r14
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x440
mov ebp, r9d
mov r14, r8
mov rbx, rdx
mov rdi, rcx
mov rax, qword [0x00677468]
cmp rax, 3
jne 0x5482c1
movzx r15d, word [rbx]
lea rcx, [rsp + 0x30]
mov edx, r15d
mov r8d, 1
call fcn.00552110
cmp qword [rsp + 0x30], 0
mov rsi, qword [rsp + 0x38]
jne 0x548475
mov dword [rsp + 0x30], 1
lea r8, [rsp + 0x30]
mov rcx, rsi
mov edx, 0x8004667e
call sub.ws2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x5481f6
test r15w, r15w
je 0x54820a
movups xmm0, xmmword [rbx + 4]
mov eax, dword [rbx + 0x14]
mov edx, dword [rbx + 0x18]
movzx ecx, word [rbx + 0x1c]
mov r8d, 0x1c
mov r9w, 0x17
jmp 0x54821f
call fcn.005abbd4
mov ebx, eax
shl rbx, 0x20
or rbx, 2
jmp 0x54846a
mov eax, dword [rbx + 2]
movzx ecx, word [rbx + 6]
xorps xmm0, xmm0
mov r8d, 0x10
mov r9w, 2
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, rsi
call sub.ws2_32.dll_connect
cmp eax, 0xffffffff
je 0x548251
xor ebx, ebx
jmp 0x548260
call fcn.005abbd4
mov ebx, eax
shl rbx, 0x20
or rbx, 2
mov dword [rsp + 0x30], 0
lea r8, [rsp + 0x30]
mov rcx, rsi
mov edx, 0x8004667e
call sub.ws2_32.dll_ioctlsocket
cmp eax, 0xffffffff
je 0x5482a5
test rbx, rbx
je 0x548493
mov r15d, ebx
and r15d, 3
lea rax, [0x005484d0]
movsxd rcx, dword [rax + r15*4]
add rcx, rax
jmp rcx
lea rax, [rbx + 0x10]
jmp 0x5482cf
call fcn.005abbd4
mov r14d, eax
shl r14, 0x20
or r14, 2
mov r15d, ebx
and r15d, 3
jmp 0x54840d
call fcn.005518b0
jmp 0x54818e
lea rax, [rbx + 0xf]
movzx eax, byte [rax]
cmp al, 0xd
je 0x548300
jmp 0x54846a
mov rcx, rbx
shr rcx, 0x20
call fcn.0053e030
cmp al, 0xd
je 0x548300
jmp 0x54846a
mov rax, rbx
shr rax, 0x20
cmp eax, 0xd
jne 0x54846a
test r14, r14
jne 0x548315
test ebp, ebp
jne 0x548315
lea r14, str.cannot_set_a_0_duration_timeout
jmp 0x54840d
mov eax, ebp
imul rax, rax, 0x10624dd3
shr rax, 0x26
mov dword [rsp + 0x28], r14d
cmp ebp, 0x3e8
mov ecx, 1
mov edx, eax
cmovb edx, ecx
test r14d, r14d
cmovne edx, eax
mov dword [rsp + 0x2c], edx
lea rcx, [rsp + 0x40]
mov r8d, 0x1f8
xor edx, edx
call sub.msvcrt.dll_memset
mov qword [rsp + 0x238], 1
mov qword [rsp + 0x240], rsi
lea rcx, [rsp + 0x248]
mov r8d, 0x1f8
xor edx, edx
call sub.msvcrt.dll_memset
mov qword [rsp + 0x30], 1
mov qword [rsp + 0x38], rsi
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 0x5483c8
cmp eax, 0xffffffff
jne 0x5483d1
call fcn.005abbd4
mov r14d, eax
shl r14, 0x20
or r14, 2
jmp 0x54840d
lea r14, str.connection_timed_out
jmp 0x5483de
cmp dword [rsp + 0x238], 1
jne 0x5483f8
xor r14d, r14d
cmp r15d, 1
jne 0x548462
lea r15, [rbx - 1]
lea r12, [rbx + 7]
mov rcx, qword [rbx - 1]
mov rax, qword [rbx + 7]
call qword [rax]
jmp 0x54842a
mov rcx, rsi
call fcn.00552200
mov r14, rdx
test rax, rax
jne 0x54840d
test r14, r14
je 0x5483db
test rbx, rbx
je 0x548462
cmp r15d, 1
jne 0x548462
lea r15, [rbx - 1]
lea r12, [rbx + 7]
mov rcx, qword [rbx - 1]
mov rax, qword [rbx + 7]
call qword [rax]
mov rax, qword [r12]
cmp qword [rax + 8], 0
je 0x548451
mov r8, qword [r15]
cmp qword [rax + 0x10], 0x11
jb 0x548443
mov r8, qword [r8 - 8]
mov rcx, qword [0x00677420]
xor edx, edx
call fcn.005ab9d4
mov rcx, qword [0x00677420]
xor edx, edx
mov r8, r15
call fcn.005ab9d4
mov rbx, r14
test r14, r14
je 0x548493
mov rcx, rsi
call sub.ws2_32.dll_closesocket
mov rsi, rbx
mov qword [rdi + 8], rsi
mov eax, 1
mov qword [rdi], rax
add rsp, 0x440
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r14
pop r15
ret
mov qword [rdi + 8], rsi
xor eax, eax
jmp 0x54847e