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

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x42
push 0
push 0
dec ecx
jne 0x40e424
push ecx
push ebx
push esi
push edi
mov dword [ebp - 8], eax
mov ebx, 0x41ab50
mov esi, 0x41aae4
mov edi, 0x41ab4c
xor eax, eax
push ebp
push 0x40e957
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.0041053c
cmp byte [0x4191ec], 0
jne 0x40e47e
lea eax, [ebp - 0x1b4]
mov ecx, dword [0x41ab88]
mov edx, 0x40e970
call fcn.004038e0
mov eax, dword [ebp - 0x1b4]
call fcn.004176d4
mov byte [ebp - 9], 0
lea eax, [ebp - 0x1a0]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
push 0
push 1
push 2
call sub.wsock32.dll_socket
mov dword [ebp - 4], eax
mov word [ebp - 0x1b0], 2
push 0x19
call sub.wsock32.dll_htons
mov word [ebp - 0x1ae], ax
lea edx, [ebp - 0x1b8]
mov eax, dword [0x41ab7c]
call fcn.00406108
mov edx, dword [ebp - 0x1b8]
mov eax, 0x41ab80
call fcn.00403770
mov eax, dword [0x41ab80]
call fcn.00403894
cmp eax, 5
jge 0x40e52a
push 0x40e980
push dword [0x41ab7c]
push 0x40e994
lea edx, [ebp - 0x1c0]
xor eax, eax
call fcn.00406240
push dword [ebp - 0x1c0]
lea eax, [ebp - 0x1bc]
mov edx, 4
call fcn.00403954
mov eax, dword [ebp - 0x1bc]
call fcn.004176d4
jmp 0x40e931
mov eax, dword [0x41ab80]
call fcn.00403a94
push eax
call sub.wsock32.dll_inet_addr
mov dword [ebp - 0x1ac], eax
push 0x10
lea eax, [ebp - 0x1b0]
push eax
mov eax, dword [ebp - 4]
push eax
call sub.wsock32.dll_connect
mov dword [ebx], eax
cmp dword [ebx], 0xffffffff
jne 0x40e594
lea edx, [ebp - 0x1c8]
xor eax, eax
call fcn.00406240
mov ecx, dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
mov edx, 0x40e9a0
call fcn.004038e0
mov eax, dword [ebp - 0x1c4]
call fcn.004176d4
lea eax, [ebp - 4]
call fcn.00406230
jmp 0x40e931
mov eax, 0x41ab14
mov edx, 0x40e9b0
call fcn.00403770
push ebp
lea eax, [ebp - 0x1cc]
push eax
xor ecx, ecx
mov dl, 1
xor eax, eax
call fcn.0040e074
pop ecx
push ebp
lea eax, [ebp - 0x1d0]
push eax
mov ecx, 0x40ea70
mov dl, 1
mov eax, 0x40ea7c
call fcn.0040e074
pop ecx
mov eax, dword [ebp - 0x1d0]
mov edx, 0x40ea94
call fcn.004039e0
je 0x40e931
push ebp
lea eax, [ebp - 0x1d4]
push eax
mov ecx, 0x40eaa0
mov dl, 1
mov eax, 0x40eaac
call fcn.0040e074
pop ecx
mov eax, dword [ebp - 0x1d4]
mov edx, 0x40ea94
call fcn.004039e0
je 0x40e931
push ebp
lea eax, [ebp - 0x1d8]
push eax
mov ecx, 0x40eac0
mov dl, 1
mov eax, dword [0x41ab84]
call fcn.0040e074
pop ecx
mov eax, dword [ebp - 0x1d8]
mov edx, 0x40ea94
call fcn.004039e0
je 0x40e931
lea eax, [ebp - 0x10]
mov edx, 0x40eacc
call fcn.004037b4
push ebp
lea eax, [ebp - 0x1dc]
push eax
push 0x40eadc
push dword [ebp - 0x10]
push dword [0x41ab88]
lea eax, [ebp - 0x1e0]
mov edx, 3
call fcn.00403954
mov eax, dword [ebp - 0x1e0]
mov ecx, 0x40ea70
mov dl, 1
call fcn.0040e074
pop ecx
mov eax, dword [ebp - 0x1dc]
mov edx, 0x40ea94
call fcn.004039e0
je 0x40e931
push ebp
lea eax, [ebp - 0x1e4]
push eax
lea eax, [ebp - 0x1e8]
mov ecx, dword [0x41aaec]
mov edx, 0x40eaec
call fcn.004038e0
mov eax, dword [ebp - 0x1e8]
mov ecx, 0x40ea70
mov dl, 1
call fcn.0040e074
pop ecx
push ebp
lea eax, [ebp - 0x1ec]
push eax
lea eax, [ebp - 0x1f0]
mov ecx, dword [0x41aaf4]
mov edx, 0x40eaec
call fcn.004038e0
mov eax, dword [ebp - 0x1f0]
mov ecx, 0x40ea70
mov dl, 1
call fcn.0040e074
pop ecx
mov eax, dword [ebp - 0x1ec]
mov edx, 0x40ea94
call fcn.004039e0
je 0x40e931
push ebp
lea eax, [ebp - 0x1f4]
push eax
mov ecx, 0x40eb00
mov dl, 1
mov eax, 0x40eb0c
call fcn.0040e074
pop ecx
mov eax, dword [ebp - 0x1f4]
mov edx, 0x40ea94
call fcn.004039e0
je 0x40e931
push 0x40eb1c
lea edx, [ebp - 0x1f8]
mov eax, 0x8b
call fcn.00405350
push dword [ebp - 0x1f8]
push 0x40e994
push dword [0x41aaf8]
push 0x40e994
lea edx, [ebp - 0x1fc]
mov eax, dword [ebp - 8]
call fcn.0040de10
push dword [ebp - 0x1fc]
lea eax, [ebp - 0x10]
mov edx, 6
call fcn.00403954
mov eax, dword [ebp - 0x10]
call fcn.00403894
mov dword [edi], eax
mov dword [ebx], 1
mov eax, 0x41ab14
mov edx, 0x40eb2c
call fcn.00403770
mov eax, esi
mov edx, 0x4c
call fcn.00403bc4
jmp 0x40e7fc
lea eax, [ebp - 0x10]
call fcn.00403aec
mov edx, dword [ebx]
lea eax, [eax + edx - 1]
push eax
mov eax, esi
call fcn.00403aec
mov ecx, 0x4c
pop edx
call fcn.0040493c
push ebp
lea eax, [ebp - 0x200]
push eax
xor ecx, ecx
xor edx, edx
mov eax, dword [esi]
call fcn.0040e074
pop ecx
add dword [ebx], 0x4c
mov eax, dword [edi]
sub eax, 0x4c
cmp eax, dword [ebx]
jge 0x40e7c4
mov eax, 0x41ab14
mov edx, 0x40ebb8
call fcn.00403770
mov eax, dword [edi]
sub eax, dword [ebx]
inc eax
mov dword [edi], eax
mov eax, esi
mov edx, dword [edi]
call fcn.00403bc4
mov eax, esi
call fcn.00403aec
mov ecx, 0x2b
mov edx, dword [edi]
call fcn.00402bd8
lea eax, [ebp - 0x10]
call fcn.00403aec
mov edx, dword [ebx]
lea eax, [eax + edx - 1]
push eax
mov eax, esi
call fcn.00403aec
mov ecx, dword [edi]
pop edx
call fcn.0040493c
push ebp
lea eax, [ebp - 0x204]
push eax
xor ecx, ecx
xor edx, edx
mov eax, dword [esi]
call fcn.0040e074
pop ecx
push ebp
lea eax, [ebp - 0x208]
push eax
mov ecx, 0x40ea70
mov dl, 1
mov eax, 0x40ec2c
call fcn.0040e074
pop ecx
mov edx, dword [ebp - 0x208]
lea eax, [ebp - 0x10]
call fcn.004037b4
lea eax, [ebp - 0x10]
push eax
mov ecx, 3
xor edx, edx
mov eax, dword [ebp - 0x10]
call fcn.00403af4
push ebp
lea eax, [ebp - 0x20c]
push eax
mov ecx, 0x40ea70
mov dl, 1
mov eax, 0x40ec38
call fcn.0040e074
pop ecx
push ebp
lea eax, [ebp - 0x210]
push eax
mov ecx, 0x40ec48
mov dl, 1
mov eax, 0x40ec54
call fcn.0040e074
pop ecx
lea eax, [ebp - 4]
call fcn.00406230
mov eax, dword [ebp - 0x10]
mov edx, 0x40ea70
call fcn.004039e0
jne 0x40e931
mov eax, 0x41ab14
mov edx, 0x40ec64
call fcn.00403770
mov byte [ebp - 9], 1
cmp byte [0x4191ec], 0
jne 0x40e92c
lea eax, [ebp - 0x214]
mov ecx, dword [0x41aaec]
mov edx, 0x40ed34
call fcn.004038e0
mov eax, dword [ebp - 0x214]
call fcn.004176d4
call fcn.0040abc4
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x40e95e
lea eax, [ebp - 0x214]
mov edx, 0x19
call fcn.00403740
lea eax, [ebp - 0x10]
call fcn.0040371c
ret