Function at 0x4878d0
Capabilities:
Get common file path
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffff004
push eax
add esp, 0xfffffd5c
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x12a4], ebx
mov dword [ebp - 0x12a0], ebx
mov dword [ebp - 0x129c], ebx
mov dword [ebp - 0x1298], ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ecx
mov esi, edx
mov ebx, eax
mov eax, dword [ebp - 4]
call fcn.00404e28
mov eax, dword [ebp + 8]
call fcn.00404e28
xor eax, eax
push ebp
push 0x487c0b
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 5], 0
mov eax, dword [ebx + 0x15]
push eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebx + 0x11]
mov edx, dword [ebp - 4]
mov eax, ebx
call fcn.004874dc
mov edi, 0x84000100
cmp byte [ebx + 0x26], 0
je 0x487952
or edi, 0x400000
push 0
push edi
push 0
push 0
mov eax, dword [ebp - 0x14]
call fcn.00404e38
push eax
push esi
call sub.wininet.dll_InternetOpenUrlA
mov esi, eax
mov dword [ebp - 0x1c], 4
xor eax, eax
mov dword [ebp - 0x20], eax
test esi, esi
je 0x4879c8
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x20000013
push esi
call sub.wininet.dll_HttpQueryInfoA
cmp dword [ebp - 0x24], 0x12c
jb 0x4879c8
push 6
mov eax, dword [ebp - 0x24]
push eax
mov eax, dword [ebp - 0x24]
xor edx, edx
push edx
push eax
lea eax, [ebp - 0x1298]
call fcn.004093e8
mov ecx, dword [ebp - 0x1298]
mov edx, 0x394
mov eax, ebx
mov ebx, dword [eax]
call dword [ebx]
jmp 0x487bd0
test esi, esi
jne 0x4879e3
push 2
push 1
mov ecx, dword [ebp - 4]
mov edx, 0x395
mov eax, ebx
mov ebx, dword [eax]
call dword [ebx]
jmp 0x487bd0
lea eax, [ebp - 0x112b]
push eax
push 0
push 0x487c20
mov eax, dword [ebx + 0x1e]
call fcn.00404e38
push eax
call sub.kernel32.dll_GetTempFileNameA
lea eax, [ebp - 0x129c]
lea edx, [ebp - 0x112b]
mov ecx, 0x105
call fcn.00404bf0
mov edx, dword [ebp - 0x129c]
lea eax, [ebp - 0x1278]
call fcn.00402f14
mov edx, 1
lea eax, [ebp - 0x1278]
call fcn.004033ec
call fcn.004028bc
mov dword [ebp - 0xc], 0x1000
xor eax, eax
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x1c], 4
xor eax, eax
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x20000005
push esi
call sub.wininet.dll_HttpQueryInfoA
xor eax, eax
mov dword [ebp - 0x18], eax
mov byte [ebp - 0x25], 0
mov byte [ebp - 0x26], 0
jmp 0x487b3d
cmp dword [ebp - 0x1290], 0x12
je 0x487a9f
lea eax, [ebp - 0x1294]
push eax
call sub.user32.dll_TranslateMessage
lea eax, [ebp - 0x1294]
push eax
call sub.user32.dll_DispatchMessageA
push 1
push 0
push 0
push 0
lea eax, [ebp - 0x1294]
push eax
call sub.user32.dll_PeekMessageA
test eax, eax
jne 0x487a7e
lea eax, [ebp - 0xc]
push eax
push 0x1000
lea eax, [ebp - 0x1026]
push eax
push esi
call sub.wininet.dll_InternetReadFile
test eax, eax
jne 0x487ad7
mov byte [ebp - 0x26], 1
jmp 0x487b4d
cmp dword [ebp - 0xc], 0
jbe 0x487b01
cmp dword [ebp - 0xc], 0x1000
ja 0x487b01
push 0
lea edx, [ebp - 0x1026]
mov ecx, dword [ebp - 0xc]
lea eax, [ebp - 0x1278]
call fcn.00403098
call fcn.004028bc
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x18], eax
cmp word [ebx + 0x43], 0
je 0x487b21
mov eax, dword [ebp - 0x18]
push eax
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, ebx
mov eax, dword [ebx + 0x45]
call dword [ebx + 0x41]
cmp word [ebx + 0x3b], 0
je 0x487b33
lea ecx, [ebp - 0x25]
mov edx, ebx
mov eax, dword [ebx + 0x3d]
call dword [ebx + 0x39]
cmp dword [ebp - 0xc], 0
jbe 0x487b3d
mov byte [ebp - 5], 1
cmp dword [ebp - 0xc], 0
jbe 0x487b4d
cmp byte [ebp - 0x25], 0
je 0x487a9f
push esi
call sub.wininet.dll_InternetCloseHandle
lea eax, [ebp - 0x1278]
call fcn.004030b8
call fcn.004028bc
mov al, byte [ebp - 0x25]
mov byte [ebx + 0x2f], al
mov al, byte [ebp - 0x25]
or al, byte [ebp - 0x26]
je 0x487b93
lea edx, [ebp - 0x12a0]
lea eax, [ebp - 0x112b]
call fcn.0040a12c
mov eax, dword [ebp - 0x12a0]
call fcn.00409bfc
mov byte [ebp - 5], 0
jmp 0x487bd0
mov eax, dword [ebp + 8]
call fcn.0040990c
test al, al
je 0x487ba7
mov eax, dword [ebp + 8]
call fcn.00409bfc
lea edx, [ebp - 0x12a4]
lea eax, [ebp - 0x112b]
call fcn.0040a12c
mov eax, dword [ebp - 0x12a4]
mov edx, dword [ebp + 8]
call fcn.00409c14
mov edx, dword [ebp + 8]
mov eax, ebx
mov ecx, dword [eax]
call dword [ecx + 4]
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x487c12
lea eax, [ebp - 0x12a4]
mov edx, 4
call fcn.004049ac
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004049ac
lea eax, [ebp - 4]
call fcn.00404988
lea eax, [ebp + 8]
call fcn.00404988
ret