Function at 0x18001e070
Capabilities:
Connect socket
Set socket configuration

Disassembly:
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0x2c8
mov qword [rsp + 0x118], 0xfffffffffffffffe
mov rax, qword [0x1800a31a8]
xor rax, rsp
mov qword [rsp + 0x2b0], rax
lea rax, [rsp + 0x120]
mov rdi, rax
xor eax, eax
mov ecx, 0x80
rep stosb byte [rdi], al
mov dword [rsp + 0x3c], 0
mov rax, qword [rsp + 0x2e0]
mov rax, qword [rax + 0x40]
mov qword [rsp + 0xa0], rax
mov ecx, 0x18
call fcn.180069fc0
mov qword [rsp + 0x60], rax
cmp qword [rsp + 0x60], 0
je 0x18001e100
mov rax, qword [rsp + 0x2e0]
mov rdx, qword [rax + 0x28]
mov rcx, qword [rsp + 0x60]
call fcn.180005a50
mov qword [rsp + 0x68], rax
jmp 0x18001e109
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x68]
mov qword [rsp + 0x88], rax
mov rax, qword [rsp + 0x88]
mov qword [rsp + 0x90], rax
call fcn.18001dc50
cdqe
mov qword [rsp + 0x98], rax
mov rax, qword [rsp + 0x90]
mov qword [rsp + 0x20], rax
xor r9d, r9d
mov r8, qword [rsp + 0x98]
mov edx, 0x1f6
mov rcx, qword [rsp + 0xa0]
call fcn.1800049e0
mov dword [rsp + 0x54], eax
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x40]
call fcn.18001dc00
cmp dword [rax], 0
je 0x18001e195
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x40]
call fcn.18001dc00
add rax, 4
mov qword [rsp + 0x70], rax
jmp 0x18001e1ab
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x40]
call fcn.18001dbd0
mov qword [rsp + 0x70], rax
mov rax, qword [rsp + 0x70]
mov qword [rsp + 0xa8], rax
lea rax, [rsp + 0x1a0]
mov rdi, rax
mov rsi, qword [rsp + 0xa8]
mov ecx, 0x102
rep movsb byte [rdi], byte [rsi]
lea r8, [rsp + 0x3c]
lea rdx, [rsp + 0x120]
lea rcx, [rsp + 0x1a0]
call fcn.18001d9d0
movzx eax, al
test eax, eax
je 0x18001e45e
movzx eax, word [rsp + 0x120]
mov r8d, 6
mov edx, 1
mov ecx, eax
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, qword [rsp + 0x2e0]
mov qword [rcx + 0x28], rax
mov dword [rsp + 0x48], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x48]
mov r8d, 1
mov edx, 6
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x28]
call qword [sym.imp.WS2_32.dll_setsockopt]
mov rax, qword [rsp + 0x2e0]
mov rax, qword [rax + 0x40]
mov qword [rsp + 0xb8], rax
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x40]
call fcn.18001dbd0
movzx eax, word [rax + 0x100]
mov dword [rsp + 0x4c], eax
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x40]
call fcn.18001dbd0
mov qword [rsp + 0xb0], rax
mov eax, dword [rsp + 0x4c]
mov dword [rsp + 0x20], eax
mov r9, qword [rsp + 0xb0]
lea r8, str.Connecting_to__s:_d
mov edx, 0x40
mov rcx, qword [rsp + 0xb8]
call fcn.18000b5d0
mov r8d, dword [rsp + 0x3c]
lea rdx, [rsp + 0x120]
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x28]
call qword [sym.imp.WS2_32.dll_connect]
mov dword [rsp + 0x50], eax
cmp dword [rsp + 0x50], 0
jne 0x18001e44c
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x40]
call fcn.18001dc00
mov eax, dword [rax]
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0
je 0x18001e325
cmp dword [rsp + 0x38], 1
je 0x18001e332
cmp dword [rsp + 0x38], 2
je 0x18001e3a9
jmp 0x18001e442
mov dword [rsp + 0x30], 0
jmp 0x18001e44a
lea rcx, [rsp + 0x34]
call fcn.18000a0f0
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x40]
call fcn.18001dbd0
mov qword [rsp + 0xc0], rax
mov rax, qword [rsp + 0x2e0]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0xc8], rax
mov r8, qword [rsp + 0xc0]
mov rdx, qword [rsp + 0xc8]
lea rcx, [rsp + 0x34]
call fcn.18001dc10
movzx eax, al
test eax, eax
je 0x18001e394
mov dword [rsp + 0x40], 0
jmp 0x18001e39c
mov dword [rsp + 0x40], select
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x30], eax
jmp 0x18001e44a
lea rcx, [rsp + 0x35]
call fcn.18000a0f0
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x40]
call fcn.18001dbd0
mov qword [rsp + 0xd0], rax
mov rax, qword [rsp + 0x2e0]
mov rcx, qword [rax + 0x40]
call fcn.18001dc00
add rax, 4
mov qword [rsp + 0xd8], rax
mov rax, qword [rsp + 0x2e0]
mov rax, qword [rax + 0x28]
mov qword [rsp + 0xe0], rax
mov r9, qword [rsp + 0xd0]
mov r8, qword [rsp + 0xd8]
mov rdx, qword [rsp + 0xe0]
lea rcx, [rsp + 0x35]
call fcn.18001dc30
movzx eax, al
test eax, eax
je 0x18001e430
mov dword [rsp + 0x44], 0
jmp 0x18001e438
mov dword [rsp + 0x44], select
mov eax, dword [rsp + 0x44]
mov dword [rsp + 0x30], eax
jmp 0x18001e44a
mov dword [rsp + 0x30], 6
jmp 0x18001e45c
call fcn.18001d9b0
mov ecx, eax
call fcn.18001d910
mov dword [rsp + 0x30], eax
jmp 0x18001e466
mov dword [rsp + 0x30], 4
cmp dword [rsp + 0x30], 0
jne 0x18001e49c
mov rcx, qword [rsp + 0x2e0]
call fcn.18001e5f0
movzx eax, al
test eax, eax
je 0x18001e494
mov rcx, qword [rsp + 0x2e0]
call fcn.18001ea20
mov dword [rsp + 0x30], eax
jmp 0x18001e49c
mov dword [rsp + 0x30], 8
cmp dword [rsp + 0x30], 0
je 0x18001e4e9
mov rax, qword [rsp + 0x2e0]
mov rax, qword [rax + 0x40]
mov qword [rsp + 0xe8], rax
mov rax, qword [rsp + 0x2e0]
mov r9d, dword [rax + 0x30]
lea r8, str.Handshake_failed__cleaning_up__index__d_
mov edx, 0x400
mov rcx, qword [rsp + 0xe8]
call fcn.18000b5d0
mov rcx, qword [rsp + 0x2e0]
call fcn.18001f380
mov rax, qword [rsp + 0x2e0]
mov rax, qword [rax + 0x40]
mov qword [rsp + 0xf0], rax
mov edx, dword [rsp + 0x54]
mov rcx, qword [rsp + 0xf0]
call fcn.180004b90
mov rax, qword [rsp + 0x2e0]
mov ecx, dword [rsp + 0x30]
mov dword [rax + 0x38], ecx
call fcn.180005210
mov qword [rsp + 0x110], rax
mov ecx, 0x18
call fcn.180069fc0
mov qword [rsp + 0x78], rax
cmp qword [rsp + 0x78], 0
je 0x18001e55d
mov rdx, qword [rsp + 0x2e0]
mov rcx, qword [rsp + 0x78]
call fcn.180005a50
mov qword [rsp + 0x80], rax
jmp 0x18001e569
mov qword [rsp + 0x80], 0
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xf8], rax
mov rax, qword [rsp + 0xf8]
mov qword [rsp + 0x108], rax
mov rax, qword [rsp + 0x2e0]
mov rax, qword [rax + 0x40]
mov qword [rsp + 0x100], rax
xor r8d, r8d
mov edx, 0x1f5
mov rcx, qword [rsp + 0x100]
call fcn.1800049c0
mov dword [rsp + 0x58], eax
mov r8, qword [rsp + 0x108]
mov edx, dword [rsp + 0x58]
mov rcx, qword [rsp + 0x110]
call fcn.1800050a0
mov rcx, qword [rsp + 0x2b0]
xor rcx, rsp
call fcn.1800698b0
add rsp, 0x2c8
pop rdi
pop rsi
ret