Function at 0x1400851d7
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, 0x148
movapd xmmword [rsp + 0x130], xmm7
movapd xmmword [rsp + 0x120], xmm6
mov rax, qword [rcx]
cmp byte [rax], 0
mov byte [rax], 0
je 0x140085884
lea r15, str.127.0.0.1:34254
lea rcx, [rsp + 0x30]
mov qword [rcx], r15
mov qword [rcx + 8], 0xf
call fcn.140016440
mov rsi, rax
test sil, 1
je 0x140085265
lea rcx, [rsp + 0x30]
call fcn.140016b04
test ax, ax
je 0x140085265
movabs rax, 0xffffffff00
and rsi, rax
shr rsi, 8
movzx eax, dx
shl rax, 0x30
shl rsi, 0x10
or rsi, rax
mov eax, 1
jmp 0x140085269
xor esi, esi
xor eax, eax
movzx ecx, si
or rcx, rax
je 0x14008551d
cmp qword [rsp + 0x38], 0
jne 0x14008570d
mov ebp, esi
shr ebp, 0x10
shr rsi, 0x18
xor r14d, r14d
mov eax, dword [rsp + 0xc8]
mov dword [rsp + 0xb8], eax
mov rax, qword [rsp + 0xc0]
mov qword [rsp + 0xb0], rax
mov ecx, 0x20
mov edx, 4
call fcn.14008a2ad
mov word [rax], r14w
mov rcx, rsi
shl rcx, 8
movzx edx, bpl
or rdx, rcx
shr rsi, 0x18
mov word [rax + 6], si
mov dword [rax + 2], edx
mov rcx, qword [rsp + 0xb0]
mov qword [rax + 8], rcx
mov ecx, dword [rsp + 0xb8]
mov dword [rax + 0x10], ecx
and dword [rax + 0x14], 0
mov dword [rax + 0x18], edi
mov word [rax + 0x1c], bx
lea rcx, [rax + 0x20]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], 1
mov qword [rsp + 0x70], rax
mov qword [rsp + 0x78], rcx
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 rax, qword [rsp + 0x90]
mov rcx, qword [rsp + 0x98]
mov qword [rsp + 0xe0], rcx
xor r14d, r14d
xorpd xmm6, xmm6
cmp rax, qword [rsp + 0xe0]
je 0x1400855ff
lea rdi, [rax + 0x20]
movzx esi, word [rax]
cmp si, 2
je 0x140085602
mov qword [rsp + 0x50], r14
mov r15d, dword [rax + 0x14]
mov r13d, dword [rax + 0x18]
movzx r12d, word [rax + 0x1c]
movzx ecx, word [rax + 0x12]
mov word [rsp + 0x70], cx
movups xmm0, xmmword [rax + 2]
movaps xmmword [rsp + 0x60], xmm0
call fcn.14008de77
test si, si
mov ebp, 0x17
mov eax, 2
cmove ebp, eax
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 rbx, rax
cmp rax, 0xffffffffffffffff
je 0x14008540f
test si, si
je 0x140085484
rol r12w, 8
movupd xmm7, xmmword [rsp + 0x62]
mov r8d, 0x1c
mov ax, 0x17
mov rsi, qword [rsp + 0x50]
jmp 0x1400854ac
call qword [sym.imp.ws2_32.dll_WSAGetLastError]
cmp eax, 0x2739
je 0x14008542a
mov r14d, eax
cmp eax, 0x2726
jne 0x1400854f6
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 0x140085500
mov rbx, rax
mov rcx, rax
mov edx, 1
xor r8d, r8d
call sub.kernel32.dll_SetHandleInformation
test eax, eax
jne 0x1400853e7
call fcn.14000f205
mov r14, rax
mov rcx, rbx
call qword [sym.imp.ws2_32.dll_closesocket]
jmp 0x140085508
movzx r12d, word [rsp + 0x64]
rol r12w, 8
mov r15d, dword [rsp + 0x60]
movsd xmm7, xmm6
mov r8d, 0x10
mov ax, 2
mov rsi, qword [rsp + 0x50]
mov r13d, dword [rsp + 0x5c]
mov word [rsp + 0x30], ax
mov word [rsp + 0x32], r12w
mov dword [rsp + 0x34], r15d
movupd xmmword [rsp + 0x38], xmm7
mov dword [rsp + 0x5c], r13d
mov dword [rsp + 0x48], r13d
mov rcx, rbx
lea rdx, [rsp + 0x30]
call qword [sym.imp.ws2_32.dll_bind]
cmp eax, 0xffffffff
jne 0x140085626
call fcn.140088391
mov r14, rax
mov rcx, rbx
call qword [sym.imp.ws2_32.dll_closesocket]
jmp 0x14008550d
shl r14, 0x20
or r14, 2
jmp 0x140085508
call fcn.140088391
mov r14, rax
mov rsi, qword [rsp + 0x50]
mov rcx, rsi
call fcn.140041dc7
mov rax, rdi
jmp 0x140085367
lea rcx, [rsp + 0x30]
mov qword [rcx], r15
mov qword [rcx + 8], 0xf
mov edx, 0x5b
call fcn.1400167e3
test al, al
je 0x1400856ff
lea rsi, [rsp + 0x80]
lea rdx, [rsp + 0x30]
mov rcx, rsi
call fcn.1400165c1
cmp byte [rsi], 0
je 0x1400856ff
mov esi, dword [rsp + 0x81]
mov rax, qword [rsp + 0x85]
mov qword [rsp + 0xd0], rax
mov eax, dword [rsp + 0x8d]
mov dword [rsp + 0xd8], eax
lea rcx, [rsp + 0x30]
mov rbx, qword [rcx]
mov r14, qword [rcx + 8]
mov edx, 0x25
call fcn.1400167e3
test al, al
je 0x14008566c
mov rcx, qword [rsp + 0x30]
mov r8, qword [rsp + 0x38]
xor edi, edi
mov r10d, 0xa
mov r9, rcx
mov r12, r8
xor r11d, r11d
mov eax, 0
test r12, r12
je 0x1400855dc
movzx ebp, byte [r9]
add ebp, 0xffffffd0
xor eax, eax
cmp ebp, 0xa
setb al
jae 0x1400855dc
dec r12
inc r9
cmp eax, 1
jne 0x140085670
mov eax, edi
mul r10d
jo 0x140085686
mov edi, eax
add edi, ebp
jb 0x140085686
inc r11
jmp 0x1400855bb
mov rdi, rax
lea rcx, [rsp + 0x80]
mov qword [rcx + 0x10], rdi
call fcn.1400851a2
test r14, r14
lea rcx, [0x1400d0d38]
cmovne rcx, r14
jmp 0x1400857d3
lea rcx, [rsp + 0x80]
mov qword [rcx + 0x10], rdi
call fcn.1400851a2
mov rcx, rsi
call fcn.140041dc7
mov rcx, rbx
movaps xmm6, xmmword [rsp + 0x120]
movaps xmm7, xmmword [rsp + 0x130]
add rsp, 0x148
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
jmp qword [sym.imp.ws2_32.dll_closesocket]
xor eax, eax
jmp 0x140085696
mov qword [rsp + 0x38], r12
mov qword [rsp + 0x30], r9
test r11, r11
je 0x140085686
mov eax, 1
jmp 0x140085692
mov qword [rsp + 0x30], rcx
mov qword [rsp + 0x38], r8
xor eax, eax
test eax, eax
jne 0x1400856a0
mov qword [rsp + 0x30], rbx
mov qword [rsp + 0x38], r14
test eax, eax
cmove edi, eax
lea rcx, [rsp + 0x30]
mov edx, 0x5d
call fcn.1400167e3
test al, al
je 0x1400856ff
lea rcx, [rsp + 0x30]
call fcn.140016b04
test ax, ax
je 0x1400856ff
mov eax, dword [rsp + 0xd8]
mov rcx, qword [rsp + 0xd0]
mov qword [rsp + 0xc0], rcx
mov dword [rsp + 0xc8], eax
cmp qword [rsp + 0x38], 0
jne 0x14008570d
mov ebx, edx
shl rsi, 8
mov r14w, 1
xor ebp, ebp
jmp 0x14008528d
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x38], 0xf
lea rsi, [rsp + 0xa8]
mov qword [rsi - 0x28], r15
mov edi, 0xf
mov qword [rsi - 0x20], rdi
and qword [rsi - 0x18], 0
mov qword [rsi - 0x10], rdi
mov qword [rsi - 8], 1
movabs rax, 0x3a0000003a
mov qword [rsi], rax
mov r14d, 1
xor ebx, ebx
mov r8, rdi
sub r8, rbx
jb 0x1400857cc
cmp rdi, 0xf
ja 0x1400857cc
add rbx, r15
mov cl, byte [rsp + r14 + 0xa7]
mov rdx, rbx
call fcn.140016cd3
cmp rax, 1
jne 0x1400857cc
mov rdi, rdx
mov rbx, qword [rsp + 0x90]
mov r14, qword [rsp + 0xa0]
add rdi, rbx
lea rax, [r14 - 1]
mov r12, rdi
sub r12, rax
jb 0x1400857bf
mov r13, r12
add r13, r14
jb 0x1400857bf
cmp r13, 0xf
ja 0x1400857bf
cmp r14, 5
jae 0x140085884
lea rcx, [r15 + r12]
mov rdx, r14
mov r8, rsi
mov r9, r14
call fcn.14000e9a8
test al, al
jne 0x1400857fc
mov qword [rsp + 0x98], rdi
jmp 0x140085748
lea rcx, str.invalid_socket_address
call fcn.14001be52
movaps xmm6, xmmword [rsp + 0x120]
movaps xmm7, xmmword [rsp + 0x130]
add rsp, 0x148
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
lea rcx, [r15 + r13]
mov edx, 0xf
sub rdx, r13
call fcn.1400176bb
test al, 1
jne 0x140085841
shr eax, 0x10
lea rdx, [rsp + 0x80]
mov qword [rdx], r15
mov qword [rdx + 8], r12
mov word [rdx + 0x10], ax
lea rsi, [rsp + 0x30]
mov rcx, rsi
call fcn.14008dc7e
cmp qword [rsi], 0
je 0x14008584a
mov rcx, qword [rsp + 0x38]
jmp 0x1400857d3
lea rcx, str.p__r_
jmp 0x1400857d3
mov rax, qword [rsp + 0x38]
movups xmm0, xmmword [rsp + 0x40]
lea rdx, [rsp + 0xe8]
movups xmmword [rdx + 8], xmm0
mov qword [rdx], rax
lea rsi, [rsp + 0x60]
mov rcx, rsi
call fcn.14008dd29
cmp qword [rsi], 0
jne 0x140085314
mov rcx, qword [rsp + 0x68]
jmp 0x1400857d3
ud2