Function at 0x53f590
Capabilities:
Connect socket

Disassembly:
mov r11, rsp
sub rsp, 0x128
mov rax, qword [0x0072f1d0]
mov qword [rsp + 0xe0], rax
mov qword [r11 + 0x20], rbx
mov qword [r11 - 8], rbp
mov rbp, qword [rcx]
mov qword [r11 - 0x10], rsi
mov qword [r8], 0xffffffffffffffff
mov eax, dword [rdx + 4]
mov rbx, qword [rcx]
mov qword [r11 - 0x20], r12
mov qword [r11 - 0x28], r13
mov dword [rsp + 0x20], eax
mov eax, dword [rcx + 0xa4]
mov qword [r11 - 0x30], r14
xor r14d, r14d
cmp eax, 2
mov r12, r8
mov rsi, rcx
mov dword [rsp + 0x24], eax
mov r13d, r14d
jne 0x53f5f6
lea eax, [r14 + 0x11]
jmp 0x53f5f9
mov eax, dword [rdx + 0xc]
mov dword [rsp + 0x28], eax
mov eax, dword [rdx + 0x10]
mov rdx, qword [rdx + 0x20]
mov ecx, 0x80
mov qword [rsp + 0x110], rdi
cmp eax, ecx
cmova eax, ecx
lea rcx, [rsp + 0x30]
mov r8d, eax
mov dword [rsp + 0x2c], eax
call sub.msvcrt.dll_memcpy
mov r11, qword [rbx + 0x288]
test r11, r11
je 0x53f649
mov rcx, qword [rbx + 0x290]
lea r8, [rsp + 0x20]
xor edx, edx
call r11
mov rdi, rax
jmp 0x53f65f
mov r8d, dword [rsp + 0x28]
mov edx, dword [rsp + 0x24]
mov ecx, dword [rsp + 0x20]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rdi, 0xffffffffffffffff
je 0x53f8e9
cmp word [rsp + 0x30], 2
jne 0x53f77a
mov r9d, reloc.WLDAP32.dll_Ordinal_46
lea r8, [rsp + 0xb0]
lea rdx, [rsp + 0x34]
lea ecx, [r9 - 0x2c]
call fcn.00547680
test rax, rax
je 0x53f77a
movzx ecx, word [rsp + 0x32]
call qword [sym.imp.WS2_32.dll_ntohs]
lea r8, [rsp + 0xb0]
lea rdx, str.__Trying__s..._n
mov rcx, rbp
call fcn.0052ede0
cmp dword [rbp + 0x4c4], r13d
je 0x53f6d0
mov rdx, rdi
mov rcx, rsi
call fcn.0053f170
mov rcx, rdi
call fcn.0053f210
cmp dword [rbp + 0x68c], r13d
je 0x53f6ec
mov rdx, rdi
mov rcx, rbp
call fcn.0053e5c0
mov rax, qword [rbp + 0x278]
test rax, rax
je 0x53f714
mov rcx, qword [rbp + 0x280]
xor r8d, r8d
mov rdx, rdi
call rax
cmp eax, 2
jne 0x53f7f3
lea r13d, [rax - 1]
mov r8d, dword [rsp + 0x20]
mov rdx, rdi
mov rcx, rsi
call fcn.0053e7c0
test eax, eax
mov ebx, eax
je 0x53f827
mov rax, qword [rsi + 0x38]
test rax, rax
je 0x53f758
cmp rdi, qword [rsi + 0x1b0]
jne 0x53f810
cmp dword [rsi + 0x1cc], r14d
je 0x53f810
mov dword [rsi + 0x1cc], r14d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rdx, rdi
mov rcx, rsi
call fcn.00538f00
cmp ebx, 1
cmove ebx, r14d
mov eax, ebx
jmp 0x53f8eb
mov byte [rsp + 0xb0], r13b
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov rcx, rsi
mov edx, eax
mov ebx, eax
call fcn.0052bc00
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov r8d, ebx
mov r9, rax
mov rcx, rbp
call fcn.0052eee0
mov r11, qword [rsi + 0x38]
test r11, r11
je 0x53f7cb
cmp rdi, qword [rsi + 0x1b0]
jne 0x53f7e4
cmp dword [rsi + 0x1cc], r13d
je 0x53f7e4
mov dword [rsi + 0x1cc], r14d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
mov rdx, rdi
mov rcx, rsi
call fcn.00538f00
jmp 0x53f8e9
mov rcx, qword [rsi + 0x40]
mov rdx, rdi
call r11
jmp 0x53f8e9
test eax, eax
je 0x53f714
mov rdx, rdi
mov rcx, rsi
call fcn.0053f420
mov eax, Ordinal_46
jmp 0x53f8eb
mov rcx, qword [rsi + 0x40]
mov rdx, rdi
call rax
cmp ebx, 1
cmove ebx, r14d
mov eax, ebx
jmp 0x53f8eb
mov edx, 1
mov rcx, rdi
call fcn.0056bb50
call fcn.0053bed0
cmp dword [rsi + 0x314], 1
mov qword [rsi + 0x30c], rax
jle 0x53f857
mov edx, dword [rsi + 0x318]
mov rcx, rbp
call fcn.00539760
test r13d, r13d
jne 0x53f8e5
cmp dword [rsi + 0xa4], 1
jne 0x53f8e5
mov r8d, dword [rsp + 0x2c]
lea rdx, [rsp + 0x30]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x53f8dd
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0xb
mov ebx, eax
je 0x53f8da
cmp eax, 0x2732
jle 0x53f89c
cmp eax, 0x2734
jle 0x53f8da
mov edx, eax
mov rcx, rsi
call fcn.0052bc00
lea r8, [rsp + 0xb0]
lea rdx, str.Immediate_connect_fail_for__s:__s_n
mov r9, rax
mov rcx, rbp
call fcn.0052ede0
mov rdx, rdi
mov rcx, rsi
mov dword [rbp + 0x887c], ebx
call fcn.0053f420
mov ebx, 7
mov eax, ebx
jmp 0x53f8eb
mov ebx, r14d
mov qword [r12], rdi
mov eax, ebx
jmp 0x53f8eb
mov qword [r12], rdi
xor eax, eax
mov r14, qword [rsp + 0xf8]
mov r13, qword [rsp + 0x100]
mov r12, qword [rsp + 0x108]
mov rdi, qword [rsp + 0x110]
mov rsi, qword [rsp + 0x118]
mov rbp, qword [rsp + 0x120]
mov rbx, qword [rsp + 0x148]
mov rcx, qword [rsp + 0xe0]
call fcn.00693b90
add rsp, 0x128
ret