Function at 0x1001d10f
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.10035680
add esp, 0xc
cmp edi, esi
je 0x1001d405
cmp dword [ebp - 0x70], esi
je 0x1001d405
cmp edi, 0xffffffff
je 0x1001d405
cmp dword [ebp + 0x1d4], 2
jne 0x1001d1b6
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 0x1001d236
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 0x1001d236
mov ecx, dword [ebp - 0x60]
cmp eax, ecx
jbe 0x1001d35f
mov edx, dword [ebp - 0x5c]
cmp edx, esi
je 0x1001d201
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.1000bb4b
mov eax, dword [ebp - 0x5c]
add esp, 0x14
cmp eax, esi
je 0x1001d226
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 0x1001d250
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 0x1001d2ed
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 0x1001d294
push eax
push eax
push eax
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
cmp dword [ebp - 0x64], esi
je 0x1001d2ed
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 0x1001d2ed
lea eax, [ebp - 0x4c]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, si
jne 0x1001d2bd
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 0x1001d2ed
push esi
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x54], eax
cmp dword [ebp - 0x50], esi
jne 0x1001d32a
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 0x1001d32a
mov edi, dword [ebp - 0x5c]
cmp edi, esi
je 0x1001d32a
push 0xa
lea eax, [ebp - 0x4c]
push esi
push eax
call fcn.1003564f
add esp, 0xc
mov dword [edi], eax
cmp dword [ebp - 0x54], esi
je 0x1001d3ce
mov edi, 0x80000
push edi
call fcn.10033407
pop ecx
mov dword [ebp - 0x68], eax
cmp eax, esi
je 0x1001d3ce
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x58]
call ebx
test eax, eax
je 0x1001d3ce
jmp 0x1001d3c4
jne 0x1001d236
xor eax, eax
inc eax
jmp 0x1001d407
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 0x1001d3cb
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 0x1001d3cb
lea eax, [ebp - 0x50]
push eax
push dword [ebp - 0x58]
call ebx
test eax, eax
je 0x1001d3cb
mov eax, dword [ebp + 0x1ec]
cmp eax, esi
je 0x1001d3c4
cmp dword [eax], esi
jne 0x1001d3cb
cmp dword [ebp - 0x50], esi
ja 0x1001d36d
jmp 0x1001d3ce
mov dword [ebp - 0x54], esi
mov edi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x58], esi
je 0x1001d3de
push dword [ebp - 0x58]
call edi
cmp dword [ebp - 0x64], esi
je 0x1001d3e8
push dword [ebp - 0x64]
call edi
cmp dword [ebp - 0x74], esi
je 0x1001d3f2
push dword [ebp - 0x74]
call edi
cmp dword [ebp - 0x68], esi
je 0x1001d400
push dword [ebp - 0x68]
call fcn.100334d1
pop ecx
mov eax, dword [ebp - 0x54]
jmp 0x1001d407
xor eax, eax
mov ecx, dword [ebp + 0x1bc]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10032a69
add ebp, 0x1c0
leave
ret 0x28