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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x138
mov rdi, rdx
mov r15, rcx
lea rcx, [rsp + 0x40]
mov qword [rcx], rdx
mov qword [rcx + 8], 0xf
call fcn.140081bb0
mov rbx, rax
test bl, 1
je 0x14017c5ed
mov rsi, qword [rsp + 0x48]
test rsi, rsi
je 0x14017c5bb
mov rax, qword [rsp + 0x40]
lea rcx, [rsi - 1]
mov dl, byte [rax]
inc rax
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], rcx
cmp dl, 0x3a
jne 0x14017c5bb
lea rdx, [rsp + 0x80]
mov dword [rdx + 0x10], 0xa
and qword [rdx], 0
mov byte [rdx + 0x14], 1
lea rcx, [rsp + 0x40]
call fcn.140082490
cmp ax, 1
jne 0x14017c5bd
jmp 0x14017c5c7
xor eax, eax
mov qword [rsp + 0x48], rsi
test ax, ax
je 0x14017c5ed
movabs rax, 0xffffffff00
and rbx, rax
shr rbx, 8
movzx eax, dx
shl rax, 0x30
shl rbx, 0x10
or rbx, rax
mov eax, 1
jmp 0x14017c5f1
xor ebx, ebx
xor eax, eax
or rax, rbx
test ax, ax
je 0x14017c6c3
movzx eax, ax
cmp eax, 1
jne 0x14017c89f
cmp qword [rsp + 0x48], 0
jne 0x14017c89f
mov esi, ebx
shr esi, 0x10
shr rbx, 0x18
xor edi, edi
mov qword [rsp + 0x38], r15
mov eax, dword [rsp + 0x88]
mov dword [rsp + 0xc8], eax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0xc0], rax
mov al, byte [0x1403b0290]
mov ecx, 0x20
mov edx, 4
call fcn.140030db0
test rax, rax
je 0x14017cbdc
mov word [rax], di
mov rcx, rbx
shl rcx, 8
movzx edx, sil
or rdx, rcx
shr rbx, 0x18
mov word [rax + 6], bx
mov dword [rax + 2], edx
mov rcx, qword [rsp + 0xc0]
mov qword [rax + 8], rcx
mov ecx, dword [rsp + 0xc8]
mov dword [rax + 0x10], ecx
and dword [rax + 0x14], 0
mov dword [rax + 0x18], r14d
mov word [rax + 0x1c], bp
mov rcx, rax
add rcx, 0x20
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 1
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rcx
jmp 0x14017c98b
lea rax, [rdi + 1]
mov cl, byte [rdi]
mov qword [rsp + 0x40], rax
mov qword [rsp + 0x48], 0xe
cmp cl, 0x5b
jne 0x14017c891
lea rbx, [rsp + 0x80]
lea rdx, [rsp + 0x40]
mov rcx, rbx
call fcn.140082110
cmp byte [rbx], 0
je 0x14017c891
mov ebx, dword [rsp + 0x81]
mov rax, qword [rsp + 0x85]
mov qword [rsp + 0xe0], rax
mov eax, dword [rsp + 0x8d]
mov dword [rsp + 0xe8], eax
mov rcx, qword [rsp + 0x40]
mov r8, qword [rsp + 0x48]
xor r12d, r12d
test r8, r8
je 0x14017c79b
cmp byte [rcx], 0x25
jne 0x14017c7cd
mov qword [rsp + 0x38], r15
lea r9, [r8 - 1]
lea r10, [rcx + 1]
xor r14d, r14d
mov ebp, 0xa
mov r11, r9
mov rsi, r10
xor r15d, r15d
xor r12d, r12d
mov eax, 0
test r11, r11
je 0x14017c782
movzx r13d, byte [rsi]
add r13d, 0xffffffd0
xor eax, eax
cmp r13d, 0xa
setb al
jae 0x14017c782
dec r11
inc rsi
cmp eax, 1
jne 0x14017c7a4
mov eax, r14d
mul ebp
jo 0x14017c79d
mov r14d, eax
add r14d, r13d
jb 0x14017c79d
inc r15
jmp 0x14017c75f
jmp 0x14017c7cd
mov r15, qword [rsp + 0x38]
jmp 0x14017c7bf
test r15, r15
mov r15, qword [rsp + 0x38]
je 0x14017c7bc
mov r12d, 1
mov r9, r11
mov r10, rsi
jmp 0x14017c7bf
xor r12d, r12d
cmp r12d, 1
jne 0x14017c7cd
mov rcx, r10
mov r8, r9
jmp 0x14017c7d4
test r12d, r12d
cmove r14d, r12d
test r8, r8
je 0x14017c891
cmp byte [rcx], 0x5d
jne 0x14017c891
mov rsi, r8
dec rsi
je 0x14017c832
add r8, 0xfffffffffffffffe
mov al, byte [rcx + 1]
add rcx, 2
mov qword [rsp + 0x40], rcx
mov qword [rsp + 0x48], r8
cmp al, 0x3a
jne 0x14017c832
lea rdx, [rsp + 0x80]
mov dword [rdx + 0x10], 0xa
and qword [rdx], 0
mov byte [rdx + 0x14], 1
lea rcx, [rsp + 0x40]
call fcn.140082490
mov ebp, edx
cmp ax, 1
jne 0x14017c834
jmp 0x14017c83e
xor eax, eax
mov qword [rsp + 0x48], rsi
test ax, ax
je 0x14017c891
mov eax, dword [rsp + 0xe8]
mov rcx, qword [rsp + 0xe0]
mov qword [rsp + 0xd0], rcx
mov dword [rsp + 0xd8], eax
cmp qword [rsp + 0x48], 0
jne 0x14017c89f
shl rbx, 8
mov eax, dword [rsp + 0xd8]
mov dword [rsp + 0x88], eax
mov rax, qword [rsp + 0xd0]
mov qword [rsp + 0x80], rax
mov di, 1
xor esi, esi
jmp 0x14017c620
mov qword [rsp + 0x40], rdi
mov qword [rsp + 0x48], 0xf
lea rdx, [rsp + 0x80]
mov qword [rdx], rdi
mov ebx, 0xf
mov qword [rdx + 8], rbx
and qword [rdx + 0x10], 0
mov qword [rdx + 0x18], rbx
mov qword [rdx + 0x20], 1
movabs rax, 0x3a0000003a
mov qword [rdx + 0x28], rax
lea r14, [rsp + 0xe0]
mov rcx, r14
call fcn.1401a5240
cmp qword [r14], 0
je 0x14017c93e
mov rsi, qword [rsp + 0xe8]
mov rax, qword [rsp + 0xf0]
lea rcx, [rdi + rax]
sub rbx, rax
mov rdx, rbx
call fcn.140087ef0
test al, 1
jne 0x14017c94a
shr eax, 0x10
lea rdx, [rsp + 0x80]
mov qword [rdx], rdi
mov qword [rdx + 8], rsi
mov word [rdx + 0x10], ax
lea rdi, [rsp + 0x40]
mov rcx, rdi
call fcn.1401a48e0
cmp qword [rdi], 0
je 0x14017c956
mov rax, qword [rsp + 0x48]
jmp 0x14017cbbc
lea rax, str.invalid_socket_address
jmp 0x14017cbbc
lea rax, str.invalid_port_value
jmp 0x14017cbbc
mov qword [rsp + 0x38], r15
mov rax, qword [rsp + 0x48]
movups xmm0, xmmword [rsp + 0x50]
lea rdx, [rsp + 0x100]
movups xmmword [rdx + 8], xmm0
mov qword [rdx], rax
lea rdi, [rsp + 0x60]
mov rcx, rdi
call fcn.1401a4ad0
cmp qword [rdi], 0
je 0x14017cbb2
mov rax, qword [rsp + 0x60]
mov rcx, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x70]
mov qword [rsp + 0x90], rdx
mov rdx, qword [rsp + 0x78]
mov qword [rsp + 0x98], rdx
mov qword [rsp + 0x80], rax
mov qword [rsp + 0x88], rcx
mov r13, qword [rsp + 0x90]
mov rax, qword [rsp + 0x98]
mov qword [rsp + 0xf8], rax
xor r15d, r15d
cmp r13, qword [rsp + 0xf8]
je 0x14017cb6e
mov rax, r13
add r13, 0x20
mov qword [rsp + 0x90], r13
movzx edi, word [rax]
cmp di, 2
je 0x14017cb6e
mov qword [rsp + 0xb8], r15
mov ebx, dword [rax + 0x14]
mov esi, dword [rax + 0x18]
movzx r12d, word [rax + 0x1c]
movzx eax, word [r13 - 0xe]
mov word [rsp + 0x70], ax
movups xmm0, xmmword [r13 - 0x1e]
movaps xmmword [rsp + 0x60], xmm0
mov rax, qword [0x1403b01d8]
cmp rax, 3
jne 0x14017cb64
mov ebp, 2
test di, di
je 0x14017ca4b
mov ebp, 0x17
mov dword [rsp + 0x28], 0x81
and dword [rsp + 0x20], 0
mov ecx, ebp
mov edx, 2
xor r8d, r8d
xor r9d, r9d
call sub.ws2_32.dll_WSASocketW
mov r14, rax
cmp rax, 0xffffffffffffffff
je 0x14017ca89
test di, di
je 0x14017caea
mov r8d, 0x1c
mov ax, 0x17
movups xmm0, xmmword [rsp + 0x62]
jmp 0x14017cb01
call sub.ws2_32.dll_WSAGetLastError
cmp eax, 0x2739
je 0x14017caa3
mov r15d, eax
cmp eax, 0x2726
jne 0x14017cb40
mov dword [rsp + 0x28], 1
and dword [rsp + 0x20], 0
mov ecx, ebp
mov edx, 2
xor r8d, r8d
xor r9d, r9d
call sub.ws2_32.dll_WSASocketW
cmp rax, 0xffffffffffffffff
je 0x14017cb5a
mov r14, rax
mov rcx, rax
mov edx, 1
xor r8d, r8d
call sub.KERNEL32.dll_SetHandleInformation
test eax, eax
jne 0x14017ca73
call sub.KERNEL32.dll_GetLastError
jmp 0x14017cb35
movzx r12d, word [rsp + 0x64]
mov ebx, dword [rsp + 0x60]
mov r8d, 0x10
mov ax, 2
xorps xmm0, xmm0
rol r12w, 8
mov word [rsp + 0x40], ax
mov word [rsp + 0x42], r12w
mov dword [rsp + 0x44], ebx
movups xmmword [rsp + 0x48], xmm0
mov dword [rsp + 0x58], esi
mov rcx, r14
lea rdx, [rsp + 0x40]
call sub.ws2_32.dll_bind
cmp eax, 0xffffffff
jne 0x14017cb8b
call sub.ws2_32.dll_WSAGetLastError
mov r15d, eax
mov rcx, r14
call fcn.1401d1244
shl r15, 0x20
or r15, 2
mov rcx, qword [rsp + 0xb8]
call fcn.14017cc08
jmp 0x14017c9da
call sub.ws2_32.dll_WSAGetLastError
mov r15d, eax
jmp 0x14017cb40
call fcn.1401a4fb0
jmp 0x14017ca3c
lea rcx, [rsp + 0x80]
call fcn.14017cbed
test r15, r15
lea rax, str.could_not_resolve_to_any_addresses
cmovne rax, r15
jmp 0x14017cbb7
lea rcx, [rsp + 0x80]
call fcn.14017cbed
mov rcx, qword [rsp + 0xb8]
call fcn.14017cc08
mov r15, qword [rsp + 0x38]
mov qword [r15 + 8], r14
xor eax, eax
jmp 0x14017cbc5
mov rax, qword [rsp + 0x68]
mov r15, qword [rsp + 0x38]
mov qword [r15 + 8], rax
mov eax, 1
mov qword [r15], rax
add rsp, 0x138
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
mov ecx, 4
mov edx, 0x20
call fcn.1400513e0
ud2