Function at 0x1001d28e
Capabilities:
Get file size
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Write file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x1c0]
sub esp, 0x240
mov eax, dword [0x1005ce10]
xor eax, ebp
mov dword [ebp + 0x1bc], eax
mov eax, dword [ebp + 0x1cc]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp + 0x1d0]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x1e4]
push ebx
mov ebx, dword [ebp + 0x1c8]
push esi
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp + 0x1e8]
xor esi, esi
push edi
mov edi, dword [ebp + 0x1e0]
mov dword [ebp - 0x70], eax
xor eax, eax
push 0x206
mov word [ebp - 0x4c], ax
lea eax, [ebp - 0x4a]
push esi
push eax
mov dword [ebp - 0x6c], edi
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x50], esi
mov dword [ebp - 0x7c], esi
mov dword [ebp - 0x68], esi
mov dword [ebp - 0x64], esi
mov dword [ebp - 0x58], esi
call fcn.10035820
add esp, 0xc
cmp edi, esi
je 0x1001d584
cmp dword [ebp - 0x70], esi
je 0x1001d584
cmp edi, 0xffffffff
je 0x1001d584
cmp dword [ebp + 0x1d4], 2
jne 0x1001d335
mov dword [ebp - 0x7c], 0x800000
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [ebp - 0x60], eax
cmp eax, esi
je 0x1001d3b5
push dword [ebp + 0x1dc]
push dword [ebp + 0x1d8]
push dword [ebp + 0x1d4]
push dword [ebp - 0x78]
push ebx
call sym.EXEngine.dll_Ordinal_15
mov dword [ebp - 0x50], eax
cmp eax, esi
jbe 0x1001d3b5
mov ecx, dword [ebp - 0x60]
cmp eax, ecx
jbe 0x1001d4de
mov edx, dword [ebp - 0x5c]
cmp edx, esi
je 0x1001d380
mov dword [edx], ecx
dec eax
push eax
push ecx
push str.Range:_bytes_d__d
lea eax, [ebp - 0x4c]
push 0x104
push eax
call fcn.1000bb4e
mov eax, dword [ebp - 0x5c]
add esp, 0x14
cmp eax, esi
je 0x1001d3a5
mov ecx, dword [ebp - 0x50]
mov dword [eax], ecx
mov eax, dword [ebp - 0x60]
mov ecx, dword [ebp - 0x70]
push esi
push esi
push eax
push dword [ebp - 0x6c]
mov dword [ecx], eax
call edi
cmp word [ebp - 0x4c], si
jne 0x1001d3cf
push esi
push esi
push esi
push dword [ebp - 0x6c]
call edi
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
mov dword [ebp - 0x60], esi
push esi
push esi
push esi
push esi
push str.Mozilla_4.0__compatible__MSIE_6.0__Windows_NT_5.1_
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, eax
mov dword [ebp - 0x74], edi
cmp edi, esi
je 0x1001d46c
push esi
push dword [ebp + 0x1d8]
push ebx
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp + 0x1dc]
cmp eax, 0xffffffff
je 0x1001d413
push eax
push eax
push eax
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
cmp dword [ebp - 0x64], esi
je 0x1001d46c
push dword [ebp - 0x7c]
push esi
push esi
push esi
push dword [ebp - 0x78]
push dword [ebp - 0x80]
push dword [ebp - 0x64]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
mov dword [ebp - 0x58], edi
cmp edi, esi
je 0x1001d46c
lea eax, [ebp - 0x4c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1001d43c
push esi
push esi
push esi
sub eax, edx
push esi
sar eax, 1
push eax
lea eax, [ebp - 0x4c]
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x54], eax
cmp eax, esi
je 0x1001d46c
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x50], esi
jne 0x1001d4a9
push esi
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x4c]
push eax
push esi
push 5
push dword [ebp - 0x58]
mov dword [ebp - 0x50], 0x208
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x1001d4a9
mov edi, dword [ebp - 0x5c]
cmp edi, esi
je 0x1001d4a9
push 0xa
lea eax, [ebp - 0x4c]
push esi
push eax
call fcn.100357ef
add esp, 0xc
mov dword [edi], eax
cmp dword [ebp - 0x54], esi
je 0x1001d54d
mov edi, 0x80000
push edi
call fcn.10033575
pop ecx
mov dword [ebp - 0x68], eax
cmp eax, esi
je 0x1001d54d
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x58]
call ebx
test eax, eax
je 0x1001d54d
jmp 0x1001d543
jne 0x1001d3b5
xor eax, eax
inc eax
jmp 0x1001d586
lea eax, [ebp - 0x5c]
push eax
push edi
push dword [ebp - 0x68]
mov dword [ebp - 0x5c], esi
push dword [ebp - 0x58]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x1001d54a
mov eax, dword [ebp - 0x5c]
add dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x70]
mov edx, dword [ebp - 0x60]
push esi
mov dword [ecx], edx
lea ecx, [ebp - 0x5c]
push ecx
push eax
push dword [ebp - 0x68]
push dword [ebp - 0x6c]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1001d54a
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x58]
call ebx
test eax, eax
je 0x1001d54a
mov eax, dword [ebp + 0x1ec]
cmp eax, esi
je 0x1001d543
cmp dword [eax], esi
jne 0x1001d54a
cmp dword [ebp - 0x50], esi
ja 0x1001d4ec
jmp 0x1001d54d
mov dword [ebp - 0x54], esi
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x58], esi
je 0x1001d55d
push dword [ebp - 0x58]
call edi
cmp dword [ebp - 0x64], esi
je 0x1001d567
push dword [ebp - 0x64]
call edi
cmp dword [ebp - 0x74], esi
je 0x1001d571
push dword [ebp - 0x74]
call edi
cmp dword [ebp - 0x68], esi
je 0x1001d57f
push dword [ebp - 0x68]
call fcn.1003363f
pop ecx
mov eax, dword [ebp - 0x54]
jmp 0x1001d586
xor eax, eax
mov ecx, dword [ebp + 0x1bc]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10032bd7
add ebp, 0x1c0
leave
ret 0x28