Function at 0x140037ac0
Capabilities:
Create tcp socket
Set socket configuration

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0xb8]
sub rsp, 0x1b8
mov rax, qword [0x140067568]
xor rax, rsp
mov qword [rbp + 0xa0], rax
movzx r12d, r9w
mov r15, r8
mov r14, rdx
mov rsi, rcx
mov qword [rsp + 0x60], rdx
mov rcx, qword [rcx]
call fcn.140036750
test al, al
jne 0x140038114
xor r13d, r13d
mov qword [rbp - 0x10], r13
mov qword [rbp], r13
mov qword [rbp + 8], setsockopt
mov byte [rbp - 0x10], r13b
lea edx, [r13 + 1]
mov ebx, 2
lea r8d, [r13 + 6]
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_socket]
mov rdi, rax
cmp rax, 0xffffffffffffffff
jne 0x140037b8d
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, [rbp - 0x30]
call fcn.140038630
nop
mov r8, rax
lea rdx, str.socket_failed_
lea rcx, [rbp - 0x50]
call fcn.140002740
mov rdx, rax
lea rcx, [rbp - 0x10]
call fcn.14000a3c0
lea rcx, [rbp - 0x50]
call fcn.140008960
nop
lea rcx, [rbp - 0x30]
call fcn.140008960
jmp 0x14003809f
mov qword [rbp + 0x50], rbx
mov r8d, setsockopt
lea rdx, [rbp + 0x50]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140037bec
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, [rbp - 0x30]
call fcn.140038630
nop
mov r8, rax
lea rdx, str.bind_failed_
lea rcx, [rbp - 0x50]
call fcn.140002740
mov rdx, rax
lea rcx, [rbp - 0x10]
call fcn.14000a3c0
lea rcx, [rbp - 0x50]
call fcn.140008960
nop
lea rcx, [rbp - 0x30]
jmp 0x140038091
mov dword [rbp - 0x60], 0x25a207b9
mov dword [rbp - 0x5c], 0x4660ddf3
mov dword [rbp - 0x58], 0xe576e98e
mov dword [rbp - 0x54], 0x3e06748c
mov dword [rsp + 0x50], 8
cmp qword [0x14006ad28], 0
jne 0x140037ca6
mov qword [rsp + 0x40], r13
mov qword [rsp + 0x38], r13
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 8
lea rax, [0x14006ad28]
mov qword [rsp + 0x20], rax
mov r9d, setsockopt
lea r8, [rbp - 0x60]
mov edx, 0xc8000006
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x140037ca6
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, [rbp - 0x30]
call fcn.140038630
nop
mov r8, rax
lea rdx, str.WSAIoctl_failed_
lea rcx, [rbp - 0x50]
call fcn.140002740
mov rdx, rax
lea rcx, [rbp - 0x10]
call fcn.14000a3c0
lea rcx, [rbp - 0x50]
call fcn.140008960
nop
lea rcx, [rbp - 0x30]
jmp 0x140038091
mov rcx, qword [rsi]
call fcn.14002ba00
mov rdx, rax
xor r9d, r9d
xor r8d, r8d
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov rbx, rax
mov rcx, qword [rsi]
call fcn.14002ba00
cmp rbx, rax
je 0x140037d0c
lea rcx, [rbp - 0x30]
call fcn.140038a20
nop
mov r8, rax
lea rdx, str.CreateIoCompletionPort_failed_
lea rcx, [rbp - 0x50]
call fcn.140002740
mov rdx, rax
lea rcx, [rbp - 0x10]
call fcn.14000a3c0
lea rcx, [rbp - 0x50]
call fcn.140008960
nop
lea rcx, [rbp - 0x30]
jmp 0x140038091
mov eax, 2
mov word [rbp - 0x30], ax
movzx ecx, r12w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x2e], ax
mov rcx, r15
call fcn.14000db20
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbp - 0x2c], eax
mov qword [rbp - 0x80], r13
lea rax, [rsp + 0x68]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], r13
mov dword [rsp + 0x20], r13d
xor r9d, r9d
lea r8d, [r9 + 0x10]
lea rdx, [rbp - 0x30]
mov rcx, rdi
call qword [0x14006ad28]
cmp eax, 1
jne 0x140037d7c
lea rdx, str.ConnectEx_returned_immediately__which_is_not_supported.
lea rcx, [rbp - 0x10]
call fcn.14001adb0
jmp 0x140038096
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e5
je 0x140037dc7
mov edx, eax
lea rcx, [rbp + 0x60]
call fcn.140038630
nop
mov r8, rax
lea rdx, str.ConnectEx_failed_
lea rcx, [rbp - 0x50]
call fcn.140002740
mov rdx, rax
lea rcx, [rbp - 0x10]
call fcn.14000a3c0
lea rcx, [rbp - 0x50]
call fcn.140008960
nop
lea rcx, [rbp + 0x60]
jmp 0x140038091
mov rcx, qword [rsi]
call fcn.140036510
mov qword [rbp - 0x78], rax
mov qword [rbp - 0x70], rdi
mov byte [rbp - 0x68], 0
lea rax, [rsp + 0x68]
mov qword [rsi + 8], rax
mov rcx, qword [rsi]
call fcn.140036510
lea rbx, [rax + 0x70]
lea rax, vtable.std::_Func_impl_no_alloc_class__lambda_7a79f52411fc0b549beab9d6b67a5e4c___void___.0
mov qword [rbp + 0x10], rax
mov qword [rbp + 0x18], rsi
lea rax, [rbp + 0x10]
mov qword [rbp + 0x48], rax
mov qword [rbp + 0x98], r13
lea rdx, [rbp + 0x60]
lea rcx, [rbp + 0x10]
call qword [method.std::_Func_impl_no_alloc_class__lambda_7a79f52411fc0b549beab9d6b67a5e4c___void___.virtual_0]
mov r8, rax
mov qword [rbp + 0x98], rax
mov rcx, qword [rbp + 0x48]
test rcx, rcx
je 0x140037e4d
mov rax, qword [rcx]
lea rdx, [rbp + 0x10]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov rcx, r13
mov qword [rbp + 0x48], rcx
mov r8, qword [rbp + 0x98]
mov r9, qword [rbx + 0x38]
test r9, r9
je 0x140037ea5
mov rcx, r9
cmp r9, rbx
jne 0x140037e9d
mov rax, qword [r9]
lea rdx, [rbp + 0x10]
call qword [rax + reloc.WS2_32.dll_htonl]
mov rcx, rax
mov qword [rbp + 0x48], rax
mov r8, qword [rbx + 0x38]
test r8, r8
je 0x140037e94
mov rax, qword [r8]
cmp r8, rbx
setne dl
mov rcx, r8
call qword [rax + 0x20]
mov rcx, qword [rbp + 0x48]
mov r8, qword [rbp + 0x98]
jmp 0x140037ea1
mov r8, qword [rbp + 0x98]
jmp 0x140037ea5
mov qword [rbp + 0x48], rcx
mov qword [rbx + 0x38], r13
test r8, r8
je 0x140037ee9
lea rax, [rbp + 0x60]
cmp r8, rax
jne 0x140037ee5
mov rax, qword [r8]
mov rdx, rbx
mov rcx, r8
call qword [rax + reloc.WS2_32.dll_htonl]
mov qword [rbx + 0x38], rax
mov rcx, qword [rbp + 0x98]
test rcx, rcx
je 0x140037edf
mov rax, qword [rcx]
lea rdx, [rbp + 0x60]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov rcx, qword [rbp + 0x48]
jmp 0x140037ee9
mov qword [rbx + 0x38], r8
test rcx, rcx
je 0x140037efe
mov rax, qword [rcx]
lea rdx, [rbp + 0x10]
cmp rcx, rdx
setne dl
call qword [rax + 0x20]
mov rcx, qword [rsi]
call fcn.140036200
mov rcx, qword [rsi]
call fcn.140036510
lea rbx, [rax + 0x70]
mov rcx, qword [rbx + 0x38]
test rcx, rcx
je 0x140037f2b
mov rax, qword [rcx]
cmp rcx, rbx
setne dl
call qword [rax + 0x20]
mov qword [rbx + 0x38], r13
mov qword [rsi + 8], r13
lea rax, [rsp + 0x58]
mov qword [rsp + 0x20], rax
xor r9d, r9d
lea r8, [rsp + 0x60]
lea rdx, [rsp + 0x68]
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_WSAGetOverlappedResult]
cmp eax, 1
je 0x140037fb1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x3e3
je 0x140037f9b
mov edx, eax
lea rcx, [rbp - 0x50]
call fcn.140038630
nop
mov r8, rax
lea rdx, str.ConnectEx_failed_
lea rcx, [rbp + 0x60]
call fcn.140002740
mov rdx, rax
lea rcx, [rbp - 0x10]
call fcn.14000a3c0
lea rcx, [rbp + 0x60]
call fcn.140008960
nop
jmp 0x14003808d
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
test eax, eax
jne 0x1400380d1
jmp 0x14003813b
mov dword [rsp + 0x54], 1
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x54]
mov edx, 0xffff
mov r8d, 0x7010
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_setsockopt]
test eax, eax
jne 0x140038051
mov r8, rdi
mov rdx, qword [rsi]
mov rcx, r14
call fcn.140034c30
nop
mov rdx, qword [rbp + 8]
cmp rdx, 0x10
jb 0x14003802b
inc rdx
mov rcx, qword [rbp - 0x10]
mov rax, rcx
cmp rdx, 0x1000
jb 0x140038026
add rdx, 0x27
mov rcx, qword [rcx - 8]
sub rax, rcx
add rax, 0xfffffffffffffff8
cmp rax, 0x1f
jbe 0x140038026
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
int3
call fcn.140041e10
mov rax, r14
mov rcx, qword [rbp + 0xa0]
xor rcx, rsp
call fcn.1400423e0
add rsp, 0x1b8
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
nop
mov edx, eax
lea rcx, [rbp - 0x50]
call fcn.140038630
nop
mov r8, rax
lea rdx, str.setsockopt_failed_
lea rcx, [rbp + 0x60]
call fcn.140002740
mov rdx, rax
lea rcx, [rbp - 0x10]
call fcn.14000a3c0
lea rcx, [rbp + 0x60]
call fcn.140008960
nop
lea rcx, [rbp - 0x50]
call fcn.140008960
mov rcx, rdi
call qword [sym.imp.WS2_32.dll_closesocket]
lea r8, [rbp - 0x10]
lea rdx, str.TcpConnector::connect_
lea rcx, [rbp + 0x10]
call fcn.140012dc0
nop
mov rdx, rax
lea rcx, [rbp - 0x50]
call fcn.140008620
lea rdx, [0x1400621a0]
lea rcx, [rbp - 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, [rbp + 0x60]
call fcn.140038630
nop
mov r8, rax
lea rdx, str.TcpConnector::connect__closesocket_failed_
lea rcx, [rbp + 0x10]
call fcn.140002740
nop
mov rdx, rax
lea rcx, [rbp - 0x50]
call fcn.140008620
lea rdx, [0x1400621a0]
lea rcx, [rbp - 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x30], xmm0
mov qword [rbp - 0x20], rax
lea rcx, [rbp - 0x30]
call fcn.140034c10
lea rdx, [0x1400639f8]
lea rcx, [rbp - 0x30]
call sub.VCRUNTIME140.dll__CxxThrowException
nop
xorps xmm0, xmm0
xor eax, eax
movups xmmword [rbp - 0x50], xmm0
mov qword [rbp - 0x40], rax
lea rcx, [rbp - 0x50]
call fcn.140034c10
lea rdx, [0x1400639f8]
lea rcx, [rbp - 0x50]
call sub.VCRUNTIME140.dll__CxxThrowException
int3