Function at 0x14005d8e0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Get socket status
Receive data
Receive data on socket
Resolve function by parsing pe exports
Send data
Send data on socket
Set socket configuration

Disassembly:
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
mov eax, 0x12e8
call fcn.14004c200
sub rsp, rax
mov rax, qword [0x1400cc400]
xor rax, rsp
mov qword [rsp + 0x12d0], rax
mov rax, qword [rsp + 0x1308]
cmp dword [rax + 0x24], 0
je 0x14005d93f
call qword [sym.imp.KERNEL32.dll_GetTickCount]
mov rcx, qword [rsp + 0x1308]
cmp dword [rcx + 0x24], eax
jae 0x14005d93f
lea rcx, str.connect_timeout
call fcn.14005d740
xor ecx, ecx
call fcn.14008bb68
mov cx, 0x209
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x88], ax
mov cx, 0x18
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x8a], ax
lea rax, [rsp + 0x8c]
mov rcx, qword [rsp + 0x1308]
mov rdi, rax
lea rsi, [rcx + 0x10]
mov ecx, reloc.WS2_32.dll_recv
rep movsb byte [rdi], byte [rsi]
mov rax, qword [rsp + 0x1308]
movzx eax, word [rax + 0x20]
mov word [rsp + 0x9c], ax
mov eax, 2
mov word [rsp + 0x78], ax
mov cx, 0x3039
call qword [sym.imp.WS2_32.dll_htons]
mov word [rsp + 0x7a], ax
mov byte [rsp + 0x2d0], 0
lea rax, [rsp + 0x2d1]
mov rdi, rax
xor eax, eax
mov ecx, 0xfff
rep stosb byte [rdi], al
mov dword [rsp + 0x70], 2
mov dword [rsp + 0x74], 0
mov dword [rsp + 0x60], 0xffffffff
mov dword [rsp + 0x40], 0
jmp 0x14005da01
mov eax, dword [rsp + 0x40]
inc eax
mov dword [rsp + 0x40], eax
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rsp + 0x1300]
movzx eax, byte [rax + 0x82]
cmp dword [rsp + 0x40], eax
jge 0x14005ddff
mov rax, qword [rsp + 0x1300]
movzx eax, byte [rax + 0x81]
add eax, dword [rsp + 0x40]
mov dword [rsp + 0x3c], eax
mov rax, qword [rsp + 0x1300]
movzx eax, byte [rax + 0x82]
cmp eax, dword [rsp + 0x3c]
jg 0x14005da61
mov rax, qword [rsp + 0x1300]
movzx eax, byte [rax + 0x82]
mov ecx, dword [rsp + 0x3c]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x3c], eax
movsxd rax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x1300]
mov rcx, qword [rcx + 0x18]
cmp dword [rcx + rax*4], 0
jne 0x14005da7d
jmp 0x14005ddff
movsxd rax, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x1300]
mov rcx, qword [rcx + 0x18]
mov eax, dword [rcx + rax*4]
mov dword [rsp + 0x7c], eax
mov r8d, 6
mov edx, 1
mov ecx, 2
call qword [sym.imp.WS2_32.dll_socket]
mov qword [rsp + 0x30], rax
mov dword [rsp + 0x48], 1
lea r8, [rsp + 0x48]
mov edx, 0x8004667e
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [rsp + 0x44], 4
mov r8d, reloc.WS2_32.dll_recv
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x14005dbd8
mov dword [rsp + 0xc0], 0
mov dword [rsp + 0x38], 0
jmp 0x14005db13
mov eax, dword [rsp + 0x38]
inc eax
mov dword [rsp + 0x38], eax
mov eax, dword [rsp + 0xc0]
cmp dword [rsp + 0x38], eax
jae 0x14005db37
mov eax, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
cmp qword [rsp + rax*8 + 0xc8], rcx
jne 0x14005db35
jmp 0x14005db37
jmp 0x14005db09
mov eax, dword [rsp + 0xc0]
cmp dword [rsp + 0x38], eax
jne 0x14005db6f
cmp dword [rsp + 0xc0], 0x40
jae 0x14005db6f
mov eax, dword [rsp + 0x38]
mov rcx, qword [rsp + 0x30]
mov qword [rsp + rax*8 + 0xc8], rcx
mov eax, dword [rsp + 0xc0]
inc eax
mov dword [rsp + 0xc0], eax
xor eax, eax
test eax, eax
jne 0x14005daff
mov rax, qword [rsp + 0x30]
inc rax
lea rcx, [rsp + 0x70]
mov qword [rsp + 0x20], rcx
xor r9d, r9d
lea r8, [rsp + 0xc0]
xor edx, edx
mov ecx, eax
call qword [sym.imp.WS2_32.dll_select]
test eax, eax
jle 0x14005dbd3
lea rax, [rsp + 0x44]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x60]
mov r8d, 0x1007
mov edx, 0xffff
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_getsockopt]
cmp dword [rsp + 0x60], 0
je 0x14005dbd1
jmp 0x14005d9ec
jmp 0x14005dbd8
jmp 0x14005d9ec
mov dword [rsp + 0x48], 0
lea r8, [rsp + 0x48]
mov edx, 0x8004667e
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_ioctlsocket]
mov dword [rsp + 0x64], 0x7d0
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x64]
mov r8d, 0x1005
mov edx, 0xffff
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_setsockopt]
xor r9d, r9d
mov r8d, 0x18
lea rdx, [rsp + 0x88]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_send]
cdqe
cmp rax, 0x18
je 0x14005dc49
jmp 0x14005d9ec
mov dword [rsp + 0x20], 4
lea r9, [rsp + 0x64]
mov r8d, 0x1006
mov edx, 0xffff
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_setsockopt]
xor r9d, r9d
mov r8d, 0x1000
lea rdx, [rsp + 0x2d0]
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_recv]
mov dword [rsp + 0x44], eax
cmp dword [rsp + 0x44], 0
jg 0x14005dc98
jmp 0x14005d9ec
lea rax, [rsp + 0x2d0]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
movzx ecx, word [rax]
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0x50]
mov word [rcx], ax
mov rax, qword [rsp + 0x50]
movzx ecx, word [rax + 2]
call qword [sym.imp.WS2_32.dll_htons]
mov rcx, qword [rsp + 0x50]
mov word [rcx + 2], ax
mov rax, qword [rsp + 0x50]
movzx eax, word [rax + 2]
cmp eax, dword [rsp + 0x44]
je 0x14005dce7
jmp 0x14005d9ec
mov rax, qword [rsp + 0x50]
movzx eax, word [rax]
cmp eax, 0x1001
jne 0x14005ddfa
mov rax, qword [rsp + 0x50]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0x68]
add rax, 8
mov rcx, qword [rsp + 0x68]
movzx r8d, word [rcx + 0x1e]
mov rdx, rax
lea rcx, [rsp + 0xa0]
call fcn.14005d070
mov rax, qword [rsp + 0x1300]
add rax, 0x20
mov rcx, rax
call fcn.14005cff0
mov qword [rsp + 0x58], rax
jmp 0x14005dd5b
mov rax, qword [rsp + 0x1300]
add rax, 0x20
mov rdx, qword [rsp + 0x58]
mov rcx, rax
call fcn.14005d000
cmp qword [rsp + 0x58], 0
je 0x14005ddfa
mov edx, 8
mov rax, qword [rsp + 0x58]
mov rcx, qword [rax]
call qword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
je 0x14005dd8b
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
jmp 0x14005ddff
mov rax, qword [rsp + 0x58]
mov rax, qword [rax]
add rax, 0x10
lea rdx, [rsp + 0xa0]
mov rcx, rax
call fcn.14005d0b0
test eax, eax
je 0x14005ddf5
mov rcx, qword [rsp + 0x30]
call qword [sym.imp.WS2_32.dll_closesocket]
mov rax, qword [rsp + 0x58]
mov rdx, qword [rax]
mov rcx, qword [rsp + 0x1300]
call fcn.14005c4b0
mov rax, qword [rsp + 0x58]
mov rax, qword [rax]
mov rcx, qword [rsp + 0x58]
mov rcx, qword [rcx]
mov rax, qword [rax]
mov rdx, qword [rsp + 0x68]
movzx r8d, word [rdx + 0x1c]
mov rdx, qword [rsp + 0x68]
mov edx, dword [rdx + 0x18]
call qword [rax + reloc.WS2_32.dll_recv]
jmp 0x14005ddff
jmp 0x14005dd42
jmp 0x14005d9ec
mov rcx, qword [rsp + 0x12d0]
xor rcx, rsp
call fcn.14004c260
add rsp, 0x12e8
pop rdi
pop rsi
ret