Function at 0x40c310
Capabilities:
Query remote server for available data
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x9c
mov eax, dword [0x4d2714]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
push esi
lea ecx, [ebp - 0x94]
push ecx
lea edx, [ebp - 0x44]
push edx
push 5
push edi
mov dword [ebp - 0x9c], edi
mov dword [ebp - 0x98], eax
mov byte [ebp - 0x61], 0
mov dword [ebp - 0x94], 0x40
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x48], 0xf
mov dword [ebp - 0x4c], esi
mov byte [ebp - 0x5c], 0
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x40c3bc
push 0xa
lea eax, [ebp - 0x44]
push esi
push eax
mov byte [ebp - 0x61], 1
call fcn.0042579f
mov ecx, eax
mov eax, dword [ebp - 0x4c]
add esp, 0xc
mov dword [ebp - 0x68], ecx
cmp eax, ecx
ja 0x40c3bc
cmp dword [ebp - 0x48], ecx
je 0x40c3bc
mov edx, ecx
push 1
push edx
lea ecx, [ebp - 0x60]
mov esi, eax
call fcn.00401a80
test al, al
je 0x40c3bc
cmp dword [ebp - 0x48], 0x10
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x4c], esi
jae 0x40c3b8
lea eax, [ebp - 0x5c]
mov byte [eax + esi], 0
push 0
push 0
lea eax, [ebp - 0x8c]
push eax
push edi
mov dword [ebp - 0x6c], 0
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
mov edi, eax
test edi, edi
je 0x40c4fe
nop
mov esi, dword [ebp - 0x8c]
xor ebx, ebx
cmp esi, ebx
jbe 0x40c52a
push 4
call fcn.0042315c
add esp, 4
cmp eax, ebx
je 0x40c40e
lea ecx, [ebp - 0x84]
mov dword [eax], ecx
mov dword [ebp - 0x84], eax
jmp 0x40c414
mov dword [ebp - 0x84], ebx
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x70], ebx
cmp esi, ebx
je 0x40c461
cmp esi, 0xffffffff
jbe 0x40c434
call fcn.004184b0
mov eax, dword [ebp - 0x78]
jmp 0x40c447
push ebx
push esi
call fcn.004011d0
lea edx, [eax + esi]
add esp, 8
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x70], edx
mov edi, eax
cmp esi, ebx
jbe 0x40c45b
push esi
push ebx
push eax
call fcn.004231d0
mov eax, dword [ebp - 0x78]
add esp, 0xc
lea ecx, [edi + esi]
mov dword [ebp - 0x74], ecx
sub ecx, eax
jne 0x40c46d
call fcn.004233cd
mov eax, dword [ebp - 0x78]
mov edx, dword [ebp - 0x8c]
mov esi, dword [ebp - 0x9c]
lea ecx, [ebp - 0x90]
push ecx
push edx
push eax
push esi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov edi, eax
cmp edi, ebx
je 0x40c502
mov eax, dword [ebp - 0x90]
cmp eax, ebx
jbe 0x40c502
mov ecx, dword [ebp - 0x74]
add dword [ebp - 0x6c], eax
sub ecx, dword [ebp - 0x78]
jne 0x40c4af
call fcn.004233cd
mov eax, dword [ebp - 0x90]
mov edx, dword [ebp - 0x78]
push eax
push edx
lea ecx, [ebp - 0x60]
call fcn.004021e0
mov eax, dword [ebp - 0x78]
cmp eax, ebx
je 0x40c4cc
push eax
call fcn.0042305c
add esp, 4
mov eax, dword [ebp - 0x84]
push eax
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
call fcn.0042305c
add esp, 4
push ebx
push ebx
lea ecx, [ebp - 0x8c]
push ecx
push esi
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
mov edi, eax
cmp edi, ebx
jne 0x40c3e0
xor bl, bl
jmp 0x40c57c
mov eax, dword [ebp - 0x78]
cmp eax, ebx
je 0x40c512
push eax
call fcn.0042305c
add esp, 4
mov edx, dword [ebp - 0x84]
push edx
mov dword [ebp - 0x78], ebx
mov dword [ebp - 0x74], ebx
mov dword [ebp - 0x70], ebx
call fcn.0042305c
add esp, 4
cmp edi, ebx
je 0x40c4fe
cmp byte [ebp - 0x61], 0
je 0x40c53c
mov eax, dword [ebp - 0x68]
cmp dword [ebp - 0x6c], eax
jne 0x40c4fe
mov esi, dword [ebp - 0x98]
mov bl, 1
test esi, esi
je 0x40c57c
lea ecx, [ebp - 0x60]
push ecx
lea edx, [ebp - 0x88]
push edx
call fcn.0040b900
add esp, 8
push 0xffffffffffffffff
push 0
push eax
mov ecx, esi
call fcn.00402300
cmp dword [ebp - 0x70], 8
jb 0x40c57c
mov eax, dword [ebp - 0x84]
push eax
call fcn.0042305c
add esp, 4
cmp dword [ebp - 0x48], 0x10
jb 0x40c58e
mov ecx, dword [ebp - 0x5c]
push ecx
call fcn.0042305c
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
pop esi
mov al, bl
xor ecx, ebp
pop ebx
call fcn.004235d5
mov esp, ebp
pop ebp
ret