Function at 0x4046e0
Capabilities:
Check http status code
Create http request
Get http content length
Read data from internet
Receive data

Disassembly:
push 0xffffffffffffffff
push 0x4211a1
mov eax, dword fs:[0]
push eax
mov eax, 0x2070
call fcn.0041d9e0
mov eax, dword [0x428040]
xor eax, esp
mov dword [esp + 0x2068], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x428040]
xor eax, esp
push eax
lea eax, [esp + 0x2084]
mov dword fs:[0], eax
mov esi, ecx
mov ebx, edx
mov ebp, dword [esp + 0x2094]
test ebp, ebp
mov edi, dword [esp + 0x2098]
mov dword [esp + 0x34], edi
je 0x404a2d
mov eax, ebp
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x404742
sub eax, edx
sar eax, 1
je 0x404a2d
push ebp
call dword [sym.imp.SHLWAPI.dll_PathIsURLW]
test eax, eax
je 0x404a2d
test edi, edi
je 0x404a2d
cmp dword [esp + 0x209c], 0
jg 0x404781
cmp esi, 0xffffffff
jne 0x404a2d
cmp ebx, esi
jl 0x40478e
cmp esi, 0xffffffff
jne 0x404a2d
mov eax, dword [0x42a3c0]
mov edx, dword [eax + 0xc]
mov ecx, 0x42a3c0
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
push esi
push ebx
push str.Accept:___r_nUser_Agent:_Mozilla_4.0__compatible__MSIE_5.00__Windows_98__r_n
push str._sRange:_bytes_d__d_r_n
lea edi, [esp + 0x28]
mov dword [esp + 0x209c], 0
call fcn.00402bc0
add esp, 0x10
lea esi, [esp + 0x3c]
call fcn.00404bf0
lea eax, [esp + 0x1c]
push eax
mov ecx, ebp
mov byte [esp + 0x2090], 1
call fcn.00401fe0
push eax
mov ecx, esi
push ecx
mov byte [esp + 0x2094], 2
call fcn.00404e20
movzx esi, al
lea eax, [esp + 0x1c]
call fcn.004020f0
test esi, esi
je 0x404a1b
cmp dword [esp + 0x70], 3
jne 0x404a1b
push 0
push 0
push 0
push 0
push 0x4241a4
call dword [sym.imp.WININET.dll_InternetOpenW]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x1c], ebx
je 0x404a1b
mov edi, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea edx, [esp + 0x24]
push edx
push 2
push ebx
mov dword [esp + 0x30], 0x4e20
call edi
mov esi, eax
test esi, esi
je 0x4049fb
push 4
lea eax, [esp + 0x24]
push eax
push 5
push ebx
call edi
mov esi, eax
test esi, esi
je 0x4049fb
push 4
lea ecx, [esp + 0x24]
push ecx
push 5
push ebx
call edi
mov esi, eax
test esi, esi
je 0x4049fb
push 4
lea edx, [esp + 0x24]
push edx
push 6
push ebx
call edi
mov esi, eax
test esi, esi
je 0x4049fb
push 4
lea eax, [esp + 0x24]
push eax
push 6
push ebx
call edi
mov esi, eax
test esi, esi
je 0x4049fb
mov ecx, dword [esp + 0x18]
xor esi, esi
push esi
push 0x44000000
push 0xffffffffffffffff
push ecx
push ebp
push ebx
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
mov edi, eax
cmp edi, esi
je 0x4049f0
mov ebp, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push esi
lea edx, [esp + 0x3c]
push edx
lea eax, [esp + 0x38]
push eax
push 0x20000013
push edi
mov dword [esp + 0x44], esi
mov dword [esp + 0x4c], 4
call ebp
mov esi, eax
test esi, esi
je 0x4049f0
mov eax, dword [esp + 0x30]
cmp eax, 0xc8
je 0x404921
cmp eax, 0x130
je 0x404921
cmp eax, 0xce
je 0x404921
xor esi, esi
jmp 0x4049f0
push 0
lea ecx, [esp + 0x30]
push ecx
lea edx, [esp + 0x30]
push edx
push 0x20000005
push edi
mov dword [esp + 0x3c], 0
mov dword [esp + 0x40], 4
call ebp
mov esi, eax
test esi, esi
je 0x4049f0
mov eax, dword [esp + 0x209c]
cmp dword [esp + 0x28], eax
jbe 0x404963
xor esi, esi
jmp 0x4049f0
push 0x1fff
xor ebp, ebp
lea ecx, [esp + 0x81]
push ebp
push ecx
mov byte [esp + 0x88], 0
call fcn.0040faf0
mov ebx, dword [sym.imp.WININET.dll_InternetReadFile]
add esp, 0xc
lea edx, [esp + 0x24]
push edx
push 0x2000
lea eax, [esp + 0x84]
push eax
push edi
mov dword [esp + 0x34], ebp
call ebx
mov esi, eax
test esi, esi
je 0x4049ec
mov esi, dword [esp + 0x24]
test esi, esi
je 0x4049e7
mov edx, dword [esp + 0x34]
push esi
lea ecx, [esp + 0x80]
push ecx
add edx, ebp
push edx
call fcn.00413320
add esp, 0xc
lea eax, [esp + 0x24]
push eax
push 0x2000
lea ecx, [esp + 0x84]
push ecx
push edi
add ebp, esi
call ebx
mov esi, eax
test esi, esi
jne 0x4049a8
jmp 0x4049ec
mov esi, 1
mov ebx, dword [esp + 0x1c]
test edi, edi
je 0x4049fb
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push ebx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
lea ecx, [esp + 0x3c]
call fcn.00404cf0
lea eax, [esp + 0x18]
call fcn.004020f0
test esi, esi
setne al
jmp 0x404a2f
lea ecx, [esp + 0x3c]
call fcn.00404cf0
lea eax, [esp + 0x18]
call fcn.004020f0
xor al, al
mov ecx, dword [esp + 0x2084]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x2068]
xor ecx, esp
call fcn.0040d942
add esp, 0x207c
ret