Function at 0x40f5f0
Capabilities:
Print debug messages
Query remote server for available data
Read data from internet
Receive data

Disassembly:
sub esp, 0x98
mov eax, dword [0x430400]
xor eax, esp
mov dword [esp + 0x94], eax
mov eax, dword [esp + 0xa0]
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xac]
xor ebx, ebx
push ebx
lea ecx, [esp + 0x44]
push ecx
lea edx, [esp + 0x6c]
push edx
push 5
push edi
mov dword [esp + 0x58], eax
mov byte [esp + 0x26], bl
mov dword [esp + 0x54], 0x40
mov dword [esp + 0x28], ebx
mov dword [esp + 0x74], 0xf
mov dword [esp + 0x70], ebx
mov byte [esp + 0x60], bl
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x40f6a7
push 0xa
lea eax, [esp + 0x68]
push ebx
push eax
mov byte [esp + 0x1e], 1
call fcn.00414d9a
mov ecx, eax
mov eax, dword [esp + 0x68]
add esp, 0xc
mov dword [esp + 0x14], ecx
cmp eax, ecx
ja 0x40f6a7
cmp dword [esp + 0x60], ecx
je 0x40f6a7
mov edx, ecx
push 1
push edx
lea ecx, [esp + 0x50]
mov esi, eax
call fcn.004069b0
test al, al
je 0x40f6a7
cmp dword [esp + 0x60], 0x10
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x5c], esi
jae 0x40f6a4
lea eax, [esp + 0x4c]
mov byte [eax + esi], bl
mov ebp, dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
push ebx
push ebx
lea eax, [esp + 0x24]
push eax
push edi
mov dword [esp + 0x28], ebx
call ebp
mov esi, eax
cmp esi, ebx
je 0x40f7a6
jmp 0x40f6d0
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jbe 0x40f7d6
push 4
mov esi, eax
call fcn.0041158e
add esp, 4
cmp eax, ebx
je 0x40f6f8
lea ecx, [esp + 0x20]
mov dword [eax], ecx
mov dword [esp + 0x20], eax
jmp 0x40f6fc
mov dword [esp + 0x20], ebx
lea edx, [esp + 0x13]
push edx
push esi
lea ecx, [esp + 0x28]
mov byte [esp + 0x1b], bl
call fcn.0040f3f0
mov eax, dword [esp + 0x30]
sub eax, dword [esp + 0x2c]
jne 0x40f71e
call fcn.00413aad
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x2c]
lea ecx, [esp + 0x3c]
push ecx
push edx
push eax
push edi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov esi, eax
cmp esi, ebx
je 0x40f7ac
mov eax, dword [esp + 0x3c]
cmp eax, ebx
jbe 0x40f7ac
mov ecx, dword [esp + 0x30]
add dword [esp + 0x18], eax
sub ecx, dword [esp + 0x2c]
jne 0x40f759
call fcn.00413aad
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 0x2c]
push eax
push edx
lea ecx, [esp + 0x50]
call fcn.0040e9a0
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x40f779
push eax
call fcn.004114eb
add esp, 4
mov eax, dword [esp + 0x20]
push eax
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.004114eb
add esp, 4
push ebx
push ebx
lea ecx, [esp + 0x24]
push ecx
push edi
call ebp
mov esi, eax
cmp esi, ebx
jne 0x40f6d0
mov byte [esp + 0x12], bl
jmp 0x40f828
mov eax, dword [esp + 0x2c]
cmp eax, ebx
je 0x40f7bd
push eax
call fcn.004114eb
add esp, 4
mov edx, dword [esp + 0x20]
push edx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x34], ebx
mov dword [esp + 0x38], ebx
call fcn.004114eb
add esp, 4
cmp esi, ebx
je 0x40f7a6
cmp byte [esp + 0x12], bl
je 0x40f7ea
mov eax, dword [esp + 0x14]
cmp dword [esp + 0x18], eax
jne 0x40f7a6
mov esi, dword [esp + 0x44]
mov byte [esp + 0x12], 1
cmp esi, ebx
je 0x40f828
lea ecx, [esp + 0x48]
push ecx
lea edx, [esp + 0x24]
push edx
call fcn.0040f000
add esp, 8
push 0xffffffffffffffff
push ebx
push eax
mov ecx, esi
call fcn.00403650
cmp dword [esp + 0x38], 8
jb 0x40f828
mov eax, dword [esp + 0x24]
push eax
call fcn.004114eb
add esp, 4
push str.read_response_succeed
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [esp + 0x60], 0x10
pop edi
pop esi
pop ebp
pop ebx
jb 0x40f84b
mov ecx, dword [esp + 0x3c]
push ecx
call fcn.004114eb
add esp, 4
mov ecx, dword [esp + 0x94]
mov al, byte [esp + 2]
xor ecx, esp
call fcn.0041139e
add esp, 0x98
ret