Function at 0x50b934
Capabilities:
Get http content length
Query remote server for available data
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffbc
push ebx
xor ebx, ebx
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x50bba4
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [ebp - 0x18], 4
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x14]
push eax
push 0x20000013
mov eax, dword [ebp - 8]
push eax
call sub.wininet.dll_HttpQueryInfoA
test eax, eax
jne 0x50b986
call fcn.0040e904
cmp dword [ebp - 0x14], 0x12c
jb 0x50ba0b
cmp dword [ebp - 0x14], 0x1f4
je 0x50ba0b
xor eax, eax
mov dword [ebp - 0x1c], eax
mov eax, dword [0x5516cc]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 0x10]
call fcn.00404df4
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x20]
call fcn.00404cc0
push eax
push 0x14
mov eax, dword [ebp - 8]
push eax
call sub.wininet.dll_HttpQueryInfoA
test eax, eax
je 0x50ba0b
lea eax, [ebp - 0x20]
mov edx, dword [ebp - 0x10]
call fcn.00404df4
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x44], eax
mov byte [ebp - 0x40], 0xb
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x3c], eax
mov byte [ebp - 0x38], 0
lea eax, [ebp - 0x44]
push eax
push 1
mov ecx, 0x50bbb8
mov dl, 1
mov eax, dword [0x502c24]
call fcn.0040d344
call fcn.004040fc
xor eax, eax
mov dword [ebp - 0x1c], eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x30]
push eax
push 0x20000005
mov eax, dword [ebp - 8]
push eax
call sub.wininet.dll_HttpQueryInfoA
test eax, eax
jne 0x50ba4d
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x2f76
je 0x50ba41
call fcn.0040e904
jmp 0x50ba4d
push 0
call sub.kernel32.dll_SetLastError
xor eax, eax
mov dword [ebp - 0x30], eax
push 0
mov eax, dword [ebp - 0x30]
push eax
mov cl, 2
mov dl, 1
mov eax, dword [ebp - 4]
call fcn.0050a4a0
xor eax, eax
mov dword [ebp - 0x34], eax
xor eax, eax
mov dword [ebp - 0x28], eax
xor eax, eax
mov dword [ebp - 0x2c], eax
jmp 0x50ba77
push 1
call sub.kernel32.dll_Sleep_1
push 0
push 0
lea eax, [ebp - 0x28]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.wininet.dll_InternetQueryDataAvailable
test eax, eax
jne 0x50ba98
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x3e5
je 0x50ba70
mov eax, dword [ebp - 0x28]
inc eax
call fcn.00402b20
mov dword [ebp - 0x24], eax
xor eax, eax
push ebp
push 0x50bb4d
push dword fs:[eax]
mov dword fs:[eax], esp
jmp 0x50babb
push 1
call sub.kernel32.dll_Sleep_1
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x28]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 8]
push eax
call sub.wininet.dll_InternetReadFile
test eax, eax
jne 0x50bae0
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x3e5
je 0x50bab4
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x2ee1
jb 0x50bb10
call sub.kernel32.dll_GetLastError_1
cmp eax, 0x2f8b
ja 0x50bb10
mov eax, dword [ebp - 4]
cmp dword [eax + 0xe4], 0
setne dl
xor dl, 1
mov eax, dword [ebp - 4]
call fcn.0050b150
call sub.kernel32.dll_GetLastError_1
test eax, eax
je 0x50bb23
mov eax, dword [ebp - 0x24]
mov edx, dword [ebp - 0x2c]
mov byte [eax + edx], 0
mov edx, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax]
call dword [ebx + 0x10]
mov eax, dword [ebp - 0x2c]
add dword [ebp - 0x34], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50bb54
mov eax, dword [ebp - 0x24]
call fcn.00402b50
ret