Function at 0x1001d4c0
Capabilities:
Check http status code
Create http request
Download and write a file
Get http content length
Read data from internet
Receive and write data from server to client
Receive data
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100828a8
push 0x10068b38
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 8
mov eax, 0x2828
call fcn.10068c40
push ebx
push esi
push edi
push 0x10096ab4
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov esi, dword [ebp + 8]
mov ebx, esi
mov dword [ebp - 0x34], ebx
mov dword [esi + 0x1c], 0xffffffff
xor edi, edi
mov dword [esi + 0x10], edi
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x30], 4
mov dword [ebp - 4], edi
push edi
push edi
push edi
push edi
push 0x10081bf2
call dword [sym.imp.WININET.dll_InternetOpenA]
mov dword [esi + 0x18], eax
push edi
push 0x84000000
push edi
push edi
mov ecx, dword [esi]
push ecx
push eax
call dword [sym.imp.WININET.dll_InternetOpenUrlA]
mov dword [esi + 0x14], eax
cmp eax, edi
je 0x1001d663
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x3c], 4
push edi
lea edx, [ebp - 0x3c]
push edx
lea ecx, [ebp - 0x20]
push ecx
push 0x20000013
push eax
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x1001d663
cmp dword [ebp - 0x20], 0xc8
jne 0x1001d663
push edi
lea edx, [ebp - 0x30]
push edx
lea eax, [ebp - 0x28]
push eax
push 0x20000005
mov ecx, dword [esi + 0x14]
push ecx
call dword [sym.imp.WININET.dll_HttpQueryInfoA]
test eax, eax
je 0x1001d663
push edi
push 0x80
push 2
push edi
push edi
push 0x40000000
mov edx, dword [esi + 4]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [esi + 0x1c], eax
cmp eax, 0xffffffff
je 0x1001d663
mov dword [ebp - 0x40], 0x2800
mov byte [ebp - 0x2840], 0
mov ecx, 0x9ff
xor eax, eax
lea edi, [ebp - 0x283f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
xor ecx, ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x2c], 1
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
xor esi, esi
cmp ecx, esi
jbe 0x1001d62a
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x38], esi
nop
cmp esi, ecx
je 0x1001d62a
push 0
lea eax, [ebp - 0x24]
push eax
sub ecx, esi
push ecx
lea ecx, [ebp + esi - 0x2840]
push ecx
mov edx, dword [ebx + 0x1c]
push edx
call edi
test eax, eax
je 0x1001d62a
add esi, dword [ebp - 0x24]
mov dword [ebp - 0x38], esi
mov ecx, dword [ebp - 0x1c]
jmp 0x1001d600
lea eax, [ebp - 0x1c]
push eax
push 0x2800
lea ecx, [ebp - 0x2840]
push ecx
mov edx, dword [ebx + 0x14]
push edx
call dword [sym.imp.WININET.dll_InternetReadFile]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x1c]
test eax, eax
je 0x1001d661
test ecx, ecx
ja 0x1001d5f3
test eax, eax
je 0x1001d661
test ecx, ecx
jne 0x1001d661
mov dword [ebx + 0x10], 1
xor edi, edi
mov dword [ebp - 4], 0xffffffff
call fcn.1001d6cf
mov eax, dword [ebx + 0x14]
cmp eax, edi
je 0x1001d67d
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebx + 0x14], edi
mov eax, dword [ebx + 0x18]
cmp eax, edi
je 0x1001d68e
push eax
call dword [sym.imp.WININET.dll_InternetCloseHandle]
mov dword [ebx + 0x18], edi
mov eax, dword [ebx + 0x1c]
cmp eax, 0xffffffff
je 0x1001d6a0
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebx + 0x1c], 0xffffffff
mov dword [ebx + 0xc], 1
push 0x10096ab4
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret