Function at 0x40fd84
Capabilities:
Create tcp socket
Create udp socket
Initialize winsock library

Disassembly:
push ebp
mov ebp, esp
mov ecx, 0x43
push 0
push 0
dec ecx
jne 0x40fd8c
push ebx
push esi
push edi
mov dword [ebp - 8], eax
mov ebx, 0x41db94
mov esi, 0x41db54
mov edi, 0x41db24
xor eax, eax
push ebp
push 0x410351
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, esi
mov edx, 0x41036c
call fcn.00403770
call fcn.00412790
cmp byte [0x41c294], 0
jne 0x40fdf1
lea eax, [ebp - 0x1b4]
mov ecx, dword [0x41dbd0]
mov edx, 0x4103a4
call fcn.004038e0
mov eax, dword [ebp - 0x1b4]
call fcn.0041a4a8
mov byte [ebp - 9], 0
lea eax, [ebp - 0x1a0]
push eax
push 0x101
call sub.wsock32.dll_WSAStartup
mov eax, esi
mov edx, 0x4103b4
call fcn.00403770
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 [0x41dbc0]
call fcn.00406170
mov edx, dword [ebp - 0x1b8]
mov eax, 0x41dbc4
call fcn.00403770
mov eax, esi
mov edx, 0x4103cc
call fcn.00403770
mov eax, dword [0x41dbc4]
call fcn.00403894
cmp eax, 5
jge 0x40feb5
push 0x4103fc
push dword [0x41dbc0]
push 0x410410
lea edx, [ebp - 0x1c0]
xor eax, eax
call fcn.004062c0
push dword [ebp - 0x1c0]
lea eax, [ebp - 0x1bc]
mov edx, 4
call fcn.00403954
mov eax, dword [ebp - 0x1bc]
call fcn.0041a4a8
jmp 0x41032b
mov eax, dword [0x41dbc4]
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
mov eax, dword [0x41c330]
mov eax, dword [eax]
call eax
mov dword [ebx], eax
cmp dword [ebx], 0xffffffff
jne 0x40ff23
lea edx, [ebp - 0x1c8]
xor eax, eax
call fcn.004062c0
mov ecx, dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
mov edx, 0x41041c
call fcn.004038e0
mov eax, dword [ebp - 0x1c4]
call fcn.0041a4a8
lea eax, [ebp - 4]
call fcn.004062b0
jmp 0x41032b
mov eax, esi
mov edx, 0x41042c
call fcn.00403770
push ebp
lea eax, [ebp - 0x1cc]
push eax
xor ecx, ecx
mov dl, 1
xor eax, eax
call fcn.0040f7b8
pop ecx
push ebp
lea eax, [ebp - 0x1d0]
push eax
lea eax, [ebp - 0x1d4]
mov ecx, dword [0x41dbc4]
mov edx, 0x4104a8
call fcn.004038e0
mov eax, dword [ebp - 0x1d4]
mov ecx, 0x4104b8
mov dl, 1
call fcn.0040f7b8
pop ecx
mov eax, dword [ebp - 0x1d0]
mov edx, 0x4104c4
call fcn.004039e0
je 0x41032b
mov eax, esi
mov edx, 0x4104d0
call fcn.00403770
push ebp
lea eax, [ebp - 0x1d8]
push eax
mov ecx, 0x41055c
mov dl, 1
mov eax, 0x410568
call fcn.0040f7b8
pop ecx
mov eax, dword [ebp - 0x1d8]
mov edx, 0x4104c4
call fcn.004039e0
je 0x41032b
mov eax, esi
mov edx, 0x41057c
call fcn.00403770
push ebp
lea eax, [ebp - 0x1dc]
push eax
mov ecx, 0x4105ec
mov dl, 1
mov eax, dword [0x41dbcc]
call fcn.0040f7b8
pop ecx
mov eax, dword [ebp - 0x1dc]
mov edx, 0x4104c4
call fcn.004039e0
je 0x41032b
mov eax, esi
mov edx, 0x4105f8
call fcn.00403770
lea eax, [ebp - 0x10]
mov edx, 0x410678
call fcn.004037b4
mov eax, esi
mov edx, 0x410688
call fcn.00403770
push ebp
lea eax, [ebp - 0x1e0]
push eax
push 0x410734
push dword [ebp - 0x10]
push dword [0x41dbd0]
lea eax, [ebp - 0x1e4]
mov edx, 3
call fcn.00403954
mov eax, dword [ebp - 0x1e4]
mov ecx, 0x4104b8
mov dl, 1
call fcn.0040f7b8
pop ecx
mov eax, dword [ebp - 0x1e0]
mov edx, 0x4104c4
call fcn.004039e0
je 0x41032b
push ebp
lea eax, [ebp - 0x1e8]
push eax
lea eax, [ebp - 0x1ec]
mov ecx, dword [0x41db2c]
mov edx, 0x410744
call fcn.004038e0
mov eax, dword [ebp - 0x1ec]
mov ecx, 0x4104b8
mov dl, 1
call fcn.0040f7b8
pop ecx
mov eax, esi
mov edx, 0x410758
call fcn.00403770
push ebp
lea eax, [ebp - 0x1f0]
push eax
lea eax, [ebp - 0x1f4]
mov ecx, dword [0x41db34]
mov edx, 0x410744
call fcn.004038e0
mov eax, dword [ebp - 0x1f4]
mov ecx, 0x4104b8
mov dl, 1
call fcn.0040f7b8
pop ecx
mov eax, dword [ebp - 0x1f0]
mov edx, 0x4104c4
call fcn.004039e0
je 0x41032b
push ebp
lea eax, [ebp - 0x1f8]
push eax
mov ecx, 0x4107d0
mov dl, 1
mov eax, 0x4107dc
call fcn.0040f7b8
pop ecx
mov eax, dword [ebp - 0x1f8]
mov edx, 0x4104c4
call fcn.004039e0
je 0x41032b
mov eax, esi
mov edx, 0x4107ec
call fcn.00403770
push 0x410888
lea edx, [ebp - 0x1fc]
mov eax, 0x97
call fcn.00405338
push dword [ebp - 0x1fc]
push 0x410410
push dword [0x41db38]
push 0x410410
lea edx, [ebp - 0x200]
mov eax, dword [ebp - 8]
call fcn.0040f288
push dword [ebp - 0x200]
lea eax, [ebp - 0x10]
mov edx, 6
call fcn.00403954
mov eax, dword [ebp - 0x10]
call fcn.00403894
mov dword [0x41db90], eax
mov dword [ebx], 1
mov eax, esi
mov edx, 0x410898
call fcn.00403770
mov eax, edi
mov edx, 0x4c
call fcn.00403bc4
jmp 0x4101e7
lea eax, [ebp - 0x10]
call fcn.00403aec
mov edx, dword [ebx]
lea eax, [eax + edx - 1]
push eax
mov eax, edi
call fcn.00403aec
mov ecx, 0x4c
pop edx
call fcn.0040492c
push ebp
lea eax, [ebp - 0x204]
push eax
xor ecx, ecx
xor edx, edx
mov eax, dword [edi]
call fcn.0040f7b8
pop ecx
add dword [ebx], 0x4c
mov eax, dword [0x41db90]
sub eax, 0x4c
cmp eax, dword [ebx]
jge 0x4101af
mov eax, esi
mov edx, 0x4108bc
call fcn.00403770
mov eax, dword [0x41db90]
sub eax, dword [ebx]
inc eax
mov dword [0x41db90], eax
mov eax, esi
mov edx, 0x41097c
call fcn.00403770
mov eax, edi
mov edx, dword [0x41db90]
call fcn.00403bc4
mov eax, edi
call fcn.00403aec
mov ecx, 0x2b
mov edx, dword [0x41db90]
call fcn.00402bd8
lea eax, [ebp - 0x10]
call fcn.00403aec
mov edx, dword [ebx]
lea eax, [eax + edx - 1]
push eax
mov eax, edi
call fcn.00403aec
mov ecx, dword [0x41db90]
pop edx
call fcn.0040492c
push ebp
lea eax, [ebp - 0x208]
push eax
xor ecx, ecx
xor edx, edx
mov eax, dword [edi]
call fcn.0040f7b8
pop ecx
push ebp
lea eax, [ebp - 0x20c]
push eax
mov ecx, 0x4104b8
mov dl, 1
mov eax, 0x410a04
call fcn.0040f7b8
pop ecx
mov edx, dword [ebp - 0x20c]
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 - 0x210]
push eax
mov ecx, 0x4104b8
mov dl, 1
mov eax, 0x410a10
call fcn.0040f7b8
pop ecx
push ebp
lea eax, [ebp - 0x214]
push eax
mov ecx, 0x410a20
mov dl, 1
mov eax, 0x410a2c
call fcn.0040f7b8
pop ecx
lea eax, [ebp - 4]
call fcn.004062b0
mov eax, dword [ebp - 0x10]
mov edx, 0x4104b8
call fcn.004039e0
jne 0x41032b
mov byte [ebp - 9], 1
cmp byte [0x41c294], 0
jne 0x410326
lea eax, [ebp - 0x218]
mov ecx, dword [0x41db2c]
mov edx, 0x410a3c
call fcn.004038e0
mov eax, dword [ebp - 0x218]
call fcn.0041a4a8
call fcn.0040c048
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x410358
lea eax, [ebp - 0x218]
mov edx, 0x1a
call fcn.00403740
lea eax, [ebp - 0x10]
call fcn.0040371c
ret