Function at 0x465090
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46b74e
mov eax, dword fs:[0]
push eax
sub esp, 0x1b0
mov eax, dword [0x487274]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
push 0
push 1
push 2
mov dword [ebp - 0x50], esi
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x4652df
mov eax, 2
push esi
mov word [ebp - 0x20], ax
call dword [sym.imp.WS2_32.dll_htons]
cmp dword [ebx + 0x14], 0x10
xorps xmm0, xmm0
mov word [ebp - 0x1e], ax
mov esi, ebx
movq qword [ebp - 0x18], xmm0
jb 0x465104
mov esi, dword [ebx]
mov ecx, esi
movzx eax, ax
mov dword [ebp - 0x48], 0x10
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x40], 0
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x465120
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x44], eax
add eax, eax
push eax
call fcn.0044f3ce
add esp, 4
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x465281
push 0xffffffffffffffff
push esi
push dword [ebp - 0x44]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00459fb4
add esp, 0x14
lea ecx, [esi + 1]
nop dword [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x465160
sub esi, ecx
lea eax, [esi + 1]
cmp dword [ebp - 0x40], eax
jne 0x465281
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x20]
push eax
push 0
push 2
push dword [ebp - 0x4c]
call dword [sym.imp.WS2_32.dll_WSAStringToAddressW]
mov ecx, dword [ebp - 0x3c]
neg eax
mov word [ebp - 0x1e], cx
sbb eax, eax
neg eax
sub eax, 1
je 0x465281
push 0x10
lea eax, [ebp - 0x20]
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x3c], eax
test esi, esi
jns 0x465251
push edi
call fcn.00465080
add esp, 4
lea ecx, [ebp - 0x1bc]
push 1
call fcn.0040a530
push 0x46c598
push dword [ebp - 0x3c]
lea eax, [ebp - 0x1ac]
mov dword [ebp - 4], 4
push str.._lastError__:
push dword [ebp - 0x50]
push 0x46e4f4
push ebx
push str.Failed_to_connect_to
push eax
call fcn.00401400
add esp, 8
push eax
call fcn.004054e0
add esp, 8
push eax
call fcn.00401400
add esp, 8
mov ecx, eax
call fcn.00402830
push eax
call fcn.00401400
add esp, 8
mov ecx, eax
call fcn.00402830
push eax
call fcn.00401400
add esp, 8
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x1bc]
push eax
call fcn.004123d0
mov byte [ebp - 4], 5
jmp 0x465355
push 4
call fcn.0042cef6
add esp, 4
test eax, eax
je 0x46527d
mov dword [eax], edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042cf39
mov esp, ebp
pop ebp
ret
xor eax, eax
jmp 0x465261
push edi
call fcn.00465080
add esp, 4
lea ecx, [ebp - 0x10c]
push 1
call fcn.0040a530
push str._is_an_invalid_IP.
push ebx
lea eax, [ebp - 0xfc]
mov dword [ebp - 4], 2
push 0x46d4e4
push eax
call fcn.00401400
add esp, 8
push eax
call fcn.004054e0
add esp, 8
push eax
call fcn.00401400
add esp, 8
lea eax, [ebp - 0x38]
lea ecx, [ebp - 0x10c]
push eax
call fcn.004123d0
mov byte [ebp - 4], 3
jmp 0x465355
push 1
lea ecx, [ebp - 0x10c]
call fcn.0040a530
mov dword [ebp - 4], 0
call sub.WS2_32.dll_WSAGetLastError
push eax
push str.._Error_code:
push esi
push 0x46e4f4
push ebx
lea eax, [ebp - 0xfc]
push str.Could_not_create_socket_when_connecting_to
push eax
call fcn.00401400
add esp, 8
push eax
call fcn.004054e0
add esp, 8
push eax
call fcn.00401400
add esp, 8
mov ecx, eax
call fcn.00402830
push eax
call fcn.00401400
add esp, 8
mov ecx, eax
call fcn.00402830
lea eax, [ebp - 0x38]
push eax
lea ecx, [ebp - 0x10c]
call fcn.004123d0
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x5c]
call fcn.0040f3b0
push 0x4815f0
lea eax, [ebp - 0x5c]
push eax
call fcn.00443f23
int3