Function at 0x40d240
Capabilities:
Check for time delay via gettickcount
Get socket status
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x55cb21
mov eax, dword fs:[0]
push eax
push ecx
mov eax, 0x114c
call fcn.0052f2b0
mov eax, dword [0x5b5450]
xor eax, esp
mov dword [esp + 0x1148], eax
push ebx
push esi
push edi
mov eax, dword [0x5b5450]
xor eax, esp
push eax
lea eax, [esp + 0x1160]
mov dword fs:[0], eax
mov edi, ecx
mov dword [esp + 0x10], edi
mov eax, dword [edi + 0x7c]
mov dword [esp + 0x50], eax
mov dword [esp + 0x4c], 1
lea esi, [edi + 0x3c]
lea ecx, [ecx]
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, eax
mov eax, 0x10624dd3
mul ebx
mov eax, edx
shr eax, 6
mov dword [esp + 0x14], eax
imul eax, eax, 0x3e8
sub ebx, eax
push esi
imul ebx, ebx, 0x3e8
push 0
push 0
lea eax, [esp + 0x58]
push eax
mov eax, dword [edi + 0x7c]
inc eax
push eax
mov dword [esp + 0x2c], ebx
call dword [sym.imp.WS2_32.dll_select]
cmp eax, 0xffffffff
je 0x40d44b
lea eax, [esp + 0x4c]
push eax
push dword [edi + 0x7c]
call dword [sym.imp.WS2_32.dll___WSAFDIsSet]
test eax, eax
je 0x40d435
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov edi, eax
mov eax, 0x10624dd3
mul edi
mov ebx, edx
shr ebx, 6
mov ecx, ebx
imul ecx, ecx, 0x3e8
push 0
push 0x1000
lea eax, [esp + 0x15c]
push eax
mov eax, dword [esp + 0x1c]
sub edi, ecx
push dword [eax + 0x7c]
imul edi, edi, 0x3e8
call dword [sym.imp.WS2_32.dll_recv]
cmp eax, 0xffffffff
je 0x40d3e8
test eax, eax
je 0x40d492
jle 0x40d3c7
mov ecx, dword [esp + 0x10]
push eax
lea eax, [esp + 0x158]
push eax
lea ecx, [ecx + 0x64]
call fcn.00403e30
sub ebx, dword [esp + 0x14]
sub edi, dword [esp + 0x18]
jns 0x40d379
dec ebx
add edi, 0xf4240
jmp 0x40d388
cmp edi, 0xf4240
jl 0x40d388
inc ebx
sub edi, 0xf4240
mov eax, dword [esi]
cmp eax, ebx
jg 0x40d395
jl 0x40d3d0
cmp dword [esi + 4], edi
jle 0x40d3d0
mov ecx, dword [esi + 4]
sub eax, ebx
sub ecx, edi
jns 0x40d3b3
mov edi, dword [esp + 0x10]
dec eax
add ecx, 0xf4240
mov dword [esi], eax
mov dword [esi + 4], ecx
jmp 0x40d2a0
cmp ecx, 0xf4240
jl 0x40d3c2
inc eax
sub ecx, 0xf4240
mov dword [esi], eax
mov dword [esi + 4], ecx
mov edi, dword [esp + 0x10]
jmp 0x40d2a0
mov ebx, dword [esp + 0x10]
push 0xb
push str.Time_Out___
lea ecx, [ebx + 0x80]
call fcn.00403e30
jmp 0x40d423
lea ecx, [esp + 0x34]
call fcn.0040d4e0
mov ebx, dword [esp + 0x10]
push 0xffffffffffffffff
push 0
push eax
lea ecx, [ebx + 0x80]
mov dword [esp + 0x1174], 2
call fcn.00403f60
cmp dword [esp + 0x48], 0x10
jb 0x40d423
push dword [esp + 0x34]
call fcn.00418340
add esp, 4
push dword [ebx + 0x7c]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [ebx + 0x7c], 0xffffffff
jmp 0x40d492
lea ecx, [esp + 0x1c]
call fcn.0040d4e0
mov dword [esp + 0x1168], 1
jmp 0x40d45f
lea ecx, [esp + 0x1c]
call fcn.0040d4e0
mov dword [esp + 0x1168], 0
push 0xffffffffffffffff
push 0
push eax
lea ecx, [edi + 0x80]
call fcn.00403f60
cmp dword [esp + 0x30], 0x10
jb 0x40d482
push dword [esp + 0x1c]
call fcn.00418340
add esp, 4
push dword [edi + 0x7c]
call dword [sym.imp.WS2_32.dll_closesocket]
mov dword [edi + 0x7c], 0xffffffff
mov ecx, dword [esp + 0x1160]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x1148]
xor ecx, esp
call fcn.0052c359
mov esp, ebp
pop ebp
ret