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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x583c30
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.0055b7e0
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 0x40f3e4
or eax, 0xffffffff
jmp 0x40f780
mov dword [ebp - 0xb04], 0
jmp 0x40f3ff
mov edx, dword [ebp - 0xb04]
add edx, 1
mov dword [ebp - 0xb04], edx
mov eax, dword [ebp - 0xb04]
cmp eax, dword [ebp - 0x2f0]
jae 0x40f42b
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 0x40f429
jmp 0x40f42b
jmp 0x40f3f0
mov edx, dword [ebp - 0xb04]
cmp edx, dword [ebp - 0x2f0]
jne 0x40f469
cmp dword [ebp - 0x2f0], 0x40
jae 0x40f469
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 0x40f3e4
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 0x40f4ab
cmp dword [ebp - 0xafc], 0xffffffff
jne 0x40f4ab
or eax, 0xffffffff
jmp 0x40f780
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 0x40f77d
mov dword [ebp - 0xafc], 1
mov eax, 1
test eax, eax
je 0x40f779
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 0x40f537
mov dword [ebp - 4], 0xffffffff
cmp dword [ebp - 0xafc], 0
jle 0x40f74e
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 0x5bb4d0
lea eax, [ebp - 0xaf0]
push eax
call fcn.0040ddd0
add esp, 8
test eax, eax
jne 0x40f59c
push 0x5bb4e0
lea ecx, [ebp - 0xaf0]
push ecx
call fcn.0040ddd0
add esp, 8
test eax, eax
je 0x40f74e
mov edx, dword [ebp - 0xda4]
add edx, 0xc
push edx
lea eax, [ebp - 0xaf0]
push eax
call fcn.0040ddd0
add esp, 8
test eax, eax
je 0x40f74e
push str.JAMEDIA
lea ecx, [ebp - 0xaf0]
push ecx
call fcn.0040ddd0
add esp, 8
test eax, eax
jne 0x40f74e
push str.HDS_1.0_200_OK
lea edx, [ebp - 0xaf0]
push edx
call fcn.0040ddd0
add esp, 8
test eax, eax
je 0x40f62b
lea eax, [ebp - 0xaf0]
push eax
lea ecx, [ebp - 0xcc0]
push ecx
call fcn.0040e030
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 0x40f67b
push 0x5bb508
lea edx, [ebp - 0xaf0]
push edx
call fcn.0040ddd0
add esp, 8
test eax, eax
je 0x40f67b
lea eax, [ebp - 0xaf0]
push eax
lea ecx, [ebp - 0xd98]
push ecx
call fcn.0040e3d0
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.00453c21
add esp, 4
mov dword [ebp - 0xda0], eax
cmp dword [ebp - 0xda0], 0
je 0x40f6c9
mov eax, dword [ebp - 0xd9c]
push eax
push 0
mov ecx, dword [ebp - 0xda0]
push ecx
call fcn.0055b7e0
add esp, 0xc
mov edx, dword [ebp - 0xda0]
mov dword [ebp - 0xda8], edx
jmp 0x40f6d3
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 0x40f725
mov eax, dword [ebp - 0xbe4]
mov dword [ebp - 0xb00], eax
jmp 0x40f74e
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 0x40f774
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xb00]
mov dword [eax], ecx
mov eax, dword [ebp - 0xaf8]
jmp 0x40f780
jmp 0x40f4d6
xor eax, eax
jmp 0x40f780
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.0055509d
mov esp, ebp
pop ebp
ret 4