Function at 0x140188950
Capabilities:
Create tcp socket

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x27]
sub rsp, 0x100
mov rax, qword [0x140248318]
xor rax, rsp
mov qword [rbp + 0x1f], rax
movzx r14d, r9w
mov rbx, r8
mov rsi, rdx
mov rdi, rcx
mov qword [rcx], rdx
xor r15d, r15d
mov qword [rbp - 0x61], r15
mov qword [rbp - 0x51], r15
mov qword [rbp - 0x49], setsockopt
mov byte [rbp - 0x61], r15b
lea edx, [r15 + 1]
lea r8d, [r15 + 6]
mov r12d, 2
mov ecx, r12d
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rdi + 8], rax
cmp rax, 0xffffffffffffffff
jne 0x140188a08
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, [rsp + 0x58]
call fcn.14018ad80
nop
mov r8, rax
lea rdx, str.socket_failed_
lea rcx, [rbp - 0x41]
call fcn.14000f6b0
mov rdx, rax
lea rcx, [rbp - 0x61]
call fcn.14000e8a0
lea rcx, [rbp - 0x41]
call fcn.14000e740
nop
lea rcx, [rsp + 0x58]
call fcn.14000e740
jmp 0x140188c34
mov word [rbp - 0x41], r12w
movzx ecx, r14w
call qword [sym.imp.WS2_32.dll_htons]
mov word [rbp - 0x3f], ax
mov rcx, rbx
call fcn.140028190
mov ecx, eax
call qword [sym.imp.WS2_32.dll_htonl]
mov dword [rbp - 0x3d], eax
mov r8d, setsockopt
lea rdx, [rbp - 0x41]
mov rcx, qword [rdi + 8]
call qword [sym.imp.WS2_32.dll_bind]
test eax, eax
je 0x140188a88
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, [rbp - 0x21]
call fcn.14018ad80
nop
mov r8, rax
lea rdx, str.bind_failed_
lea rcx, [rsp + 0x58]
call fcn.14000f6b0
mov rdx, rax
lea rcx, [rbp - 0x61]
call fcn.14000e8a0
lea rcx, [rsp + 0x58]
call fcn.14000e740
nop
jmp 0x140188c21
mov edx, 0x7fffffff
mov rcx, qword [rdi + 8]
call qword [sym.imp.WS2_32.dll_listen]
test eax, eax
je 0x140188ae1
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, [rsp + 0x58]
call fcn.14018ad80
nop
mov r8, rax
lea rdx, str.listen_failed_
lea rcx, [rbp - 0x21]
call fcn.14000f6b0
mov rdx, rax
lea rcx, [rbp - 0x61]
call fcn.14000e8a0
lea rcx, [rbp - 0x21]
call fcn.14000e740
nop
lea rcx, [rsp + 0x58]
jmp 0x140188c25
mov dword [rsp + 0x58], 0xb5367df1
mov dword [rbp - 0x7d], 0x11cfcbac
mov dword [rbp - 0x79], 0x8000ca95
mov dword [rbp - 0x75], 0x92a1485f
mov dword [rsp + 0x50], 8
cmp qword [0x140256ef0], 0
jne 0x140188b9e
mov qword [rsp + 0x40], r15
mov qword [rsp + 0x38], r15
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x28], 8
lea rax, [0x140256ef0]
mov qword [rsp + 0x20], rax
mov r9d, setsockopt
lea r8, [rsp + 0x58]
mov edx, 0xc8000006
mov rcx, qword [rdi + 8]
call qword [sym.imp.WS2_32.dll_WSAIoctl]
test eax, eax
je 0x140188b9e
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov edx, eax
lea rcx, [rbp - 1]
call fcn.14018ad80
nop
mov r8, rax
lea rdx, str.WSAIoctl_failed_
lea rcx, [rbp - 0x21]
call fcn.14000f6b0
mov rdx, rax
lea rcx, [rbp - 0x61]
call fcn.14000e8a0
lea rcx, [rbp - 0x21]
call fcn.14000e740
nop
lea rcx, [rbp - 1]
jmp 0x140188c25
mov rcx, rsi
call fcn.14001f1a0
mov rdx, rax
xor r9d, r9d
xor r8d, r8d
mov rcx, qword [rdi + 8]
call qword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov rbx, rax
mov rcx, rsi
call fcn.14001f1a0
cmp rbx, rax
jne 0x140188bee
mov qword [rdi + 0x10], r15
mov rax, rdi
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.14018bc90
add rsp, 0x100
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret
lea rcx, [rbp - 0x21]
call fcn.14018b170
nop
mov r8, rax
lea rdx, str.CreateIoCompletionPort_failed_
lea rcx, [rbp - 1]
call fcn.14000f6b0
mov rdx, rax
lea rcx, [rbp - 0x61]
call fcn.14000e8a0
lea rcx, [rbp - 1]
call fcn.14000e740
nop
lea rcx, [rbp - 0x21]
call fcn.14000e740
mov rcx, qword [rdi + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
lea r8, [rbp - 0x61]
lea rdx, str.TcpListener::TcpListener_
lea rcx, [rbp - 1]
call fcn.14000f710
nop
mov rdx, rax
lea rcx, [rbp - 0x41]
call fcn.140019dc0
lea rdx, [0x14023dac0]
lea rcx, [rbp - 0x41]
call sub.VCRUNTIME140.dll__CxxThrowException
int3