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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x88
mov esi, ecx
mov eax, dword [0x520014]
xor eax, ebp
mov dword [esp + 0x80], eax
mov ecx, dword [0x526b88]
test ecx, ecx
jne 0x4d70b9
movzx eax, byte [esi + 0x1b]
test al, al
jns 0x4d6fc8
mov eax, dword [esi + 0x14]
xor edi, edi
test eax, eax
je 0x4d6fe6
mov ecx, dword [esp + 0x80]
xor ecx, ebp
call fcn.0048f468
mov eax, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
lea edi, [esi + 0x10]
lea eax, [esp + 0x7c]
mov dword [eax], 0
push eax
push 0x8000
push dword [esi + 0x5c]
push dword [esi + 0x58]
call dword [sym.imp.WININET.dll_InternetReadFile]
test eax, eax
je 0x4d70d5
xor eax, eax
lea ecx, [esp + 0x10]
mov dword [ecx], eax
lea edx, [esp + 0xc]
mov dword [edx], 4
push eax
push edx
push ecx
push 0x20000013
push dword [esi + 0x58]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4d7042
cmp dword [esp + 0x10], 0xc8
jne 0x4d713d
mov dword [esp], edi
mov edi, dword [esp + 0x7c]
test edi, edi
je 0x4d707a
mov ecx, dword [esi + 0x48]
mov dword [esp + 4], ecx
mov eax, dword [esi + 0x5c]
mov dword [esp + 8], eax
mov eax, dword [ecx]
mov ebx, dword [eax]
mov ecx, ebx
call dword [section..00cfg]
mov ecx, dword [esp + 4]
push edi
push dword [esp + 0xc]
call ebx
test al, al
je 0x4d719c
cmp dword [esi + 0x44], 0
je 0x4d7089
mov edi, dword [esp + 0x7c]
jmp 0x4d6fce
xor eax, eax
lea ecx, [esp + 0x20]
mov dword [ecx], eax
lea edx, [esp + 0x14]
mov dword [edx], 4
push eax
push edx
push ecx
push 0x20000005
push dword [esi + 0x58]
call dword [sym.imp.WININET.dll_HttpQueryInfoW]
test eax, eax
je 0x4d7080
mov eax, dword [esp + 0x20]
mov dword [esi + 0x44], eax
jmp 0x4d7080
call fcn.004d6f90
mov esi, eax
mov ecx, dword [esp + 0x80]
xor ecx, ebp
call fcn.0048f468
mov eax, esi
jmp 0x4d6fde
lea ecx, [esp + 0x20]
mov edx, str.internet_read_
call fcn.004d6e60
cmp byte [edi + 0xb], 0
jns 0x4d70f3
push dword [edi]
call fcn.0048e90d
add esp, 4
lea esi, [esp + 0x20]
mov eax, dword [esi + 8]
mov dword [edi + 8], eax
movsd xmm0, qword [esi]
movsd qword [edi], xmm0
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x14]
push eax
push edi
call fcn.004bcc70
add esp, 8
mov ecx, esi
push edi
push 0x113
push str.ReadChunk
push 1
call fcn.004bca70
lea ecx, [esp + 0x5c]
push 0x50c544
push str.Download_chunk_error.
jmp 0x4d7177
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x14]
push eax
push edi
call fcn.004bcc70
add esp, 8
lea esi, [esp + 0x20]
mov ecx, esi
push edi
push 0x11c
push str.ReadChunk
push 1
call fcn.004bca70
lea ecx, [esp + 0x5c]
push 0x50c561
push str.HTTP_request_status_isnt_OK
call fcn.004b9460
mov ecx, esi
call fcn.004bcab0
cmp byte [edi + 0xb], 0
jns 0x4d7195
push dword [esp + 0x14]
call fcn.0048e90d
add esp, 4
xor edi, edi
jmp 0x4d6fce
lea ecx, [esp + 0x20]
mov edx, str.write_file_
call fcn.004d6e60
mov edi, dword [esp]
cmp byte [edi + 0xb], 0
jns 0x4d71bd
push dword [edi]
call fcn.0048e90d
add esp, 4
lea esi, [esp + 0x20]
mov eax, dword [esi + 8]
mov dword [edi + 8], eax
movsd xmm0, qword [esi]
movsd qword [edi], xmm0
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edi, [esp + 0x14]
push eax
push edi
call fcn.004bcc70
add esp, 8
mov ecx, esi
push edi
push 0x123
push str.ReadChunk
push 1
call fcn.004bca70
lea ecx, [esp + 0x5c]
push 0x50c57f
push str.Write_file_error.
jmp 0x4d7177