Function at 0x4215a0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Create tcp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4fb387
mov eax, dword fs:[0]
push eax
sub esp, 0x288
mov eax, dword [0x55a3d0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
mov eax, 0xd907
mov dword [ebp - 0x1d8], 0xd907
cmp bx, ax
jbe 0x4216b2
lea ecx, [ebp - 0x294]
push ecx
call fcn.00403200
lea edx, [ebp - 0x294]
push str.The_input_minimal_and_maximal_ports_are_reversed_with
xor edi, edi
push edx
mov dword [ebp - 4], edi
call fcn.00404d50
lea eax, [ebp - 0x294]
push str.minTcpPort_
push eax
call fcn.00404d50
add esp, 0x10
push ebx
lea ecx, [ebp - 0x294]
call fcn.00419090
lea ecx, [ebp - 0x294]
push str.__maxTcpPort_
push ecx
call fcn.00404d50
add esp, 8
push 0xd907
lea ecx, [ebp - 0x294]
call fcn.00419090
lea esi, [ebp - 0x30]
lea eax, [ebp - 0x294]
call fcn.00402e30
mov edx, esi
push edx
push 2
mov byte [ebp - 4], 1
call fcn.00423a40
add esp, 8
cmp dword [ebp - 0x1c], 8
jb 0x421680
mov eax, dword [ebp - 0x30]
push eax
call fcn.004b5907
add esp, 4
xor ecx, ecx
mov word [ebp - 0x30], cx
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], 0xffffffff
call fcn.00401690
movzx edx, bx
mov ebx, 0xd907
mov dword [ebp - 0x1d8], edx
jmp 0x4216b4
xor edi, edi
lea eax, [ebp - 0x1d4]
push eax
push 2
mov dword [ebp - 0x1e0], edi
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov esi, eax
cmp esi, edi
je 0x421760
lea ecx, [ebp - 0x294]
push ecx
call fcn.00403200
lea edx, [ebp - 0x294]
push str.WinSock_init_failure_with_error:
push edx
mov dword [ebp - 4], 2
call fcn.00404d50
add esp, 8
push esi
lea ecx, [ebp - 0x294]
call fcn.00422780
lea esi, [ebp - 0x30]
lea eax, [ebp - 0x294]
call fcn.00402e30
mov eax, esi
push eax
push 1
mov byte [ebp - 4], 3
call fcn.00423a40
add esp, 8
cmp dword [ebp - 0x1c], 8
jb 0x421737
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.004b5907
add esp, 4
xor edx, edx
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], edi
mov word [ebp - 0x30], dx
mov dword [ebp - 4], 0xffffffff
call fcn.00401690
xor eax, eax
jmp 0x421a50
push 6
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov esi, eax
mov dword [ebp - 0x1dc], esi
cmp esi, 0xffffffff
jne 0x421818
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov esi, eax
lea eax, [ebp - 0x294]
push eax
call fcn.00403200
lea ecx, [ebp - 0x294]
push str.socket___failed_with_error:
push ecx
mov dword [ebp - 4], 4
call fcn.00404d50
add esp, 8
push esi
lea ecx, [ebp - 0x294]
call fcn.00422780
lea esi, [ebp - 0x30]
lea eax, [ebp - 0x294]
call fcn.00402e30
mov edx, esi
push edx
push 1
mov byte [ebp - 4], 5
call fcn.00423a40
add esp, 8
cmp dword [ebp - 0x1c], 8
jb 0x4217e9
mov eax, dword [ebp - 0x30]
push eax
call fcn.004b5907
add esp, 4
xor ecx, ecx
mov word [ebp - 0x30], cx
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], edi
mov dword [ebp - 4], 0xffffffff
call fcn.00401690
call dword [sym.imp.WS2_32.dll_WSACleanup]
xor eax, eax
jmp 0x421a50
lea edx, [ebp - 0x1f8]
push edx
call fcn.00418ba0
add esp, 4
mov eax, 2
mov dword [ebp - 4], 6
push str.127.0.0.1
mov word [ebp - 0x40], ax
call dword [sym.imp.WS2_32.dll_inet_addr]
movzx edi, bx
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x1e4], edi
cmp bx, word [ebp - 0x1d8]
ja 0x421a12
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
lea ecx, [ebp - 0x1e4]
push ecx
lea eax, [ebp - 0x1e8]
lea ecx, [ebp - 0x1f8]
call fcn.00419f90
mov edx, dword [eax]
cmp edx, dword [ebp - 0x1f4]
jne 0x42194f
push edi
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x3e], ax
push 0x10
lea eax, [ebp - 0x40]
push eax
push esi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
je 0x421968
lea ecx, [ebp - 0x294]
push ecx
call fcn.00403200
lea edx, [ebp - 0x294]
push str.TCP_port
push edx
mov byte [ebp - 4], 9
call fcn.00404d50
add esp, 8
push edi
lea ecx, [ebp - 0x294]
call fcn.00419090
lea eax, [ebp - 0x294]
push str._is_already_open_thus_unavailable.
push eax
call fcn.00404d50
add esp, 8
lea esi, [ebp - 0x30]
lea eax, [ebp - 0x294]
call fcn.00402e30
mov ecx, esi
push ecx
push 4
mov byte [ebp - 4], 0xa
call fcn.00423a40
add esp, 8
cmp dword [ebp - 0x1c], 8
jb 0x42191d
mov edx, dword [ebp - 0x30]
push edx
call fcn.004b5907
add esp, 4
xor eax, eax
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], 0
mov word [ebp - 0x30], ax
mov byte [ebp - 4], 6
call fcn.00401690
mov ecx, dword [ebp - 0x1dc]
push ecx
call ebx
mov esi, dword [ebp - 0x1dc]
inc edi
mov dword [ebp - 0x1e4], edi
cmp di, word [ebp - 0x1d8]
jbe 0x421861
jmp 0x421a12
lea edx, [ebp - 0x294]
push edx
call fcn.00403200
lea eax, [ebp - 0x294]
push str.Port
push eax
mov byte [ebp - 4], 7
call fcn.00404d50
add esp, 8
push edi
lea ecx, [ebp - 0x294]
call fcn.00419090
lea ecx, [ebp - 0x294]
push str._is_available
push ecx
call fcn.00404d50
add esp, 8
lea esi, [ebp - 0x30]
lea eax, [ebp - 0x294]
call fcn.00402e30
mov edx, esi
push edx
push 4
mov byte [ebp - 4], 8
call fcn.00423a40
add esp, 8
cmp dword [ebp - 0x1c], 8
jb 0x4219dd
mov eax, dword [ebp - 0x30]
push eax
call fcn.004b5907
add esp, 4
xor ecx, ecx
mov word [ebp - 0x30], cx
lea ecx, [ebp - 0x294]
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], 0
mov byte [ebp - 4], 6
call fcn.00401690
mov edx, dword [ebp - 0x1dc]
push edx
call ebx
movzx eax, di
mov dword [ebp - 0x1e0], eax
call dword [sym.imp.WS2_32.dll_WSACleanup]
mov dword [ebp - 4], 0xb
mov eax, dword [ebp - 0x1f4]
mov ecx, dword [eax]
push eax
push ecx
lea esi, [ebp - 0x1e8]
lea eax, [ebp - 0x1f8]
call fcn.0041a6f0
mov ecx, dword [ebp - 0x1f4]
push ecx
call fcn.004b5907
mov ax, word [ebp - 0x1e0]
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004b58f8
mov esp, ebp
pop ebp
ret