Function at 0x401fb0
Capabilities:
Get socket status
Print debug messages
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x364
mov eax, dword [0x4a2300]
xor eax, esp
mov dword [esp + 0x360], eax
push ebx
push esi
push edi
mov dword [esp + 0x18], ecx
call fcn.00401ec0
mov eax, dword [0x4a9430]
or eax, dword [0x4a9434]
je 0x40243c
mov edx, dword [esp + 0x18]
lea edi, [esp + 0x30]
mov ecx, 0x58
lea ebx, [esp + 0xad]
mov esi, 0x4a9430
sub ebx, edx
rep movsd dword es:[edi], dword [esi]
mov eax, dword [esp + 0x30]
lea ecx, [esp + 0xd5]
mov dword [edx + 0x1a0], eax
lea esi, [edx + 0x93]
mov eax, dword [esp + 0x34]
sub ecx, edx
mov dword [edx + 0x60], 0
mov edi, 0xa
mov dword [edx + 0x64], 0
mov dword [edx + 0x1a4], eax
mov dword [esp + 0x10], ecx
mov edi, edi
mov eax, dword [ebx + esi]
mov dword [esi - 0x2b], eax
mov eax, dword [ecx + esi]
mov dword [esi - 0x8f], 0
mov dword [esi - 3], eax
test eax, eax
je 0x4020ce
push 0x63
lea eax, [esp + 0x29d]
mov byte [esp + 0x29c], 0
push 0
push eax
call fcn.00451650
movzx eax, byte [esi]
add esp, 0xc
push eax
movzx eax, byte [esi - 1]
push eax
movzx eax, byte [esi - 2]
push eax
movzx eax, byte [esi - 3]
push eax
lea eax, [esp + 0x2a8]
push 0x4806dc
push eax
call fcn.0045671f
add esp, 0x18
lea eax, [esp + 0x298]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [esp + 0x298]
push eax
call fcn.0045738c
mov ecx, dword [esi - 3]
add esp, 4
call fcn.00401400
mov ecx, dword [esp + 0x10]
mov dword [esi - 0x8f], eax
add esi, 4
dec edi
jne 0x402040
mov ebx, dword [esp + 0x18]
xor eax, eax
cmp dword [ebx + 4], eax
lea esi, [ebx + 4]
mov ecx, 1
mov dword [esp + 0x14], esi
cmovne eax, ecx
cmp dword [esi + 4], edi
je 0x4020f6
inc eax
cmp dword [ebx + 0xc], 0
je 0x4020fd
inc eax
cmp dword [ebx + 0x10], 0
je 0x402104
inc eax
cmp dword [ebx + 0x14], 0
je 0x40210b
inc eax
cmp dword [ebx + 0x18], 0
je 0x402112
inc eax
cmp dword [ebx + 0x1c], 0
je 0x402119
inc eax
cmp dword [ebx + 0x20], 0
je 0x402120
inc eax
cmp dword [ebx + 0x24], 0
je 0x402127
inc eax
cmp dword [ebx + 0x28], 0
je 0x40212e
inc eax
test eax, eax
je 0x40243c
call fcn.0040ee00
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], edx
push 0x3f
lea eax, [esp + 0x29d]
mov byte [esp + 0x29c], 0
push 0
push eax
call fcn.00451650
add esp, 0xc
xor edi, edi
mov eax, dword [esi]
test eax, eax
je 0x4021b6
push 0
push 0x40
lea ecx, [esp + 0x2a0]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4021a8
cmp eax, 0xffffffff
jne 0x40219f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x4021b6
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2749
je 0x4021b6
jmp 0x4021a8
cmp eax, 0x14
je 0x40234c
push dword [esi]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0
inc edi
add esi, 4
cmp edi, 0xa
jb 0x402161
xor eax, eax
lea edi, [ebx + 4]
cmp dword [edi], eax
mov ecx, 1
cmovne eax, ecx
cmp dword [edi + 4], 0
je 0x4021d5
inc eax
cmp dword [ebx + 0xc], 0
je 0x4021dc
inc eax
cmp dword [ebx + 0x10], 0
je 0x4021e3
inc eax
cmp dword [ebx + 0x14], 0
je 0x4021ea
inc eax
cmp dword [ebx + 0x18], 0
je 0x4021f1
inc eax
cmp dword [ebx + 0x1c], 0
je 0x4021f8
inc eax
cmp dword [ebx + 0x20], 0
je 0x4021ff
inc eax
cmp dword [ebx + 0x24], 0
je 0x402206
inc eax
cmp dword [ebx + 0x28], 0
je 0x40220d
inc eax
test eax, eax
je 0x40241e
call fcn.0040ee00
sub eax, dword [esp + 0x20]
sbb edx, dword [esp + 0x10]
test edx, edx
jg 0x40241e
jl 0x402237
cmp eax, 0xbb8
ja 0x40241e
push 0x100
lea eax, [esp + 0x38]
push 0
push eax
call fcn.00451650
add esp, 0xc
lea eax, [esp + 0x194]
xor esi, esi
mov dword [esp + 0x30], esi
push 0x100
push esi
push eax
call fcn.00451650
xor edx, edx
mov eax, 0xfffffffc
add esp, 0xc
mov dword [esp + 0x2c], edx
sub eax, ebx
mov dword [esp + 0x190], edx
mov dword [esp + 0x24], eax
mov eax, 0xa
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], 0x64
mov dword [esp + 0x1c], eax
mov ebx, dword [edi]
test ebx, ebx
je 0x402315
xor ecx, ecx
test esi, esi
je 0x4022bb
mov eax, dword [esp + 0x24]
add eax, dword [esp + 0x14]
mov eax, dword [eax + edi]
nop
cmp dword [esp + ecx*4 + 0x34], eax
je 0x4022bb
inc ecx
cmp ecx, esi
jb 0x4022b0
cmp ecx, esi
jne 0x4022d1
cmp esi, 0x40
jae 0x4022d1
mov dword [esp + ecx*4 + 0x34], ebx
mov esi, dword [esp + 0x30]
inc esi
mov dword [esp + 0x30], esi
xor eax, eax
test edx, edx
je 0x4022f2
mov ecx, dword [esp + 0x24]
add ecx, dword [esp + 0x14]
mov ebx, dword [edi]
mov ecx, dword [ecx + edi]
cmp dword [esp + eax*4 + 0x194], ecx
je 0x4022f2
inc eax
cmp eax, edx
jb 0x4022e4
cmp eax, edx
jne 0x402311
cmp edx, 0x40
jae 0x402311
mov dword [esp + eax*4 + 0x194], ebx
mov edx, dword [esp + 0x190]
inc edx
mov dword [esp + 0x190], edx
mov eax, dword [esp + 0x1c]
add edi, 4
dec eax
mov dword [esp + 0x1c], eax
jne 0x402294
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x194]
push eax
push 0
lea eax, [esp + 0x3c]
push eax
push 0
call dword [sym.imp.WS2_32.dll_select]
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x14]
jmp 0x402143
mov eax, dword [ebx]
test eax, eax
je 0x40235f
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx], 0
mov eax, dword [esp + 0x2a4]
mov dword [ebx + 0x180], eax
mov eax, dword [esp + 0x2a8]
mov dword [ebx + 0x184], eax
mov eax, dword [ebx + edi*4 + 4]
mov dword [ebx], eax
mov dword [ebx + edi*4 + 4], 0
mov eax, dword [ebx + 0x68]
mov dword [ebx + 0x60], eax
mov eax, dword [ebx + edi*4 + 0x90]
push 0x63
mov dword [ebx + 0x64], eax
lea eax, [esp + 0x305]
push 0
push eax
mov byte [esp + 0x30c], 0
call fcn.00451650
movzx eax, byte [ebx + 0x67]
add esp, 0xc
push eax
movzx eax, byte [ebx + 0x66]
push eax
movzx eax, byte [ebx + 0x65]
push eax
movzx eax, byte [ebx + 0x64]
push eax
call fcn.0040ee00
sub eax, dword [esp + 0x30]
sbb edx, dword [esp + 0x20]
push edx
push eax
lea eax, [esp + 0x318]
push str._DEBUG___lld__
push eax
call fcn.0045671f
add esp, 0x20
lea eax, [esp + 0x300]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [esp + 0x300]
push eax
call fcn.0045738c
add esp, 4
call fcn.0040ee00
mov edi, dword [esp + 0x14]
mov dword [ebx + 0x1c0], eax
mov dword [ebx + 0x1c4], edx
mov esi, 0xa
mov eax, dword [edi]
test eax, eax
je 0x402436
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0
add edi, 4
dec esi
jne 0x402423
mov ecx, dword [esp + 0x36c]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.0045094b
mov esp, ebp
pop ebp
ret