Function at 0x1401633d0
Capabilities:
Act as tcp client
Check for time delay via gettickcount
Check for time delay via queryperformancecounter
Connect socket
Connect tcp socket
Create tcp socket
Generate random numbers via winapi
Get local ipv4 addresses
Get socket information
Receive data
Receive data on socket
Send data
Send data on socket
Set socket configuration
Start tcp server

Disassembly:
push rbp
push rbx
push r12
push r15
lea rbp, [rsp - 0x37]
sub rsp, 0xa8
mov rax, qword [0x1402e1040]
xor rax, rsp
mov qword [rbp + 0x1f], rax
mov ebx, 2
mov dword [rbp - 0x2d], reloc.WS2_32.dll_recv
mov ecx, ebx
mov edx, 1
mov r8d, 6
mov r12, r9
call qword [sym.imp.WS2_32.dll_socket]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x140163421
jmp 0x140163825
mov qword [rsp + 0xd0], rsi
mov ecx, 0x7f000001
mov qword [rsp + 0xd8], rdi
xor edi, edi
mov qword [rsp + 0xe0], r13
mov qword [rbp - 0x19], rdi
mov qword [rsp + 0xa0], r14
mov word [rbp - 0x21], bx
call qword [sym.imp.WS2_32.dll_htonl]
lea r9, [rbp - 0x31]
mov word [rbp - 0x1f], di
mov edx, 0xffff
mov dword [rbp - 0x1d], eax
mov r8d, 0xfffffffb
mov qword [r12 + 8], 0xffffffffffffffff
mov rcx, r15
mov qword [r12], 0xffffffffffffffff
mov dword [rbp - 0x31], 1
mov dword [rsp + 0x20], 4
call qword [sym.imp.WS2_32.dll_setsockopt]
cmp eax, 0xffffffff
je 0x1401637e2
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp - 0x21]
mov rcx, r15
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x1401637e2
lea r8, [rbp - 0x2d]
mov rcx, r15
lea rdx, [rbp - 0x21]
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x1401637e2
cmp dword [rbp - 0x2d], 0x10
jl 0x1401637e2
mov edx, 1
mov rcx, r15
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x1401637e2
xor r8d, r8d
mov edx, 1
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_socket]
mov qword [r12], rax
cmp rax, 0xffffffffffffffff
je 0x1401637e2
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rbp - 0x21]
mov rcx, rax
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x1401637e2
lea r8, [rbp - 0x31]
mov dword [rbp - 0x31], 1
mov edx, 0x8004667e
mov rcx, r15
call qword [sym.imp.WS2_32.dll_ioctlsocket]
test eax, eax
js 0x1401637e2
mov edx, 1
mov qword [rbp - 0x11], r15
mov r8d, 0x3e8
mov dword [rbp - 9], 0x300
lea rcx, [rbp - 0x11]
call fcn.140135350
xor r8d, r8d
xor edx, edx
mov rcx, r15
call qword [sym.imp.WS2_32.dll_accept]
mov qword [r12 + 8], rax
cmp rax, 0xffffffffffffffff
je 0x1401637e2
cmp byte [0x1402e3f79], dil
je 0x1401635ca
lea rcx, [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov r8, qword [0x1402e3f70]
mov rax, qword [rbp - 0x29]
cqo
idiv r8
mov qword [rbp - 0x41], rax
mov rax, qword [rbp - 0x29]
cqo
idiv r8
imul rax, rdx, 0xf4240
cqo
idiv r8
jmp 0x1401635f5
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
shr edx, 6
imul ecx, edx, 0x3e8
mov r9d, edx
mov qword [rbp - 0x41], r9
sub r8d, ecx
imul eax, r8d, 0x3e8
mov r14d, 9
mov qword [rbp - 0x39], rax
mov esi, r14d
lea r13, [rbp + 0xf]
lea rdi, [rbp - 1]
nop word [rax + rax]
mov rax, qword [0x1402e1208]
lea rdx, [rbp - 0x31]
mov ebx, 4
mov r8d, 4
cmp rsi, rbx
cmovb rbx, rsi
xor ecx, ecx
call qword [rax + 0x50]
cmp eax, 4
jne 0x140163663
cmp byte [0x1402e37a8], 0
jne 0x140163670
mov r9d, 2
mov dword [rbp - 0x31], 0
mov r8d, eax
lea rdx, [rbp - 0x31]
xor ecx, ecx
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
neg eax
sbb eax, eax
and eax, 2
test eax, eax
jne 0x1401637e2
mov eax, dword [rbp - 0x31]
jmp 0x14016368b
imul eax, dword [0x1402e37ac], 0x41c64e6d
add eax, 0x3039
mov dword [0x1402e37ac], eax
ror eax, 0x10
mov dword [rbp - 0x31], eax
test rbx, rbx
je 0x1401636b1
sub rsi, rbx
nop dword [rax]
nop word [rax + rax]
mov byte [rdi], al
inc rdi
shr eax, 8
sub rbx, 1
jne 0x1401636a0
mov dword [rbp - 0x31], eax
test rsi, rsi
jne 0x140163610
mov rcx, qword [r12]
lea rdx, [rbp - 1]
xor r9d, r9d
mov r8d, r14d
call qword [sym.imp.WS2_32.dll_send]
mov rdi, qword [rbp - 0x41]
mov rsi, qword [rbp - 0x39]
nop word [rax + rax]
mov rax, qword [r12 + 8]
lea rcx, [rbp - 0x11]
mov edx, 1
mov qword [rbp - 0x11], rax
mov r8d, 0x3e8
mov dword [rbp - 9], 0x300
call fcn.140135350
mov rcx, qword [r12 + 8]
xor r9d, r9d
mov r8d, r14d
mov rdx, r13
call qword [sym.imp.WS2_32.dll_recv]
movsxd rcx, eax
cmp rcx, 0xffffffffffffffff
jne 0x14016383f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [0x1402e3f79], 0
mov ebx, eax
je 0x140163765
lea rcx, [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbp - 0x29]
cqo
idiv qword [0x1402e3f70]
mov r9, rax
imul rax, rdx, 0xf4240
cqo
idiv qword [0x1402e3f70]
mov rcx, rax
jmp 0x14016378c
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov r8d, eax
mov eax, 0x10624dd3
mul r8d
shr edx, 6
imul ecx, edx, 0x3e8
mov r9d, edx
sub r8d, ecx
imul ecx, r8d, 0x3e8
sub r9, rdi
movabs rax, 0x20c49ba5e353f7
cmp r9, rax
jge 0x1401637e2
movabs rax, 0xffdf3b645a1cac09
cmp r9, rax
jle 0x1401637d6
sub ecx, esi
mov eax, 0x10624dd3
imul ecx
sar edx, 6
mov eax, edx
shr eax, 0x1f
add edx, eax
imul rax, r9, 0x3e8
movsxd rcx, edx
add rcx, rax
cmp rcx, 0xea60
jg 0x1401637e2
cmp ebx, 0x2733
je 0x1401636e0
mov rcx, r15
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [r12]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rcx, qword [r12 + 8]
call qword [sym.imp.WS2_32.dll_closesocket]
mov eax, 0xffffffff
mov r13, qword [rsp + 0xe0]
mov rdi, qword [rsp + 0xd8]
mov rsi, qword [rsp + 0xd0]
mov r14, qword [rsp + 0xa0]
mov rcx, qword [rbp + 0x1f]
xor rcx, rsp
call fcn.140171bd0
add rsp, 0xa8
pop r15
pop r12
pop rbx
pop rbp
ret
sub r14, rcx
je 0x14016384c
add r13, rcx
jmp 0x1401636e0
mov rax, qword [rbp - 1]
cmp rax, qword [rbp + 0xf]
jne 0x1401637e2
movzx eax, byte [rbp + 7]
cmp al, byte [rbp + 0x17]
jne 0x1401637e2
mov rcx, r15
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x140163805