Function at 0x40bea0
Capabilities:
Print debug messages
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x384
mov eax, dword [0x4a4300]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x36c], edx
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x374], edi
test edx, edx
jne 0x40bedb
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004516e1
mov esp, ebp
pop ebp
ret
push 0xec
lea eax, [ebp - 0x35c]
mov dword [ebp - 0x360], 0
push 0
push eax
call fcn.004523e0
lea ebx, [ebp - 0x360]
add esp, 0xc
mov esi, edi
sub ebx, edi
mov edi, 0x3c
lea ebx, [ebx]
mov ecx, dword [esi]
test ecx, ecx
je 0x40bf1e
call fcn.0040bd00
mov dword [ebx + esi], eax
add esi, 4
dec edi
jne 0x40bf10
xor eax, eax
lea ecx, [ebp - 0x358]
lea edx, [edi + 0xa]
nop
cmp dword [ecx - 8], 0
jbe 0x40bf37
inc eax
cmp dword [ecx - 4], 0
jbe 0x40bf3e
inc eax
cmp dword [ecx], 0
jbe 0x40bf44
inc eax
cmp dword [ecx + 4], 0
jbe 0x40bf4b
inc eax
cmp dword [ecx + 8], 0
jbe 0x40bf52
inc eax
cmp dword [ecx + 0xc], 0
jbe 0x40bf59
inc eax
add ecx, 0x18
dec edx
jne 0x40bf30
test eax, eax
je 0x40bec8
push 0x63
push edx
lea eax, [ebp - 0x6f]
mov byte [ebp - 0x70], dl
push eax
call fcn.004523e0
add esp, 0xc
call fcn.0040fd80
mov ebx, eax
mov esi, edx
mov dword [ebp - 0x380], ebx
mov dword [ebp - 0x37c], esi
call fcn.0040fd80
sub eax, ebx
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
sbb edx, esi
test edx, edx
jg 0x40c23a
jl 0x40bfb2
cmp eax, 0xbb8
ja 0x40c23a
mov edx, dword [ebp - 0x374]
add edx, 2
mov dword [ebp - 0x384], edx
xor ecx, ecx
mov edi, edx
mov dword [ebp - 0x364], ecx
mov eax, ecx
mov dword [ebp - 0x370], edi
jmp 0x40bfe0
mov esi, dword [ebp + eax*4 - 0x360]
test esi, esi
je 0x40c19e
push 0
push 0x64
lea eax, [ebp - 0x70]
inc ecx
push eax
push esi
mov dword [ebp - 0x368], ecx
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
jne 0x40c01f
push esi
call ebx
mov eax, dword [ebp - 0x364]
mov dword [ebp + eax*4 - 0x360], 0
jmp 0x40c06a
cmp eax, 0xffffffff
jne 0x40c05f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x40c192
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2749
je 0x40c192
push esi
call ebx
mov eax, dword [ebp - 0x364]
mov dword [ebp + eax*4 - 0x360], 0
jmp 0x40c198
cmp eax, 0x58
je 0x40c089
mov eax, dword [ebp - 0x364]
push dword [ebp + eax*4 - 0x360]
call ebx
mov eax, dword [ebp - 0x364]
mov dword [ebp + eax*4 - 0x360], 0
jmp 0x40c198
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x378], eax
xor eax, eax
mov dword [ebp - 0x6c], 0
xor edi, edi
lea ecx, [ecx]
movzx edx, byte [ebp + edi - 0x70]
mov ecx, eax
shl ecx, 5
sub ecx, eax
movzx eax, byte [ebp + edi - 0x6f]
add edx, ecx
mov ecx, edx
shl ecx, 5
sub ecx, edx
add ecx, eax
movzx eax, byte [ebp + edi - 0x6e]
mov edx, ecx
shl edx, 5
sub edx, ecx
movzx ecx, byte [ebp + edi - 0x6d]
add edx, eax
add edi, 4
mov eax, edx
shl eax, 5
sub eax, edx
add eax, ecx
cmp edi, 0x58
jb 0x40c0a0
cmp dword [ebp - 0x378], eax
je 0x40c107
push esi
call ebx
mov edi, dword [ebp - 0x364]
mov dword [ebp + edi*4 - 0x360], 0
mov edi, dword [ebp - 0x370]
jmp 0x40c192
cmp dword [ebp - 0x64], 0xc8
je 0x40c1f0
push esi
call ebx
mov eax, dword [ebp - 0x364]
push 0x1ff
push 0
mov byte [ebp - 0x270], 0
mov dword [ebp + eax*4 - 0x360], 0
lea eax, [ebp - 0x26f]
push eax
call fcn.004523e0
mov edi, dword [ebp - 0x370]
lea eax, [ebp - 0x60]
add esp, 0xc
push eax
movzx eax, byte [edi + 1]
push eax
movzx eax, byte [edi]
push eax
movzx eax, byte [edi - 1]
push eax
movzx eax, byte [edi - 2]
push eax
lea eax, [ebp - 0x270]
push 0x4833c4
push eax
call fcn.0045752f
add esp, 0x1c
lea eax, [ebp - 0x270]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [ebp - 0x270]
push eax
call fcn.00458229
add esp, 4
mov eax, dword [ebp - 0x364]
mov ecx, dword [ebp - 0x368]
inc eax
add edi, 4
mov dword [ebp - 0x364], eax
mov dword [ebp - 0x370], edi
cmp eax, 0x3c
jb 0x40bfe0
test ecx, ecx
je 0x40c287
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0040fd80
sub eax, dword [ebp - 0x380]
sbb edx, dword [ebp - 0x37c]
test edx, edx
jg 0x40c23a
jl 0x40c1e5
cmp eax, 0xbb8
ja 0x40c23a
mov edx, dword [ebp - 0x384]
jmp 0x40bfc1
mov eax, dword [0x6b20a0]
test eax, eax
mov edi, dword [ebp - 0x36c]
cmove eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x364]
mov dword [0x6b20a0], eax
mov eax, dword [ebp - 0x20]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0xc], eax
mov eax, dword [ebp - 0x374]
mov eax, dword [eax + ecx*4]
mov dword [edi + 4], eax
mov eax, dword [ebp + ecx*4 - 0x360]
mov dword [edi], eax
mov dword [ebp + ecx*4 - 0x360], 0
jmp 0x40c28d
push 0x1ff
lea eax, [ebp - 0x26f]
mov byte [ebp - 0x270], 0
push 0
push eax
call fcn.004523e0
add esp, 0xc
lea eax, [ebp - 0x270]
push 0x4833a4
push eax
call fcn.0045752f
add esp, 8
lea eax, [ebp - 0x270]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [ebp - 0x270]
push eax
call fcn.00458229
add esp, 4
mov edi, dword [ebp - 0x36c]
xor esi, esi
nop
mov eax, dword [ebp + esi*4 - 0x360]
test eax, eax
je 0x40c2a9
push eax
call ebx
mov dword [ebp + esi*4 - 0x360], 0
inc esi
cmp esi, 0x3c
jb 0x40c290
mov ecx, dword [ebp - 4]
xor eax, eax
cmp dword [edi], eax
pop edi
setne al
xor ecx, ebp
pop esi
pop ebx
call fcn.004516e1
mov esp, ebp
pop ebp
ret