Function at 0x40f6be
Capabilities:
Check for time delay via gettickcount
Receive data
Receive data on socket

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x582d20
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0xd98
mov eax, dword [0x5e6e00]
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.0055a880
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 0x40f564
or eax, 0xffffffff
jmp 0x40f900
mov dword [ebp - 0xb04], 0
jmp 0x40f57f
mov edx, dword [ebp - 0xb04]
add edx, 1
mov dword [ebp - 0xb04], edx
mov eax, dword [ebp - 0xb04]
cmp eax, dword [ebp - 0x2f0]
jae 0x40f5ab
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 0x40f5a9
jmp 0x40f5ab
jmp 0x40f570
mov edx, dword [ebp - 0xb04]
cmp edx, dword [ebp - 0x2f0]
jne 0x40f5e9
cmp dword [ebp - 0x2f0], 0x40
jae 0x40f5e9
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 0x40f564
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 0x40f62b
cmp dword [ebp - 0xafc], 0xffffffff
jne 0x40f62b
or eax, 0xffffffff
jmp 0x40f900
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 0x40f8fd
mov dword [ebp - 0xafc], 1
mov eax, 1
test eax, eax
je 0x40f8f9
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 0x40f6b7
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0xafc], 0
jle 0x40f8ce
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 0x5ba390
lea eax, [ebp - 0xaf0]
push eax
call fcn.0040de00
add esp, 8
test eax, eax
jne 0x40f71c
push 0x5ba3a0
lea ecx, [ebp - 0xaf0]
push ecx
call fcn.0040de00
add esp, 8
test eax, eax
je 0x40f8ce
mov edx, dword [ebp - 0xda4]
add edx, 0xc
push edx
lea eax, [ebp - 0xaf0]
push eax
call fcn.0040de00
add esp, 8
test eax, eax
je 0x40f8ce
push str.JAMEDIA
lea ecx, [ebp - 0xaf0]
push ecx
call fcn.0040de00
add esp, 8
test eax, eax
jne 0x40f8ce
push str.HDS_1.0_200_OK
lea edx, [ebp - 0xaf0]
push edx
call fcn.0040de00
add esp, 8
test eax, eax
je 0x40f7ab
lea eax, [ebp - 0xaf0]
push eax
lea ecx, [ebp - 0xcc0]
push ecx
call fcn.0040e060
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 0x40f7fb
push 0x5ba3c8
lea edx, [ebp - 0xaf0]
push edx
call fcn.0040de00
add esp, 8
test eax, eax
je 0x40f7fb
lea eax, [ebp - 0xaf0]
push eax
lea ecx, [ebp - 0xd98]
push ecx
call fcn.0040e400
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.00452cc1
add esp, 4
mov dword [ebp - 0xda0], eax
cmp dword [ebp - 0xda0], 0
je 0x40f849
mov eax, dword [ebp - 0xd9c]
push eax
push 0
mov ecx, dword [ebp - 0xda0]
push ecx
call fcn.0055a880
add esp, 0xc
mov edx, dword [ebp - 0xda0]
mov dword [ebp - 0xda8], edx
jmp 0x40f853
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 0x40f8a5
mov eax, dword [ebp - 0xbe4]
mov dword [ebp - 0xb00], eax
jmp 0x40f8ce
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 0x40f8f4
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xb00]
mov dword [eax], ecx
mov eax, dword [ebp - 0xaf8]
jmp 0x40f900
jmp 0x40f656
xor eax, eax
jmp 0x40f900
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.0055413f
mov esp, ebp
pop ebp
ret 4