Function at 0x180050a60
Capabilities:
Create tcp socket
Create udp socket

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
sub rsp, 0x298
mov qword [rsp + 0x80], 0xfffffffffffffffe
mov rax, qword [0x1800f8370]
xor rax, rsp
mov qword [rsp + 0x280], rax
mov dword [rsp + 0x20], 0
mov rax, qword [rsp + 0x2a0]
mov byte [rax + 0x60], 0
lea rcx, [rsp + 0x90]
call fcn.1800197e0
nop
xor r8d, r8d
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov rcx, qword [rsp + 0x2a0]
mov qword [rcx + 0x18], rax
mov rax, qword [rsp + 0x2a0]
cmp qword [rax + 0x18], 0xffffffffffffffff
jne 0x180050ba0
mov byte [rsp + 0x90], 0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0xd8], eax
mov edx, dword [rsp + 0xd8]
lea rcx, [rsp + 0x160]
call fcn.18001db00
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x70], rax
mov r8, qword [rsp + 0x70]
lea rdx, str.create_socket_error:
lea rcx, [rsp + 0x1a0]
call fcn.18000df20
mov qword [rsp + 0x40], rax
mov rdx, qword [rsp + 0x40]
lea rcx, [rsp + 0x98]
call fcn.18000e300
lea rcx, [rsp + 0x1a0]
call fcn.180007220
nop
lea rcx, [rsp + 0x160]
call fcn.180007220
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x2a8]
call fcn.180019730
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x90]
call fcn.180019c50
mov rax, qword [rsp + 0x2a8]
jmp 0x180050ecc
lea rdx, [rsp + 0x1c0]
mov rcx, qword [rsp + 0x2a0]
call fcn.180050670
mov qword [rsp + 0x60], rax
mov rax, qword [rsp + 0x60]
mov qword [rsp + 0x50], rax
mov rdx, qword [rsp + 0x50]
lea rcx, [rsp + 0x90]
call fcn.180019d50
nop
lea rcx, [rsp + 0x1c0]
call fcn.180019c50
movzx eax, byte [rsp + 0x90]
test eax, eax
jne 0x180050c2a
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x2a8]
call fcn.180019730
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x90]
call fcn.180019c50
mov rax, qword [rsp + 0x2a8]
jmp 0x180050ecc
lea rdx, [rsp + 0x220]
mov rcx, qword [rsp + 0x2a0]
call fcn.180050900
lea rcx, [rsp + 0x220]
call fcn.180019c50
mov eax, 2
mov word [rsp + 0xf0], ax
mov rax, qword [rsp + 0x2a0]
add rax, 0x20
mov rcx, rax
call fcn.18000ab90
mov rcx, rax
call qword [sym.imp.WS2_32.dll_inet_addr]
mov dword [rsp + 0xf4], eax
mov rax, qword [rsp + 0x2a0]
movzx ecx, word [rax + 0x42]
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0xf2], ax
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0xf0]
mov rax, qword [rsp + 0x2a0]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x180050d8f
mov byte [rsp + 0x90], 0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0xd8], eax
mov edx, dword [rsp + 0xd8]
lea rcx, [rsp + 0x100]
call fcn.18001db00
mov qword [rsp + 0x30], rax
mov rax, qword [rsp + 0x30]
mov qword [rsp + 0x38], rax
mov r8, qword [rsp + 0x38]
lea rdx, [0x1800cdb78]
lea rcx, [rsp + 0x140]
call fcn.18000df20
mov qword [rsp + 0x48], rax
mov rdx, qword [rsp + 0x48]
lea rcx, [rsp + 0x98]
call fcn.18000e300
lea rcx, [rsp + 0x140]
call fcn.180007220
nop
lea rcx, [rsp + 0x100]
call fcn.180007220
mov rax, qword [rsp + 0x2a0]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.WS2_32.dll_closesocket]
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x2a8]
call fcn.180019730
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x90]
call fcn.180019c50
mov rax, qword [rsp + 0x2a8]
jmp 0x180050ecc
mov edx, 3
mov rax, qword [rsp + 0x2a0]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
jne 0x180050e7b
mov byte [rsp + 0x90], 0
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [rsp + 0xd8], eax
mov edx, dword [rsp + 0xd8]
lea rcx, [rsp + 0x120]
call fcn.18001db00
mov qword [rsp + 0x58], rax
mov rax, qword [rsp + 0x58]
mov qword [rsp + 0x68], rax
mov r8, qword [rsp + 0x68]
lea rdx, str.listen_error:
lea rcx, [rsp + 0x180]
call fcn.18000df20
mov qword [rsp + 0x28], rax
mov rdx, qword [rsp + 0x28]
lea rcx, [rsp + 0x98]
call fcn.18000e300
lea rcx, [rsp + 0x180]
call fcn.180007220
nop
lea rcx, [rsp + 0x120]
call fcn.180007220
mov rax, qword [rsp + 0x2a0]
mov rcx, qword [rax + 0x18]
call qword [sym.imp.WS2_32.dll_closesocket]
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x2a8]
call fcn.180019730
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x90]
call fcn.180019c50
mov rax, qword [rsp + 0x2a8]
jmp 0x180050ecc
mov byte [rsp + 0x90], 1
lea rdx, [0x1800cdacb]
lea rcx, [rsp + 0x98]
call fcn.18000e3f0
lea rdx, [rsp + 0x90]
mov rcx, qword [rsp + 0x2a8]
call fcn.180019730
mov eax, dword [rsp + 0x20]
or eax, 1
mov dword [rsp + 0x20], eax
lea rcx, [rsp + 0x90]
call fcn.180019c50
mov rax, qword [rsp + 0x2a8]
mov rcx, qword [rsp + 0x280]
xor rcx, rsp
call fcn.18007e510
add rsp, 0x298
ret