Function at 0x14005b540
Capabilities:
Connect socket
Set socket configuration

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r15
mov eax, 0x100
call fcn.1401ef830
sub rsp, rax
mov rax, qword [0x140310170]
xor rax, rsp
mov qword [rsp + 0xf0], rax
mov rbp, qword [rcx]
xor r12b, r12b
mov qword [r8], 0xffffffffffffffff
mov r15, r8
mov eax, dword [rdx + 4]
mov rsi, rcx
mov rbx, qword [rcx]
mov dword [rsp + 0x30], eax
mov eax, dword [rcx + 0xa4]
cmp eax, 2
mov dword [rsp + 0x34], eax
mov eax, reloc.WS2_32.dll_recvfrom
je 0x14005b59e
mov eax, dword [rdx + 0xc]
mov dword [rsp + 0x38], eax
mov ecx, 0x80
mov eax, dword [rdx + 0x10]
cmp eax, ecx
mov rdx, qword [rdx + 0x20]
cmova eax, ecx
lea rcx, [rsp + 0x40]
mov r8d, eax
mov dword [rsp + 0x3c], eax
call fcn.14020f990
mov rax, qword [rbx + 0x2d8]
test rax, rax
je 0x14005b5e2
mov rcx, qword [rbx + 0x2e0]
lea r8, [rsp + 0x30]
xor edx, edx
call rax
jmp 0x14005b5f5
mov r8d, dword [rsp + 0x38]
mov edx, dword [rsp + 0x34]
mov ecx, dword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
mov r13d, 7
xor eax, eax
mov ebx, r13d
cmp rdi, 0xffffffffffffffff
cmovne ebx, eax
je 0x14005b852
cmp word [rsp + 0x40], 2
jne 0x14005b816
lea r8d, [r13 + 0x27]
lea rdx, [rsp + 0xc0]
lea rcx, [rsp + 0x44]
call fcn.1400757c0
test rax, rax
je 0x14005b816
movzx ecx, word [rsp + 0x42]
mov qword [rsp + 0x158], r14
call qword [sym.imp.WS2_32.dll_ntohs]
lea r8, [rsp + 0xc0]
mov rcx, rbp
lea rdx, str.__Trying__s..._n
call fcn.140059720
cmp dword [rsp + 0x30], 2
jne 0x14005b678
cmp dword [rsp + 0x34], 1
jne 0x14005b678
mov r14b, 1
jmp 0x14005b67b
xor r14b, r14b
test r14b, r14b
je 0x14005b694
cmp byte [rbp + 0x58e], 0
je 0x14005b694
mov rdx, rdi
mov rcx, rsi
call fcn.14005b3f0
mov rcx, rdi
call fcn.14005b480
test r14b, r14b
mov r14, qword [rsp + 0x158]
je 0x14005b6bd
cmp byte [rbp + 0x7b4], 0
je 0x14005b6bd
mov rdx, rdi
mov rcx, rbp
call fcn.14005a310
mov rax, qword [rbp + 0x2c8]
test rax, rax
je 0x14005b6e0
mov rcx, qword [rbp + 0x2d0]
xor r8d, r8d
mov rdx, rdi
call rax
cmp eax, 2
jne 0x14005b717
mov r12b, 1
cmp dword [rsp + 0x30], 2
jne 0x14005b730
mov r8d, 2
mov rdx, rdi
mov rcx, rsi
call fcn.14005a580
mov ebx, eax
test eax, eax
je 0x14005b730
mov rdx, rdi
mov rcx, rsi
call fcn.14005bb40
cmp ebx, 1
cmove ebx, r13d
mov eax, ebx
jmp 0x14005b852
test eax, eax
je 0x14005b6e0
mov rdx, rdi
mov rcx, rsi
call fcn.14005bb40
mov eax, Ordinal_46
jmp 0x14005b852
lea r8, [rsp + 0x20]
mov dword [rsp + 0x20], 1
mov edx, 0x8004667e
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_ioctlsocket]
call fcn.140068440
cmp dword [rsi + 0x3f4], 1
mov qword [rsi + 0x3ec], rax
jle 0x14005b76f
mov rdx, qword [rsi + 0x3f8]
mov rcx, rbp
call fcn.140059330
test r12b, r12b
jne 0x14005b811
cmp dword [rsi + 0xa4], 1
jne 0x14005b811
cmp byte [rsi + 0x3e6], r12b
jne 0x14005b7b4
mov r8d, dword [rsp + 0x3c]
lea rdx, [rsp + 0x40]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x14005b7b4
test ebx, ebx
jne 0x14005b80d
mov qword [r15], rdi
mov eax, ebx
jmp 0x14005b852
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov ebx, eax
cmp eax, 0xb
je 0x14005b808
lea ecx, [rax - 0x2733]
cmp ecx, 1
jbe 0x14005b808
mov edx, eax
mov rcx, rsi
call fcn.1400755c0
mov r9, rax
lea r8, [rsp + 0xc0]
lea rdx, str.Immediate_connect_fail_for__s:__s_n
mov rcx, rbp
call fcn.140059720
mov rdx, rdi
mov dword [rbp + 0x89e4], ebx
mov rcx, rsi
call fcn.14005bb40
mov ebx, r13d
mov eax, ebx
jmp 0x14005b852
xor ebx, ebx
mov qword [r15], rdi
mov eax, ebx
jmp 0x14005b852
mov qword [r15], rdi
jmp 0x14005b850
mov byte [rsp + 0xc0], 0
call qword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, eax
mov rcx, rsi
mov ebx, eax
call fcn.1400755c0
mov r9, rax
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov r8d, ebx
mov rcx, rbp
call fcn.140059810
mov rdx, rdi
mov rcx, rsi
call fcn.14005bb40
xor eax, eax
mov rcx, qword [rsp + 0xf0]
xor rcx, rsp
call fcn.1401ef4e0
add rsp, 0x100
pop r15
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret