Function at 0x46c700
Capabilities:
Create http request
Get http content length
Read data from internet
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x494408
mov eax, dword fs:[0]
push eax
sub esp, 0x44
mov eax, dword [0x4c56f0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
push 0
push 0
push 0
push 1
push 0
mov dword [ebp - 0x48], eax
call dword [sym.imp.WININET.dll_InternetOpenA]
mov edi, eax
test edi, edi
jne 0x46c761
push 0x21d
push str.libfm::fm_impl::download_data
call fcn.0040a540
add esp, 8
jmp 0x46c96b
cmp dword [esi + 0x14], 0x10
jb 0x46c769
mov esi, dword [esi]
push 0
push 0x102
push 0
push 0
push esi
push edi
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov esi, eax
mov dword [ebp - 0x38], esi
test esi, esi
jne 0x46c7a3
push 0x225
push str.libfm::fm_impl::download_data
call fcn.0040a540
add esp, 8
push edi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x46c96b
mov edi, dword [sym.imp.WININET.dll_HttpQueryInfoA]
push 0
lea ecx, [ebp - 0x50]
push ecx
lea edx, [ebp - 0x3c]
push edx
push 0x20000013
mov ebx, 4
push esi
mov dword [ebp - 0x50], ebx
call edi
test eax, eax
je 0x46c7dd
mov eax, dword [ebp - 0x3c]
push eax
push 0x22d
push str.libfm::fm_impl::download_data
call fcn.0040a540
add esp, 0xc
push 0
lea ecx, [ebp - 0x44]
push ecx
lea edx, [ebp - 0x30]
push edx
push 0x20000005
push esi
mov dword [ebp - 0x44], ebx
call edi
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x46c804
mov eax, dword [ebp - 0x30]
push eax
push 0x234
jmp 0x46c815
push 0x2000
mov dword [ebp - 0x30], 0x2000
push 0x237
push str.libfm::fm_impl::download_data
call fcn.0040a540
mov edi, dword [ebp - 0x30]
add esp, 0xc
push edi
call fcn.0047215a
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x46c840
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
jmp 0x46c96b
push edi
push 0
push ebx
call fcn.00475cb0
mov eax, dword [ebp - 0x30]
add esp, 0xc
lea ecx, [ebp - 0x34]
push ecx
push eax
push ebx
xor edi, edi
push esi
mov dword [ebp - 0x34], edi
call dword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x46c8dd
mov esi, dword [ebp - 0x30]
add edi, eax
cmp dword [ebp - 0x4c], 0
jne 0x46c8be
mov edx, esi
sub edx, edi
cmp edx, 0x400
jae 0x46c8be
add esi, 0x800
push esi
mov dword [ebp - 0x30], esi
call fcn.0047215a
add esp, 4
mov dword [ebp - 0x40], eax
test eax, eax
je 0x46c945
push esi
push 0
push eax
call fcn.00475cb0
mov esi, dword [ebp - 0x40]
push edi
push ebx
push esi
call fcn.00474120
push ebx
call fcn.0046fe23
mov ebx, esi
mov esi, dword [ebp - 0x30]
add esp, 0x1c
mov edx, dword [ebp - 0x38]
lea ecx, [ebp - 0x34]
push ecx
sub esi, edi
push esi
lea eax, [edi + ebx]
push eax
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov eax, dword [ebp - 0x34]
test eax, eax
jne 0x46c868
mov esi, dword [ebp - 0x38]
push edi
push ebx
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x18], 0xf
mov dword [ebp - 0x1c], 0
mov byte [ebp - 0x2c], 0
call fcn.0040c230
mov ecx, dword [ebp - 0x48]
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 4], 0
call fcn.0040b040
cmp dword [ebp - 0x18], 0x10
jb 0x46c91e
mov ecx, dword [ebp - 0x2c]
push ecx
call fcn.0046ead2
add esp, 4
push ebx
call fcn.0046fe23
add esp, 4
push esi
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
push 0x263
push str.libfm::fm_impl::download_data
call fcn.0040a540
add esp, 0xc
mov al, 1
jmp 0x46c96d
push ebx
call fcn.0046fe23
mov edx, dword [ebp - 0x38]
add esp, 4
push edx
call dword [sym.imp.WININET.dll_InternetCloseHandle]
push edi
push 0x257
push str.libfm::fm_impl::download_data
call fcn.0040a540
add esp, 0xc
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046eadd
mov esp, ebp
pop ebp
ret 8