Function at 0x140050c10
Capabilities:
Check for time delay via gettickcount
Check for time delay via queryperformancecounter
Connect 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

Disassembly:
push rbp
push rbx
push r12
push r15
lea rbp, [rsp - 0x3f]
sub rsp, 0xa8
mov rax, qword [0x14007c040]
xor rax, rsp
mov qword [rbp + 0x27], rax
mov edx, 1
mov dword [rbp - 0x21], reloc.WS2_32.dll_recv
mov ebx, 2
mov r12, r9
mov ecx, ebx
lea r8d, [rdx + 5]
call qword [sym.imp.WS2_32.dll_socket]
mov r15, rax
cmp rax, 0xffffffffffffffff
jne 0x140050c5f
jmp 0x140051015
mov qword [rsp + 0xd0], rsi
mov ecx, 0x7f000001
mov qword [rsp + 0xd8], rdi
xor edi, edi
mov qword [rsp + 0xe0], r13
mov qword [rbp - 0x11], rdi
mov qword [rsp + 0xa0], r14
mov word [rbp - 0x19], bx
call qword [sym.imp.WS2_32.dll_htonl]
lea r9, [rbp - 0x31]
mov word [rbp - 0x17], di
mov edx, 0xffff
mov dword [rbp - 0x15], eax
lea r8d, [rdi - 5]
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 0x140050fd2
lea r8d, [rdi + 0x10]
mov rcx, r15
lea rdx, [rbp - 0x19]
call qword [sym.imp.WS2_32.dll_bind]
cmp eax, 0xffffffff
je 0x140050fd2
lea r8, [rbp - 0x21]
mov rcx, r15
lea rdx, [rbp - 0x19]
call qword [sym.imp.WS2_32.dll_getsockname]
cmp eax, 0xffffffff
je 0x140050fd2
cmp dword [rbp - 0x21], 0x10
jl 0x140050fd2
lea edx, [rdi + 1]
mov rcx, r15
call qword [sym.imp.WS2_32.dll_listen]
cmp eax, 0xffffffff
je 0x140050fd2
xor r8d, r8d
lea edx, [rdi + 1]
mov ecx, ebx
call qword [sym.imp.WS2_32.dll_socket]
mov qword [r12], rax
cmp rax, 0xffffffffffffffff
je 0x140050fd2
lea r8d, [rdi + 0x10]
mov rcx, rax
lea rdx, [rbp - 0x19]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x140050fd2
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 0x140050fd2
lea edx, [rdi + 1]
mov qword [rbp - 9], r15
mov r8d, 0x3e8
mov dword [rbp - 1], 0x300
lea rcx, [rbp - 9]
call fcn.140047a60
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 0x140050fd2
cmp byte [0x14007eb28], dil
je 0x140050dfc
lea rcx, [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov r8, qword [0x14007eb20]
mov rax, qword [rbp - 0x29]
cqo
idiv r8
mov qword [rbp - 0x39], rax
mov rax, qword [rbp - 0x29]
cqo
idiv r8
imul rax, rdx, 0xf4240
cqo
idiv r8
jmp 0x140050e27
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 - 0x39], r9
sub r8d, ecx
imul eax, r8d, 0x3e8
mov r14d, 9
mov qword [rbp - 0x29], rax
mov esi, r14d
lea r13, [rbp + 0x17]
lea rdi, [rbp + 7]
nop dword [rax]
mov ebx, 4
cmp rsi, rbx
cmovb rbx, rsi
cmp byte [0x14007eadc], 0
jne 0x140050e7f
mov r9d, 2
mov dword [rbp - 0x31], 0
lea rdx, [rbp - 0x31]
xor ecx, ecx
lea r8d, [r9 + 2]
call qword [sym.imp.bcrypt.dll_BCryptGenRandom]
test eax, eax
jne 0x140050fd2
mov eax, dword [rbp - 0x31]
jmp 0x140050e97
imul eax, dword [0x14007eaf0], 0x41c64e6d
add eax, 0x3039
mov dword [0x14007eaf0], eax
ror eax, 0x10
test rbx, rbx
je 0x140050eae
sub rsi, rbx
nop
mov byte [rdi], al
inc rdi
shr eax, 8
sub rbx, 1
jne 0x140050ea0
test rsi, rsi
jne 0x140050e40
mov rcx, qword [r12]
lea rdx, [rbp + 7]
xor r9d, r9d
mov r8d, r14d
call qword [sym.imp.WS2_32.dll_send]
mov rdi, qword [rbp - 0x39]
mov rsi, qword [rbp - 0x29]
nop
mov rax, qword [r12 + 8]
lea rcx, [rbp - 9]
mov edx, 1
mov qword [rbp - 9], rax
mov r8d, 0x3e8
mov dword [rbp - 1], 0x300
call fcn.140047a60
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 0x14005102f
call qword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp byte [0x14007eb28], 0
mov ebx, eax
je 0x140050f55
lea rcx, [rbp - 0x29]
call qword [sym.imp.KERNEL32.dll_QueryPerformanceCounter]
mov rax, qword [rbp - 0x29]
cqo
idiv qword [0x14007eb20]
mov r9, rax
imul rax, rdx, 0xf4240
cqo
idiv qword [0x14007eb20]
mov rcx, rax
jmp 0x140050f7c
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 0x140050fd2
movabs rax, 0xffdf3b645a1cac09
cmp r9, rax
jle 0x140050fc6
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 0x140050fd2
cmp ebx, 0x2733
je 0x140050ed0
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 + 0x27]
xor rcx, rsp
call fcn.140065250
add rsp, 0xa8
pop r15
pop r12
pop rbx
pop rbp
ret
sub r14, rcx
je 0x14005103c
add r13, rcx
jmp 0x140050ed0
mov rax, qword [rbp + 7]
cmp rax, qword [rbp + 0x17]
jne 0x140050fd2
movzx eax, byte [rbp + 0xf]
cmp al, byte [rbp + 0x1f]
jne 0x140050fd2
mov rcx, r15
call qword [sym.imp.WS2_32.dll_closesocket]
xor eax, eax
jmp 0x140050ff5