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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x424f67
mov eax, dword fs:[0]
push eax
sub esp, 0x80
push ebx
push esi
push edi
mov eax, dword [0x430050]
xor eax, esp
push eax
lea eax, [esp + 0x90]
mov dword fs:[0], eax
mov ebx, dword [ebp + 8]
xor esi, esi
cmp ebx, esi
je 0x406add
mov eax, ebx
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x4062af
sub eax, edx
sar eax, 1
je 0x406add
push ebx
call dword [sym.imp.SHLWAPI.dll_PathIsURLW]
test eax, eax
je 0x406add
cmp dword [ebp + 0x14], esi
je 0x406a7f
cmp dword [ebp + 0x18], esi
jg 0x4062ea
cmp dword [ebp + 0x10], 0xffffffff
jne 0x406a7f
mov eax, dword [ebp + 0x10]
cmp dword [ebp + 0xc], eax
jl 0x406368
cmp eax, 0xffffffff
je 0x406368
cmp dword [0x43159c], 0xffffffff
je 0x406b51
mov eax, dword [0x4322e4]
mov ecx, 0x4322e4
mov dword [esp + 0x2c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
push str.DownloadFileChunk_parma_start_and_end_size_error_n
lea eax, [esp + 0x3c]
mov dword [esp + 0x9c], 2
call fcn.00404d5a
mov edi, dword [esp + 0x3c]
pop ecx
push edi
lea eax, [esp + 0x34]
push eax
call fcn.00403fc0
push esi
lea eax, [esp + 0x30]
push eax
mov eax, dword [esp + 0x38]
push dword [eax - 0xc]
push eax
push dword [0x43159c]
call dword [0x42707c]
mov eax, dword [esp + 0x30]
jmp 0x406b41
lea edi, [esp + 0x4c]
call fcn.00406b99
push ebx
lea eax, [esp + 0x40]
push eax
mov dword [esp + 0xa0], 3
call fcn.0040417c
push eax
mov ebx, edi
mov byte [esp + 0x9c], 4
call fcn.00406c86
movzx edi, al
mov byte [esp + 0x98], 3
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
call fcn.004054c6
cmp edi, esi
je 0x406a11
cmp dword [esp + 0x80], 3
jne 0x406a11
push esi
push esi
push esi
push esi
push 0x42a120
call dword [sym.imp.WININET.dll_InternetOpenW]
cmp eax, esi
mov dword [esp + 0x18], eax
jne 0x406462
cmp dword [0x43159c], 0xffffffff
je 0x406454
mov eax, dword [0x4322e4]
mov ecx, 0x4322e4
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
push str.DownloadFileChunk__InternetOpen_error_n
lea eax, [esp + 0x3c]
mov byte [esp + 0x9c], 6
call fcn.00404d5a
mov edi, dword [esp + 0x3c]
pop ecx
push edi
lea eax, [esp + 0x34]
push eax
call fcn.00403fc0
push esi
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x38]
push dword [eax - 0xc]
push eax
push dword [0x43159c]
call dword [0x42707c]
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
call fcn.004054c6
lea eax, [edi - 0x10]
call fcn.004054c6
lea ecx, [esp + 0x4c]
call fcn.00406c13
jmp 0x406b51
mov eax, dword [0x4322e4]
mov edi, 0x4322e4
mov ecx, edi
mov dword [esp + 0x20], 0xbb8
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x30], eax
cmp dword [ebp + 0x1c], esi
mov byte [esp + 0x98], 7
jne 0x4064a4
push dword [ebp + 0x10]
lea eax, [esp + 0x34]
push dword [ebp + 0xc]
push str.Range:_bytes_d__d_r_n
call fcn.00404d5a
add esp, 0xc
mov ebx, dword [sym.imp.WININET.dll_InternetSetOptionW]
push 4
lea eax, [esp + 0x24]
push eax
push 2
push dword [esp + 0x24]
call ebx
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x40653c
cmp dword [0x43159c], 0xffffffff
je 0x4069e6
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x98], 8
push str.DownloadFileChunk__InternetSetOption1_error_n
lea eax, [esp + 0x3c]
call fcn.00404d5a
mov edi, dword [esp + 0x3c]
pop ecx
push edi
lea eax, [esp + 0x30]
push eax
call fcn.00403fc0
push esi
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x34]
push dword [eax - 0xc]
push eax
push dword [0x43159c]
call dword [0x42707c]
mov eax, dword [esp + 0x2c]
add eax, 0xfffffff0
call fcn.004054c6
lea eax, [edi - 0x10]
call fcn.004054c6
jmp 0x4069e6
push 4
lea eax, [esp + 0x24]
push eax
push 5
push dword [esp + 0x24]
call ebx
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x406587
cmp dword [0x43159c], 0xffffffff
je 0x4069e6
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x98], 9
push str.DownloadFileChunk__InternetSetOption2_error_n
jmp 0x4064f0
push 4
lea eax, [esp + 0x24]
push eax
push 5
push dword [esp + 0x24]
call ebx
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x4065d2
cmp dword [0x43159c], 0xffffffff
je 0x4069e6
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x98], 0xa
push str.DownloadFileChunk__InternetSetOption3_error_n
jmp 0x4064f0
push 4
lea eax, [esp + 0x24]
push eax
push 6
push dword [esp + 0x24]
call ebx
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x40661d
cmp dword [0x43159c], 0xffffffff
je 0x4069e6
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x98], 0xb
push str.DownloadFileChunk__InternetSetOption4_error_n
jmp 0x4064f0
push 4
lea eax, [esp + 0x24]
push eax
push 6
push dword [esp + 0x24]
call ebx
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x406668
cmp dword [0x43159c], 0xffffffff
je 0x4069e6
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x98], 0xc
push str.DownloadFileChunk__InternetSetOption5_error_n
jmp 0x4064f0
push esi
push 0x44000000
push 0xffffffffffffffff
push dword [esp + 0x3c]
push dword [ebp + 8]
push dword [esp + 0x2c]
call dword [sym.imp.WININET.dll_InternetOpenUrlW]
cmp eax, esi
mov dword [esp + 0x2c], eax
jne 0x40671a
cmp dword [0x43159c], 0xffffffff
je 0x406711
call dword [0x42706c]
mov ebx, eax
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x98], 0xd
push dword [esp + 0x30]
lea eax, [esp + 0x3c]
push dword [ebp + 8]
push ebx
push str.DownloadFileChunk__InternetOpenUrl_Errorcode_d__fileurl_s_header_s_n
call fcn.00404d5a
add esp, 0x10
mov edi, dword [esp + 0x38]
push edi
lea eax, [esp + 0x2c]
push eax
call fcn.00403fc0
push esi
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x30]
push dword [eax - 0xc]
push eax
push dword [0x43159c]
call dword [0x42707c]
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
call fcn.004054c6
lea eax, [edi - 0x10]
call fcn.004054c6
mov dword [esp + 0x14], esi
jmp 0x4069d6
mov ebx, dword [sym.imp.WININET.dll_HttpQueryInfoW]
push esi
lea ecx, [esp + 0x44]
push ecx
lea ecx, [esp + 0x2c]
push ecx
push 0x20000013
push eax
mov dword [esp + 0x38], esi
mov dword [esp + 0x54], 4
call ebx
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x4067c2
cmp dword [0x43159c], 0xffffffff
je 0x4069d6
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x98], 0xe
push str.DownloadFileChunk__HttpQueryInfo_Error_n
lea eax, [esp + 0x3c]
call fcn.00404d5a
mov edi, dword [esp + 0x3c]
pop ecx
push edi
lea eax, [esp + 0x2c]
push eax
call fcn.00403fc0
push esi
lea eax, [esp + 0x40]
push eax
mov eax, dword [esp + 0x30]
push dword [eax - 0xc]
push eax
push dword [0x43159c]
call dword [0x42707c]
mov eax, dword [esp + 0x28]
add eax, 0xfffffff0
call fcn.004054c6
lea eax, [edi - 0x10]
call fcn.004054c6
jmp 0x4069d6
cmp dword [esp + 0x24], 0xc8
je 0x406823
cmp dword [esp + 0x24], 0x130
je 0x406823
cmp dword [esp + 0x24], 0xce
je 0x406823
cmp dword [0x43159c], 0xffffffff
je 0x406711
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x98], 0xf
push dword [esp + 0x24]
lea eax, [esp + 0x3c]
push str.DownloadFileChunk__HttpQueryInfo_status_d_n
call fcn.00404d5a
pop ecx
pop ecx
jmp 0x4066d4
push esi
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x3c]
push eax
push 0x20000005
push dword [esp + 0x3c]
mov dword [esp + 0x48], esi
mov dword [esp + 0x58], 4
call ebx
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x406881
cmp dword [0x43159c], 0xffffffff
je 0x4069d6
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
mov byte [esp + 0x98], 0x10
push str.DownloadFileChunk__HttpQueryInfo2_Error_n
jmp 0x406776
mov ebx, dword [ebp + 0x18]
cmp dword [esp + 0x34], ebx
jbe 0x4068cf
cmp dword [0x43159c], 0xffffffff
je 0x406711
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x3c], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
push ebx
mov byte [esp + 0x9c], 0x11
push dword [esp + 0x38]
lea eax, [esp + 0x40]
push str.DownloadFileChunk__HttpQueryInfo2_return_and_dwContentLength__d_large_nBufferSize__d__n
call fcn.00404d5a
add esp, 0xc
jmp 0x4066d4
mov ebx, 0x2000
push ebx
call fcn.0040e12c
push ebx
push esi
push eax
mov dword [esp + 0x38], eax
mov dword [esp + 0x48], esi
call fcn.00411d70
add esp, 0x10
jmp 0x406926
cmp dword [esp + 0x1c], esi
je 0x4069c4
push dword [esp + 0x1c]
mov eax, dword [ebp + 0x14]
mov ecx, dword [esp + 0x3c]
push dword [esp + 0x2c]
add ecx, eax
push ecx
call fcn.00416910
mov eax, dword [esp + 0x28]
add dword [esp + 0x44], eax
push ebx
push esi
push dword [esp + 0x3c]
call fcn.00411d70
add esp, 0x18
lea eax, [esp + 0x1c]
push eax
push ebx
push dword [esp + 0x30]
mov dword [esp + 0x28], esi
push dword [esp + 0x38]
call dword [sym.imp.WININET.dll_InternetReadFile]
cmp eax, esi
mov dword [esp + 0x14], eax
jne 0x4068ef
call dword [0x42706c]
cmp dword [0x43159c], 0xffffffff
mov ebx, eax
je 0x4069cc
mov eax, dword [0x4322e4]
mov ecx, edi
mov dword [esp + 0x48], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x38], eax
push ebx
push str.DownloadFileChunk__InternetReadFile_Failed__errorcode_d_n
lea eax, [esp + 0x40]
mov byte [esp + 0xa0], 0x12
call fcn.00404d5a
mov edi, dword [esp + 0x40]
pop ecx
pop ecx
push edi
lea eax, [esp + 0x40]
push eax
call fcn.00403fc0
push esi
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x44]
push dword [eax - 0xc]
push eax
push dword [0x43159c]
call dword [0x42707c]
mov eax, dword [esp + 0x3c]
add eax, 0xfffffff0
call fcn.004054c6
lea eax, [edi - 0x10]
call fcn.004054c6
jmp 0x4069cc
mov dword [esp + 0x14], 1
push dword [esp + 0x28]
call fcn.0040f1c4
pop ecx
cmp dword [esp + 0x2c], esi
je 0x4069e6
push dword [esp + 0x2c]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push dword [esp + 0x18]
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov eax, dword [esp + 0x30]
add eax, 0xfffffff0
call fcn.004054c6
lea ecx, [esp + 0x4c]
call fcn.00406c13
cmp dword [esp + 0x14], esi
setne al
jmp 0x406b53
cmp dword [0x43159c], 0xffffffff
je 0x406454
mov eax, dword [0x4322e4]
mov ecx, 0x4322e4
mov dword [esp + 0x48], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x3c], eax
push str.DownloadFileChunk__CUrlParser_Parse_error_n
lea eax, [esp + 0x40]
mov byte [esp + 0x9c], 5
call fcn.00404d5a
mov edi, dword [esp + 0x40]
pop ecx
push edi
lea eax, [esp + 0x3c]
push eax
call fcn.00403fc0
push esi
lea eax, [esp + 0x4c]
push eax
mov eax, dword [esp + 0x40]
push dword [eax - 0xc]
push eax
push dword [0x43159c]
call dword [0x42707c]
mov eax, dword [esp + 0x38]
jmp 0x406444
cmp dword [0x43159c], 0xffffffff
je 0x406b51
mov eax, dword [0x4322e4]
mov ecx, 0x4322e4
mov dword [esp + 0x38], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x3c], eax
push str.DownloadFileChunk_parma_pBuffer_error_n
lea eax, [esp + 0x40]
mov dword [esp + 0x9c], 1
call fcn.00404d5a
pop ecx
push esi
mov esi, dword [esp + 0x40]
lea eax, [esp + 0x3c]
push eax
push dword [esi - 0xc]
push esi
push dword [0x43159c]
call dword [0x42707c]
lea eax, [esi - 0x10]
jmp 0x406b4c
cmp dword [0x43159c], 0xffffffff
je 0x406b51
mov eax, dword [0x4322e4]
mov ecx, 0x4322e4
mov dword [esp + 0x30], esi
call dword [eax + 0xc]
add eax, 0x10
mov dword [esp + 0x3c], eax
push str.DownloadFileChunk_parma_pszFileUrl_error_n
lea eax, [esp + 0x40]
mov dword [esp + 0x9c], esi
call fcn.00404d5a
mov edi, dword [esp + 0x40]
pop ecx
push edi
lea eax, [esp + 0x3c]
push eax
call fcn.00403fc0
push esi
lea eax, [esp + 0x34]
push eax
mov eax, dword [esp + 0x40]
push dword [eax - 0xc]
push eax
push dword [0x43159c]
call dword [0x42707c]
mov eax, dword [esp + 0x38]
add eax, 0xfffffff0
call fcn.004054c6
lea eax, [edi - 0x10]
call fcn.004054c6
xor al, al
mov ecx, dword [esp + 0x90]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret