Function at 0x538360
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov r11, rsp
sub rsp, 0x198
mov rax, qword [0x005ca070]
mov qword [rsp + 0x150], rax
mov eax, dword [rdx + 4]
mov qword [r11 - 8], rbx
mov qword [r11 - 0x18], rsi
mov rsi, qword [rcx]
mov dword [rsp + 0x40], eax
mov eax, dword [rcx + 0x8c]
mov dword [rsp + 0x44], eax
mov eax, dword [rdx + 0xc]
mov qword [r11 - 0x20], rdi
mov qword [r11 - 0x28], r12
mov dword [rsp + 0x48], eax
mov eax, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
mov qword [r11 - 0x30], r13
mov ebx, 0x80
cmp eax, ebx
mov r12, rcx
mov r13d, r8d
cmova eax, ebx
mov qword [r11 - 0x38], r14
lea rcx, [rsp + 0x50]
mov r8d, eax
mov r14, r9
mov dword [rsp + 0x4c], eax
call fcn.004435a0
mov byte [r14], 0
mov rax, qword [rsi + 0x1f0]
test rax, rax
je 0x5383fc
mov rcx, qword [rsi + 0x1f8]
lea r8, [rsp + 0x40]
xor edx, edx
call rax
mov rdi, rax
jmp 0x538412
mov r8d, dword [rsp + 0x48]
mov edx, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x40]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rdi, 0xffffffffffffffff
je 0x5385a2
mov ecx, dword [rsp + 0x40]
lea r8, [rsp + 0xd0]
lea rdx, [rsp + 0x54]
mov r9, rbx
call fcn.00538e40
test rax, rax
je 0x53848e
lea r8, [rsp + 0xd0]
lea rdx, str.__Trying__s...
mov rcx, rsi
call fcn.005373d0
lea rbx, [rsi + 0x8860]
lea r9, [rsp + 0xd0]
lea r8, [0x005626ec]
mov rcx, rbx
mov edx, 0x2e
call fcn.0052b590
lea rcx, [r12 + 0x58]
sub rcx, rbx
nop
movzx eax, byte [rbx]
inc rbx
test al, al
mov byte [rcx + rbx - 1], al
jne 0x538480
cmp byte [rsi + 0x3b6], 0
je 0x5384fc
mov rbx, qword [r12]
mov edx, 6
lea r9, [rsp + 0x30]
movzx eax, byte [rbx + 0x3b6]
lea r8d, [rdx - 5]
mov rcx, rdi
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jns 0x5384ed
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov rcx, r12
mov edx, eax
call fcn.0052a9d0
lea rdx, str.Could_not_set_TCP_NODELAY:__s_n
mov rcx, rbx
mov r8, rax
call fcn.005373d0
jmp 0x5384fc
lea rdx, str.TCP_NODELAY_set_n
mov rcx, rbx
call fcn.005373d0
lea rax, [rsp + 0x34]
lea r9, [rsp + 0x38]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rdi
mov dword [rsp + 0x30], 0x4020
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x38], 0
mov dword [rsp + 0x34], 4
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
jne 0x538545
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x38], eax
jg 0x538566
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x1001
mov rcx, rdi
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [rsi + 0x1e0]
test rax, rax
je 0x538585
mov rcx, qword [rsi + 0x1e8]
xor r8d, r8d
mov rdx, rdi
call rax
test eax, eax
jne 0x538599
mov r8d, dword [rsp + 0x40]
mov rdx, rdi
mov rcx, r12
call fcn.00537e10
test eax, eax
je 0x5385ae
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, 0xffffffffffffffff
jmp 0x53871f
mov edx, 1
mov rcx, rdi
mov qword [rsp + 0x188], rbp
call fcn.00556920
cmp dword [r12 + 0x8c], 1
jne 0x53862f
mov r8d, dword [rsp + 0x4c]
lea rdx, [rsp + 0x50]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
mov ebx, eax
jne 0x538643
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xb
mov ebp, eax
je 0x538633
cmp eax, 0x2732
jle 0x538603
cmp eax, 0x2734
jle 0x538633
mov edx, eax
mov rcx, r12
call fcn.0052a9d0
lea r8, [rsp + 0xd0]
lea rdx, str.Failed_to_connect_to__s:__s
mov r9, rax
mov rcx, rsi
call fcn.005374d0
mov dword [rsi + 0x86cc], ebp
jmp 0x538651
xor ebx, ebx
jmp 0x538651
mov r8d, r13d
mov rdx, rdi
mov rcx, r12
call fcn.00537d40
mov ebx, eax
cmp ebx, 1
jne 0x538651
cmp dword [rsi + 0x648], 2
je 0x5386ca
xor edx, edx
xor ecx, ecx
mov dword [rsp + 0x30], 0
mov dword [rsp + 0x34], 4
call qword [sym.imp.KERNEL32.dll_SleepEx]
lea r11, [rsp + 0x34]
lea r9, [rsp + 0x30]
mov edx, 0xffff
mov r8d, 0x1007
mov rcx, rdi
mov qword [rsp + 0x20], r11
call qword [sym.imp.WS2_32.dll_getsockopt]
test eax, eax
je 0x53869a
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
jmp 0x53869e
mov eax, dword [rsp + 0x30]
test eax, eax
je 0x5386ad
cmp eax, 0x2748
je 0x5386ad
xor cl, cl
jmp 0x5386af
mov cl, 1
test ebx, ebx
jne 0x5386cf
test cl, cl
je 0x5386e5
lea rdx, str.connected_n
mov rcx, rsi
mov byte [r14], 1
call fcn.005373d0
mov rax, rdi
jmp 0x538717
cmp ebx, 1
jne 0x5386e5
lea rdx, str.Timeout_n
mov rcx, rsi
call fcn.005373d0
jmp 0x538707
mov edx, eax
mov rcx, r12
mov dword [rsi + 0x86cc], eax
call fcn.0052a9d0
lea rdx, [0x00567710]
mov rcx, rsi
mov r8, rax
call fcn.005373d0
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, 0xffffffffffffffff
mov rbp, qword [rsp + 0x188]
mov r14, qword [rsp + 0x160]
mov r13, qword [rsp + 0x168]
mov r12, qword [rsp + 0x170]
mov rdi, qword [rsp + 0x178]
mov rsi, qword [rsp + 0x180]
mov rbx, qword [rsp + 0x190]
mov rcx, qword [rsp + 0x150]
call fcn.0055e990
add rsp, 0x198
ret