Function at 0x40e5d0
Capabilities:
Act as tcp client
Connect socket
Connect tcp socket
Connect udp socket
Create tcp socket
Create udp socket
Get local ipv4 addresses
Get socket information
Initialize winsock library

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4b466b
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x218
mov eax, dword [0x4e5070]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x218], esi
cmp dword [0x4e9190], 0
mov dword [ebp - 0x224], 0
je 0x40e650
push 0xffffffffffffffff
push 0
mov dword [esi + 0x14], 0xf
mov dword [esi + 0x10], 0
push 0x4e9180
mov byte [esi], 0
call fcn.00403b90
jmp 0x40e858
lea eax, [ebp - 0x1f8]
push eax
push 0x102
call dword [sym.imp.WS2_32.dll_WSAStartup]
mov dword [ebp - 0x200], 0
mov dword [ebp - 0x1fc], 0
call fcn.0040f160
mov dword [ebp - 0x200], eax
xorps xmm0, xmm0
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x200]
movlpd qword [ebp - 0x210], xmm0
call fcn.0040ec60
mov edx, dword [ebp - 0x1fc]
test edx, edx
je 0x40e78c
mov eax, dword [ebp - 0x200]
mov eax, dword [eax]
mov ecx, dword [eax + 0x18]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x210], ecx
mov dword [ebp - 0x20c], eax
cmp edx, 1
je 0x40e78c
push 0
push 1
push 2
call dword [sym.imp.WS2_32.dll_socket]
mov edi, eax
cmp edi, 0xffffffff
je 0x40e78c
xorps xmm0, xmm0
mov eax, 2
movups xmmword [ebp - 0x68], xmm0
push 0x50
mov word [ebp - 0x68], ax
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x66], ax
call fcn.0040ed50
mov dword [ebp - 0x214], eax
test eax, eax
je 0x40e78c
mov dword [ebp - 0x64], eax
lea eax, [ebp - 0x68]
push 0x10
push eax
push edi
call dword [sym.imp.WS2_32.dll_connect]
cmp eax, 0xffffffff
jne 0x40e72f
push edi
call dword [sym.imp.WS2_32.dll_closesocket]
jmp 0x40e78c
lea eax, [ebp - 0x218]
mov dword [ebp - 0x218], 0x10
push eax
lea eax, [ebp - 0x68]
push eax
push edi
call dword [sym.imp.WS2_32.dll_getsockname]
mov eax, dword [ebp - 0x64]
push edi
mov dword [ebp - 0x214], eax
call dword [sym.imp.WS2_32.dll_closesocket]
lea eax, [ebp - 0x214]
push eax
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x200]
call fcn.0040f1f0
mov ecx, dword [ebp - 0x220]
mov eax, dword [ecx + 0x18]
mov dword [ebp - 0x210], eax
mov eax, dword [ecx + 0x1c]
mov dword [ebp - 0x20c], eax
push 0x40
lea eax, [ebp - 0x58]
push 0
push eax
call fcn.00498020
movzx eax, byte [ebp - 0x20b]
add esp, 0xc
push eax
movzx eax, byte [ebp - 0x20c]
push eax
movzx eax, byte [ebp - 0x20d]
push eax
movzx eax, byte [ebp - 0x20e]
push eax
movzx eax, byte [ebp - 0x20f]
push eax
movzx eax, byte [ebp - 0x210]
push eax
push str._02X__02X__02X__02X__02X__02X
lea eax, [ebp - 0x58]
push 0x40
push eax
call fcn.004064d0
add esp, 0x24
cmp byte [ebp - 0x58], 0
jne 0x40e7e9
xor ecx, ecx
jmp 0x40e7f9
lea ecx, [ebp - 0x58]
lea edx, [ecx + 1]
nop
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40e7f0
sub ecx, edx
push ecx
lea eax, [ebp - 0x58]
mov ecx, 0x4e9180
push eax
call fcn.00403a90
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0xffffffffffffffff
push 0
mov dword [esi + 0x14], 0xf
mov ecx, esi
mov dword [esi + 0x10], 0
push 0x4e9180
mov byte [esi], 0
call fcn.00403b90
mov eax, dword [ebp - 0x200]
lea ecx, [ebp - 0x200]
push eax
push dword [eax]
lea eax, [ebp - 0x21c]
push eax
call fcn.0040edc0
push dword [ebp - 0x200]
call fcn.004933ce
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00493122
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret