Function at 0x40bb50
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 0x40bb8b
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00451570
mov esp, ebp
pop ebp
ret
push 0xec
lea eax, [ebp - 0x35c]
mov dword [ebp - 0x360], 0
push 0
push eax
call fcn.00452270
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 0x40bbce
call fcn.0040b9b0
mov dword [ebx + esi], eax
add esi, 4
dec edi
jne 0x40bbc0
xor eax, eax
lea ecx, [ebp - 0x358]
lea edx, [edi + 0xa]
nop
cmp dword [ecx - 8], 0
jbe 0x40bbe7
inc eax
cmp dword [ecx - 4], 0
jbe 0x40bbee
inc eax
cmp dword [ecx], 0
jbe 0x40bbf4
inc eax
cmp dword [ecx + 4], 0
jbe 0x40bbfb
inc eax
cmp dword [ecx + 8], 0
jbe 0x40bc02
inc eax
cmp dword [ecx + 0xc], 0
jbe 0x40bc09
inc eax
add ecx, 0x18
dec edx
jne 0x40bbe0
test eax, eax
je 0x40bb78
push 0x63
push edx
lea eax, [ebp - 0x6f]
mov byte [ebp - 0x70], dl
push eax
call fcn.00452270
add esp, 0xc
call fcn.0040fa20
mov ebx, eax
mov esi, edx
mov dword [ebp - 0x380], ebx
mov dword [ebp - 0x37c], esi
call fcn.0040fa20
sub eax, ebx
mov ebx, dword [sym.imp.WS2_32.dll_closesocket]
sbb edx, esi
test edx, edx
jg 0x40beea
jl 0x40bc62
cmp eax, 0xbb8
ja 0x40beea
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 0x40bc90
mov esi, dword [ebp + eax*4 - 0x360]
test esi, esi
je 0x40be4e
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 0x40bccf
push esi
call ebx
mov eax, dword [ebp - 0x364]
mov dword [ebp + eax*4 - 0x360], 0
jmp 0x40bd1a
cmp eax, 0xffffffff
jne 0x40bd0f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x40be42
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2749
je 0x40be42
push esi
call ebx
mov eax, dword [ebp - 0x364]
mov dword [ebp + eax*4 - 0x360], 0
jmp 0x40be48
cmp eax, 0x58
je 0x40bd39
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 0x40be48
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 0x40bd50
cmp dword [ebp - 0x378], eax
je 0x40bdb7
push esi
call ebx
mov edi, dword [ebp - 0x364]
mov dword [ebp + edi*4 - 0x360], 0
mov edi, dword [ebp - 0x370]
jmp 0x40be42
cmp dword [ebp - 0x64], 0xc8
je 0x40bea0
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.00452270
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 0x4833a4
push eax
call fcn.004573bf
add esp, 0x1c
lea eax, [ebp - 0x270]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [ebp - 0x270]
push eax
call fcn.004580ba
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 0x40bc90
test ecx, ecx
je 0x40bf37
push 1
call dword [sym.imp.KERNEL32.dll_Sleep]
call fcn.0040fa20
sub eax, dword [ebp - 0x380]
sbb edx, dword [ebp - 0x37c]
test edx, edx
jg 0x40beea
jl 0x40be95
cmp eax, 0xbb8
ja 0x40beea
mov edx, dword [ebp - 0x384]
jmp 0x40bc71
mov eax, dword [0x6b1e3c]
test eax, eax
mov edi, dword [ebp - 0x36c]
cmove eax, dword [ebp - 0x68]
mov ecx, dword [ebp - 0x364]
mov dword [0x6b1e3c], 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 0x40bf3d
push 0x1ff
lea eax, [ebp - 0x26f]
mov byte [ebp - 0x270], 0
push 0
push eax
call fcn.00452270
add esp, 0xc
lea eax, [ebp - 0x270]
push 0x483384
push eax
call fcn.004573bf
add esp, 8
lea eax, [ebp - 0x270]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [ebp - 0x270]
push eax
call fcn.004580ba
add esp, 4
mov edi, dword [ebp - 0x36c]
xor esi, esi
nop
mov eax, dword [ebp + esi*4 - 0x360]
test eax, eax
je 0x40bf59
push eax
call ebx
mov dword [ebp + esi*4 - 0x360], 0
inc esi
cmp esi, 0x3c
jb 0x40bf40
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.00451570
mov esp, ebp
pop ebp
ret