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

Disassembly:
push ebp
lea ebp, [esp - 0x2004]
mov eax, 0x2004
call fcn.0040c600
push 0xffffffffffffffff
push 0x4170c8
mov eax, dword fs:[0]
push eax
sub esp, 0xc4
mov eax, dword [0x41e5f4]
xor eax, ebp
mov dword [ebp + 0x2000], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov eax, dword [ebp + 0x2014]
mov esi, dword [ebp + 0x2024]
mov ecx, dword [ebp + 0x2018]
mov edx, dword [ebp + 0x2020]
mov edi, dword [ebp + 0x200c]
mov ebx, dword [ebp + 0x2010]
mov dword [ebp - 0x48], eax
xor eax, eax
cmp esi, eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x1c], edx
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x20], 0x2000
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 4], eax
je 0x4092d7
mov edx, dword [esi]
push eax
mov eax, dword [edx + 4]
push 1
mov ecx, esi
call eax
xor eax, eax
push eax
push eax
push eax
push eax
push str.INetHttpClient
lea ecx, [ebp - 0x54]
call fcn.00403e80
mov ecx, dword [ebp + 0x201c]
mov edx, dword [ebp - 0x50]
push 0
push 3
push 0
push 0
push ecx
push edi
push edx
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 1
call fcn.00404020
mov dword [ebp - 0x44], 0x418614
mov eax, dword [ebp - 0x1c]
mov ecx, dword [ebp - 0x40]
push 0x400000
push 0
push 0
push 0x418784
push ebx
push eax
push ecx
lea ecx, [ebp - 0x30]
mov byte [ebp - 4], 2
call fcn.00404170
test esi, esi
mov byte [ebp - 4], 3
je 0x409347
mov edx, dword [esi]
mov eax, dword [edx + 4]
push 0
push 2
mov ecx, esi
call eax
mov ecx, dword [ebp - 0x2c]
push 0
push 0
push 0xffffffffffffffff
push 0
push ecx
call dword [sym.imp.WININET.dll_HttpSendRequestW]
test eax, eax
jne 0x409386
mov edx, dword [ebp - 0x2c]
push str.Failed_to_send_http_request
push edx
lea eax, [ebp - 0xd0]
push eax
call fcn.00403c40
add esp, 0xc
push 0x41b74c
lea ecx, [ebp - 0xd0]
push ecx
call fcn.0040ba9a
mov eax, dword [ebp - 0x2c]
push 0
push 0
lea edx, [ebp - 0x18]
push edx
push eax
mov dword [ebp - 0x1c], 0
mov byte [ebp - 4], 4
call dword [sym.imp.WININET.dll_InternetQueryDataAvailable]
test eax, eax
jne 0x4093e2
mov ecx, dword [ebp - 0x2c]
push str.Failed_to_query_available_data_length
push ecx
lea edx, [ebp - 0x88]
push edx
call fcn.00403c40
add esp, 0xc
push 0x41b74c
lea eax, [ebp - 0x88]
push eax
call fcn.0040ba9a
mov dword [ebp - 4], 3
mov eax, 0x4093dd
ret
mov ecx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 4], 3
test esi, esi
je 0x409400
mov edx, dword [esi]
mov eax, dword [edx + 4]
push 0
push 3
mov ecx, esi
call eax
push 1
push 0x2000
call fcn.0040c962
push 0x1fff
lea ecx, [ebp + 1]
mov edi, eax
push 0
push ecx
mov dword [ebp - 0x24], edi
mov byte [ebp], 0
call fcn.0040ba20
add esp, 0x14
mov ecx, dword [ebp - 0x2c]
lea edx, [ebp - 0x18]
push edx
push 0x2000
lea eax, [ebp]
push eax
push ecx
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
jne 0x409471
mov edx, dword [ebp - 0x2c]
push 0x2000
push 0x418618
push edx
lea eax, [ebp - 0xb8]
push eax
call fcn.00403c40
add esp, 0x10
push 0x41b74c
lea ecx, [ebp - 0xb8]
push ecx
call fcn.0040ba9a
mov ebx, dword [ebp - 0x18]
test ebx, ebx
je 0x409549
test esi, esi
je 0x4094bd
mov edx, dword [esi]
mov eax, dword [edx + 8]
mov ecx, esi
call eax
test al, al
je 0x4094bd
mov edx, dword [esi]
mov eax, dword [edx + 4]
push 0
push 0xffffffffffffffff
mov ecx, esi
call eax
mov ecx, dword [ebp - 0x2c]
push str._u7b
push ecx
lea edx, [ebp - 0x70]
push edx
call fcn.00403c40
add esp, 0xc
push 0x41b74c
lea eax, [ebp - 0x70]
push eax
call fcn.0040ba9a
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x20]
add ebx, ecx
cmp ebx, eax
jbe 0x4094ea
add eax, 0x2000
push eax
push edi
mov dword [ebp - 0x20], eax
call fcn.0040bf91
mov edi, eax
add esp, 8
test edi, edi
mov dword [ebp - 0x24], edi
je 0x409520
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
push eax
lea ecx, [ebp]
push ecx
lea eax, [edi + edx]
push eax
call fcn.0040c9b0
add esp, 0xc
test esi, esi
mov dword [ebp - 0x14], ebx
je 0x409428
mov eax, dword [ebp - 0x1c]
mov edx, dword [esi]
mov edx, dword [edx]
push eax
mov ecx, ebx
push ecx
mov ecx, esi
call edx
jmp 0x409428
mov eax, dword [ebp - 0x2c]
push 0x418d20
push eax
lea ecx, [ebp - 0xa0]
push ecx
call fcn.00403c40
add esp, 0xc
push 0x41b74c
lea edx, [ebp - 0xa0]
push edx
call fcn.0040ba9a
test esi, esi
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x38]
mov dword [eax], edi
mov dword [edx], ecx
je 0x409567
mov eax, dword [esi]
mov edx, dword [eax + 4]
push 0
push 4
mov ecx, esi
call edx
mov eax, dword [ebp - 0x2c]
test eax, eax
mov esi, dword [sym.imp.WININET.dll_InternetCloseHandle]
mov edi, vtable.CInternetHandle.0
mov dword [ebp - 0x30], edi
je 0x409586
push eax
call esi
mov dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x40]
test eax, eax
mov dword [ebp - 0x44], edi
je 0x40959a
push eax
call esi
mov dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x50]
test eax, eax
mov dword [ebp - 0x54], edi
je 0x4095a7
push eax
call esi
mov eax, 1
jmp 0x4095dd
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2000]
xor ecx, ebp
call fcn.0040ba0c
add ebp, 0x2004
mov esp, ebp
pop ebp
ret 0x1c