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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x5cc
mov eax, dword [0x4a4300]
xor eax, esp
mov dword [esp + 0x5c8], eax
push ebx
push esi
push edi
mov dword [esp + 0x18], ecx
call fcn.00401ef0
mov eax, dword [0x4ab6f8]
or eax, dword [0x4ab6fc]
je 0x40247f
mov edx, dword [esp + 0x18]
lea edi, [esp + 0x30]
mov ecx, 0x58
lea ebx, [esp + 0xad]
mov esi, 0x4ab6f8
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 0x402101
push 0x1ff
lea eax, [esp + 0x1d5]
mov byte [esp + 0x1d4], 0
push 0
push eax
call fcn.004523e0
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 + 0x1e0]
push 0x482710
push eax
call fcn.0045752f
add esp, 0x18
lea eax, [esp + 0x1d0]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [esp + 0x1d0]
push eax
call fcn.00458229
mov ecx, dword [esi - 3]
add esp, 4
call fcn.00401460
mov ecx, dword [esp + 0x10]
mov dword [esi - 0x8f], eax
add esi, 4
dec edi
jne 0x402070
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 0x402129
inc eax
cmp dword [ebx + 0xc], 0
je 0x402130
inc eax
cmp dword [ebx + 0x10], 0
je 0x402137
inc eax
cmp dword [ebx + 0x14], 0
je 0x40213e
inc eax
cmp dword [ebx + 0x18], 0
je 0x402145
inc eax
cmp dword [ebx + 0x1c], 0
je 0x40214c
inc eax
cmp dword [ebx + 0x20], 0
je 0x402153
inc eax
cmp dword [ebx + 0x24], 0
je 0x40215a
inc eax
cmp dword [ebx + 0x28], 0
je 0x402161
inc eax
test eax, eax
je 0x40247f
call fcn.0040fd80
mov dword [esp + 0x20], eax
mov dword [esp + 0x10], edx
push 0x3f
lea eax, [esp + 0x195]
mov byte [esp + 0x194], 0
push 0
push eax
call fcn.004523e0
add esp, 0xc
xor edi, edi
mov eax, dword [esi]
test eax, eax
je 0x4021e9
push 0
push 0x40
lea ecx, [esp + 0x198]
push ecx
push eax
call dword [sym.imp.WS2_32.dll_recv]
test eax, eax
je 0x4021db
cmp eax, 0xffffffff
jne 0x4021d2
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2733
je 0x4021e9
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
cmp eax, 0x2749
je 0x4021e9
jmp 0x4021db
cmp eax, 0x14
je 0x40238c
push dword [esi]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [esi], 0
inc edi
add esi, 4
cmp edi, 0xa
jb 0x402194
xor eax, eax
lea edi, [ebx + 4]
cmp dword [edi], eax
mov ecx, 1
cmovne eax, ecx
cmp dword [edi + 4], 0
je 0x402208
inc eax
cmp dword [ebx + 0xc], 0
je 0x40220f
inc eax
cmp dword [ebx + 0x10], 0
je 0x402216
inc eax
cmp dword [ebx + 0x14], 0
je 0x40221d
inc eax
cmp dword [ebx + 0x18], 0
je 0x402224
inc eax
cmp dword [ebx + 0x1c], 0
je 0x40222b
inc eax
cmp dword [ebx + 0x20], 0
je 0x402232
inc eax
cmp dword [ebx + 0x24], 0
je 0x402239
inc eax
cmp dword [ebx + 0x28], 0
je 0x402240
inc eax
test eax, eax
je 0x402461
call fcn.0040fd80
sub eax, dword [esp + 0x20]
sbb edx, dword [esp + 0x10]
test edx, edx
jg 0x402461
jl 0x40226a
cmp eax, 0xbb8
ja 0x402461
push 0x100
lea eax, [esp + 0x38]
push 0
push eax
call fcn.004523e0
add esp, 0xc
lea eax, [esp + 0x1d4]
xor esi, esi
mov dword [esp + 0x30], esi
push 0x100
push esi
push eax
call fcn.004523e0
xor edx, edx
mov eax, 0xfffffffc
add esp, 0xc
mov dword [esp + 0x2c], edx
sub eax, ebx
mov dword [esp + 0x1d0], edx
mov dword [esp + 0x24], eax
mov eax, 0xa
mov dword [esp + 0x28], edx
mov dword [esp + 0x2c], 0x64
mov dword [esp + 0x1c], eax
jmp 0x4022d0
mov ebx, dword [edi]
test ebx, ebx
je 0x402355
xor ecx, ecx
test esi, esi
je 0x4022fb
mov eax, dword [esp + 0x24]
add eax, dword [esp + 0x14]
mov eax, dword [eax + edi]
jmp 0x4022f0
cmp dword [esp + ecx*4 + 0x34], eax
je 0x4022fb
inc ecx
cmp ecx, esi
jb 0x4022f0
cmp ecx, esi
jne 0x402311
cmp esi, 0x40
jae 0x402311
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 0x402332
mov ecx, dword [esp + 0x24]
add ecx, dword [esp + 0x14]
mov ebx, dword [edi]
mov ecx, dword [ecx + edi]
cmp dword [esp + eax*4 + 0x1d4], ecx
je 0x402332
inc eax
cmp eax, edx
jb 0x402324
cmp eax, edx
jne 0x402351
cmp edx, 0x40
jae 0x402351
mov dword [esp + eax*4 + 0x1d4], ebx
mov edx, dword [esp + 0x1d0]
inc edx
mov dword [esp + 0x1d0], edx
mov eax, dword [esp + 0x1c]
add edi, 4
dec eax
mov dword [esp + 0x1c], eax
jne 0x4022d0
lea eax, [esp + 0x28]
push eax
lea eax, [esp + 0x1d4]
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 0x402176
mov eax, dword [ebx]
test eax, eax
je 0x40239f
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx], 0
mov eax, dword [esp + 0x19c]
mov dword [ebx + 0x180], eax
mov eax, dword [esp + 0x1a0]
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 0x1ff
mov dword [ebx + 0x64], eax
lea eax, [esp + 0x3d5]
push 0
push eax
mov byte [esp + 0x3dc], 0
call fcn.004523e0
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.0040fd80
sub eax, dword [esp + 0x30]
sbb edx, dword [esp + 0x20]
push edx
push eax
lea eax, [esp + 0x3e8]
push 0x482734
push eax
call fcn.0045752f
add esp, 0x20
lea eax, [esp + 0x3d0]
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
lea eax, [esp + 0x3d0]
push eax
call fcn.00458229
add esp, 4
call fcn.0040fd80
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 0x402479
push eax
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi], 0
add edi, 4
dec esi
jne 0x402466
mov ecx, dword [esp + 0x5d4]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004516e1
mov esp, ebp
pop ebp
ret