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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x584e80
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0xd98
mov eax, dword [0x5e8e00]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov dword [ebp - 0xda4], ecx
mov dword [ebp - 0xafc], 0
mov dword [ebp - 0xaf8], 0
push 0x800
push 0
lea eax, [ebp - 0xaf0]
push eax
call fcn.0055ca00
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [ebp - 0x1dc], eax
mov dword [ebp - 0xaf4], 0x10
mov dword [ebp - 0xb00], 0
mov dword [ebp - 0x2f0], 0
mov dword [ebp - 0x1e4], 2
mov dword [ebp - 0x1e0], 0
mov ecx, dword [ebp - 0xda4]
cmp dword [ecx + 8], 0
jne 0x40f474
or eax, 0xffffffff
jmp 0x40f810
mov dword [ebp - 0xb04], 0
jmp 0x40f48f
mov edx, dword [ebp - 0xb04]
add edx, 1
mov dword [ebp - 0xb04], edx
mov eax, dword [ebp - 0xb04]
cmp eax, dword [ebp - 0x2f0]
jae 0x40f4bb
mov ecx, dword [ebp - 0xda4]
mov edx, dword [ecx + 8]
mov eax, dword [ebp - 0xb04]
mov ecx, dword [ebp + eax*4 - 0x2ec]
cmp ecx, dword [edx]
jne 0x40f4b9
jmp 0x40f4bb
jmp 0x40f480
mov edx, dword [ebp - 0xb04]
cmp edx, dword [ebp - 0x2f0]
jne 0x40f4f9
cmp dword [ebp - 0x2f0], 0x40
jae 0x40f4f9
mov eax, dword [ebp - 0xda4]
mov ecx, dword [eax + 8]
mov edx, dword [ebp - 0xb04]
mov eax, dword [ecx]
mov dword [ebp + edx*4 - 0x2ec], eax
mov ecx, dword [ebp - 0x2f0]
add ecx, 1
mov dword [ebp - 0x2f0], ecx
xor edx, edx
jne 0x40f474
lea eax, [ebp - 0x1e4]
push eax
push 0
push 0
lea ecx, [ebp - 0x2f0]
push ecx
push 0
call dword [sym.imp.WSOCK32.dll_select]
mov dword [ebp - 0xafc], eax
cmp dword [ebp - 0xafc], 0
jne 0x40f53b
cmp dword [ebp - 0xafc], 0xffffffff
jne 0x40f53b
or eax, 0xffffffff
jmp 0x40f810
lea edx, [ebp - 0x2f0]
push edx
mov eax, dword [ebp - 0xda4]
mov ecx, dword [eax + 8]
mov edx, dword [ecx]
push edx
call dword [sym.imp.WSOCK32.dll___WSAFDIsSet]
test eax, eax
je 0x40f80d
mov dword [ebp - 0xafc], 1
mov eax, 1
test eax, eax
je 0x40f809
mov dword [ebp - 4], 0
lea ecx, [ebp - 0xaf4]
push ecx
lea edx, [ebp - 0x1d8]
push edx
push 0
push 0x800
lea eax, [ebp - 0xaf0]
push eax
mov ecx, dword [ebp - 0xda4]
mov edx, dword [ecx + 8]
mov eax, dword [edx]
push eax
call dword [sym.imp.WSOCK32.dll_recvfrom]
mov dword [ebp - 0xafc], eax
jmp 0x40f5c7
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0xafc], 0
jle 0x40f7de
mov ecx, dword [ebp - 0xaf8]
add ecx, 1
mov dword [ebp - 0xaf8], ecx
mov edx, dword [ebp - 0xafc]
mov byte [ebp + edx - 0xaf0], 0
push 0x5bc470
lea eax, [ebp - 0xaf0]
push eax
call fcn.0040de60
add esp, 8
test eax, eax
jne 0x40f62c
push 0x5bc480
lea ecx, [ebp - 0xaf0]
push ecx
call fcn.0040de60
add esp, 8
test eax, eax
je 0x40f7de
mov edx, dword [ebp - 0xda4]
add edx, 0xc
push edx
lea eax, [ebp - 0xaf0]
push eax
call fcn.0040de60
add esp, 8
test eax, eax
je 0x40f7de
push str.JAMEDIA
lea ecx, [ebp - 0xaf0]
push ecx
call fcn.0040de60
add esp, 8
test eax, eax
jne 0x40f7de
push str.HDS_1.0_200_OK
lea edx, [ebp - 0xaf0]
push edx
call fcn.0040de60
add esp, 8
test eax, eax
je 0x40f6bb
lea eax, [ebp - 0xaf0]
push eax
lea ecx, [ebp - 0xcc0]
push ecx
call fcn.0040e0c0
add esp, 8
mov ecx, 0x36
mov esi, eax
lea edi, [ebp - 0xf0]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x36
lea esi, [ebp - 0xf0]
lea edi, [ebp - 0xbe0]
rep movsd dword es:[edi], dword [esi]
jmp 0x40f70b
push 0x5bc4a8
lea edx, [ebp - 0xaf0]
push edx
call fcn.0040de60
add esp, 8
test eax, eax
je 0x40f70b
lea eax, [ebp - 0xaf0]
push eax
lea ecx, [ebp - 0xd98]
push ecx
call fcn.0040e460
add esp, 8
mov ecx, 0x36
mov esi, eax
lea edi, [ebp - 0x1c8]
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x36
lea esi, [ebp - 0x1c8]
lea edi, [ebp - 0xbe0]
rep movsd dword es:[edi], dword [esi]
mov dword [ebp - 0xd9c], 0xe0
mov edx, dword [ebp - 0xd9c]
push edx
call fcn.00454e3a
add esp, 4
mov dword [ebp - 0xda0], eax
cmp dword [ebp - 0xda0], 0
je 0x40f759
mov eax, dword [ebp - 0xd9c]
push eax
push 0
mov ecx, dword [ebp - 0xda0]
push ecx
call fcn.0055ca00
add esp, 0xc
mov edx, dword [ebp - 0xda0]
mov dword [ebp - 0xda8], edx
jmp 0x40f763
mov dword [ebp - 0xda8], 0
mov eax, dword [ebp - 0xda8]
mov dword [ebp - 0xbe4], eax
mov ecx, dword [ebp - 0xbe4]
mov dword [ecx], 0
mov edi, dword [ebp - 0xbe4]
add edi, 8
mov ecx, 0x36
lea esi, [ebp - 0xbe0]
rep movsd dword es:[edi], dword [esi]
mov edx, dword [ebp - 0xbe4]
mov dword [edx + 4], 0
cmp dword [ebp - 0xb00], 0
jne 0x40f7b5
mov eax, dword [ebp - 0xbe4]
mov dword [ebp - 0xb00], eax
jmp 0x40f7de
mov ecx, dword [ebp - 0xbe4]
mov edx, dword [ebp - 0xb00]
mov dword [ecx + 4], edx
mov eax, dword [ebp - 0xb00]
mov ecx, dword [ebp - 0xbe4]
mov dword [eax], ecx
mov edx, dword [ebp - 0xbe4]
mov dword [ebp - 0xb00], edx
call dword [sym.imp.KERNEL32.dll_GetTickCount]
sub eax, dword [ebp - 0x1dc]
cmp eax, 0x9c4
jbe 0x40f804
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xb00]
mov dword [eax], ecx
mov eax, dword [ebp - 0xaf8]
jmp 0x40f810
jmp 0x40f566
xor eax, eax
jmp 0x40f810
or eax, 0xffffffff
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.005562bb
mov esp, ebp
pop ebp
ret 4