Function at 0x140045610
Capabilities:
Connect socket

Disassembly:
mov dword [rsp + 0x18], r8d
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x2d8
lea rdi, [rsp + 0x20]
mov ecx, 0xae
mov eax, 0xcccccccc
rep stosd dword [rdi], eax
mov rcx, qword [rsp + 0x2f0]
mov rax, qword [0x1400dad40]
xor rax, rsp
mov qword [rsp + 0x2c0], rax
mov dword [rsp + 0xc4], 0xffffffff
mov dword [rsp + 0xc8], 0
mov byte [rsp + 0xcc], 0
mov rax, qword [rsp + 0x2f0]
mov rax, qword [rax]
mov qword [rsp + 0xd0], rax
movsxd rax, dword [rsp + 0x300]
mov rcx, qword [rsp + 0x2f0]
lea rax, [rcx + rax*8 + 0x4d0]
mov qword [rsp + 0x288], rax
mov rax, qword [rsp + 0x288]
mov qword [rax], 0xffffffffffffffff
lea r9, [rsp + 0xe8]
lea r8, [rsp + 0x30]
mov rdx, qword [rsp + 0x2f8]
mov rcx, qword [rsp + 0x2f0]
call fcn.140044f20
mov dword [rsp + 0xf4], eax
cmp dword [rsp + 0xf4], 0
je 0x1400456f2
mov eax, dword [rsp + 0xf4]
jmp 0x140045b64
lea r9, [rsp + 0x154]
lea r8, [rsp + 0x108]
mov edx, dword [rsp + 0x3c]
lea rcx, [rsp + 0x40]
call fcn.140044720
movzx eax, al
test eax, eax
jne 0x14004577c
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov r8d, 0x100
lea rdx, [rsp + 0x180]
mov ecx, dword [rax]
call fcn.14001c5c0
mov qword [rsp + 0x2a8], rax
call sub.api_ms_win_crt_runtime_l1_1_0.dll__errno
mov rcx, qword [rsp + 0x2a8]
mov r9, rcx
mov r8d, dword [rax]
lea rdx, str.sa_addr_inet_ntop___failed_with_errno__d:__s
mov rcx, qword [rsp + 0xd0]
call fcn.140042340
mov rdx, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0x2f0]
call fcn.140044e20
xor eax, eax
jmp 0x140045b64
mov r9d, dword [rsp + 0x154]
lea r8, [rsp + 0x108]
lea rdx, str.__Trying__s:_ld..._n
mov rcx, qword [rsp + 0xd0]
call fcn.1400421c0
cmp dword [rsp + 0x30], 2
je 0x1400457ae
cmp dword [rsp + 0x30], 0x17
jne 0x1400457c2
cmp dword [rsp + 0x34], 1
jne 0x1400457c2
mov dword [rsp + 0x2b0], 1
jmp 0x1400457cd
mov dword [rsp + 0x2b0], 0
cmp dword [rsp + 0x2b0], 0
jne 0x1400457e4
mov dword [rsp + 0x2b4], 0
jmp 0x1400457ef
mov dword [rsp + 0x2b4], 1
movzx eax, byte [rsp + 0x2b4]
mov byte [rsp + 0x164], al
movzx eax, byte [rsp + 0x164]
test eax, eax
je 0x140045832
mov rax, qword [rsp + 0xd0]
movzx eax, byte [rax + 0xf23]
test eax, eax
je 0x140045832
mov rdx, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0x2f0]
call fcn.1400468e0
xor eax, eax
test eax, eax
jne 0x140045832
mov rcx, qword [rsp + 0xe8]
call fcn.140044930
movzx eax, byte [rsp + 0x164]
test eax, eax
je 0x140045879
mov rax, qword [rsp + 0xd0]
movzx eax, byte [rax + 0xf2c]
test eax, eax
je 0x140045879
mov rdx, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0xd0]
call fcn.140045440
mov rax, qword [rsp + 0xd0]
cmp qword [rax + 0x728], 0
je 0x140045919
mov dl, 1
mov rcx, qword [rsp + 0xd0]
call fcn.1400267c0
xor r8d, r8d
mov rdx, qword [rsp + 0xe8]
mov rax, qword [rsp + 0xd0]
mov rcx, qword [rax + 0x730]
mov rax, qword [rsp + 0xd0]
call qword [rax + 0x728]
mov dword [rsp + 0xc8], eax
xor edx, edx
mov rcx, qword [rsp + 0xd0]
call fcn.1400267c0
cmp dword [rsp + 0xc8], 2
jne 0x1400458f0
mov byte [rsp + 0xcc], 1
jmp 0x140045919
cmp dword [rsp + 0xc8], 0
je 0x140045919
mov rdx, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0x2f0]
call fcn.140044e20
mov eax, Ordinal_46
jmp 0x140045b64
cmp dword [rsp + 0x30], 2
je 0x140045927
cmp dword [rsp + 0x30], 0x17
jne 0x140045994
lea rcx, [rsp + 0x40]
call fcn.140093290
mov r9d, eax
mov r8d, dword [rsp + 0x30]
mov rdx, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0x2f0]
call fcn.140045ba0
mov dword [rsp + 0xf4], eax
cmp dword [rsp + 0xf4], 0
je 0x140045994
mov rdx, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0x2f0]
call fcn.140044e20
cmp dword [rsp + 0xf4], 1
jne 0x140045988
mov eax, 7
jmp 0x140045b64
mov eax, dword [rsp + 0xf4]
jmp 0x140045b64
mov edx, 1
mov rcx, qword [rsp + 0xe8]
call fcn.14005d930
lea rcx, [rsp + 0x298]
call fcn.140050f90
mov rcx, qword [rsp + 0x2f0]
lea rdi, [rcx + 0x678]
mov rsi, rax
mov ecx, reloc.WS2_32.dll_recv
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x2f0]
cmp dword [rax + 0x688], 1
jle 0x1400459ff
mov r8d, 3
mov rax, qword [rsp + 0x2f0]
mov rdx, qword [rax + 0x690]
mov rcx, qword [rsp + 0xd0]
call fcn.140026050
movzx eax, byte [rsp + 0xcc]
test eax, eax
jne 0x140045a69
mov rax, qword [rsp + 0x2f0]
cmp dword [rax + 0x32c], 4
je 0x140045a69
mov rax, qword [rsp + 0x2f0]
movzx eax, byte [rax + 0x66f]
test eax, eax
je 0x140045a31
jmp 0x140045a50
mov r8d, dword [rsp + 0x3c]
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0xe8]
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rsp + 0xc4], eax
cmp dword [rsp + 0xc4], 0xffffffff
jne 0x140045a67
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0xc8], eax
jmp 0x140045a83
mov rax, qword [rsp + 0x288]
mov rcx, qword [rsp + 0xe8]
mov qword [rax], rcx
xor eax, eax
jmp 0x140045b64
cmp dword [rsp + 0xc4], 0xffffffff
jne 0x140045b40
mov eax, dword [rsp + 0xc8]
mov dword [rsp + 0x2b8], eax
cmp dword [rsp + 0x2b8], 0xb
je 0x140045ac5
cmp dword [rsp + 0x2b8], 0x2733
je 0x140045ac5
cmp dword [rsp + 0x2b8], 0x2734
je 0x140045ac5
jmp 0x140045ad2
mov dword [rsp + 0xf4], 0
jmp 0x140045b40
mov r8d, 0x100
lea rdx, [rsp + 0x180]
mov ecx, dword [rsp + 0xc8]
call fcn.14001c5c0
mov r9, rax
lea r8, [rsp + 0x108]
lea rdx, str.Immediate_connect_fail_for__s:__s_n
mov rcx, qword [rsp + 0xd0]
call fcn.1400421c0
mov rax, qword [rsp + 0xd0]
mov ecx, dword [rsp + 0xc8]
mov dword [rax + 0x11b0], ecx
mov rdx, qword [rsp + 0xe8]
mov rcx, qword [rsp + 0x2f0]
call fcn.140044e20
mov dword [rsp + 0xf4], 7
cmp dword [rsp + 0xf4], 0
jne 0x140045b5d
mov rax, qword [rsp + 0x288]
mov rcx, qword [rsp + 0xe8]
mov qword [rax], rcx
mov eax, dword [rsp + 0xf4]
mov rdi, rax
mov rcx, rsp
lea rdx, reloc.WS2_32.dll_getpeername
call fcn.1400abe64
mov rax, rdi
mov rcx, qword [rsp + 0x2c0]
xor rcx, rsp
call fcn.1400ab680
add rsp, 0x2d8
pop rdi
pop rsi
ret