Function at 0x40c7c4
Capabilities:
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 0x40c7cc
push ecx
mov dword [ebp - 8], eax
xor eax, eax
push ebp
push 0x40ce1b
push dword fs:[eax]
mov dword fs:[eax], esp
call fcn.00416310
add byte [eax + 0x41d2943d], al
add byte [eax], al
jne 0x40c814
lea eax, [ebp - 0x1b4]
mov ecx, dword [0x41ebc8]
mov edx, 0x40ce34
call fcn.004038f0
mov eax, dword [ebp - 0x1b4]
call fcn.00412764
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 [0x41ebb8]
call fcn.004062e0
mov edx, dword [ebp - 0x1b8]
mov eax, 0x41ebbc
call fcn.00403780
mov eax, 0x41eb54
mov edx, 0x40ce44
call fcn.00403780
mov eax, dword [0x41ebbc]
call fcn.004038a4
cmp eax, 5
jge 0x40c8cf
push 0x40cef8
push dword [0x41ebb8]
push 0x40cf0c
lea edx, [ebp - 0x1c0]
xor eax, eax
call fcn.00406434
push dword [ebp - 0x1c0]
lea eax, [ebp - 0x1bc]
mov edx, 4
call fcn.00403964
mov eax, dword [ebp - 0x1bc]
call fcn.00412764
jmp 0x40cdf5
invalid
add byte [eax], al
mov eax, dword [0x41ebbc]
call fcn.00403aa4
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 [0x41d338]
mov eax, dword [eax]
call eax
mov dword [0x41eb8c], eax
cmp dword [0x41eb8c], 0xffffffff
jne 0x40c944
lea edx, [ebp - 0x1c8]
xor eax, eax
call fcn.00406434
mov ecx, dword [ebp - 0x1c8]
lea eax, [ebp - 0x1c4]
mov edx, 0x40cf18
call fcn.004038f0
mov eax, dword [ebp - 0x1c4]
call fcn.00412764
lea eax, [ebp - 4]
call fcn.00406418
jmp 0x40cdf5
mov eax, 0x41eb54
mov edx, 0x40cf2c
call fcn.00403780
push ebp
lea eax, [ebp - 0x1cc]
push eax
xor ecx, ecx
mov dl, 1
xor eax, eax
call fcn.0040c260
pop ecx
push ebp
lea eax, [ebp - 0x1d0]
push eax
lea eax, [ebp - 0x1d4]
mov ecx, dword [0x41ebbc]
mov edx, dword [0x41edbc]
call fcn.004038f0
mov eax, dword [ebp - 0x1d4]
mov ecx, 0x40cfc8
mov dl, 1
call fcn.0040c260
pop ecx
mov eax, dword [ebp - 0x1d0]
mov edx, 0x40cfd4
call fcn.004039f0
je 0x40cdf5
push ebp
lea eax, [ebp - 0x1d8]
push eax
push dword [0x41edc0]
push 0x40cfe0
push dword [0x41ebc4]
lea eax, [ebp - 0x1dc]
mov edx, 3
call fcn.00403964
mov eax, dword [ebp - 0x1dc]
mov ecx, 0x40cfec
mov dl, 1
call fcn.0040c260
pop ecx
mov eax, dword [ebp - 0x1d8]
mov edx, 0x40cfd4
call fcn.004039f0
je 0x40cdf5
mov eax, 0x41eb54
mov edx, 0x40cff8
call fcn.00403780
push ebp
lea eax, [ebp - 0x1e0]
push eax
lea eax, [ebp - 0x1e4]
mov ecx, dword [0x41ebc8]
mov edx, dword [0x41edc4]
call fcn.004038f0
mov eax, dword [ebp - 0x1e4]
mov ecx, 0x40cfc8
mov dl, 1
call fcn.0040c260
pop ecx
mov eax, dword [ebp - 0x1e0]
mov edx, 0x40cfd4
call fcn.004039f0
je 0x40cdf5
mov eax, 0x41eb54
mov edx, 0x40d014
call fcn.00403780
push ebp
lea eax, [ebp - 0x1e8]
push eax
lea eax, [ebp - 0x1ec]
mov ecx, dword [0x41eb30]
mov edx, dword [0x41edc8]
call fcn.004038f0
mov eax, dword [ebp - 0x1ec]
mov ecx, 0x40cfc8
mov dl, 1
call fcn.0040c260
pop ecx
mov eax, 0x41eb54
mov edx, 0x40d098
call fcn.00403780
push ebp
lea eax, [ebp - 0x1f0]
adc dh, bh
invalid
call dword [eax - 0x73]
test dword [esi + edi*8], ecx
invalid
invalid