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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa98
mov eax, dword [0x11279148]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0x20]
push ebx
mov ebx, dword [ebp + 0x18]
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0x1c]
mov dword [ebp - 0xa8c], ecx
mov ecx, dword [ebp + 0x24]
mov dword [ebp - 0xa84], eax
mov dword [ebp - 0xa68], ebx
mov dword [ebp - 0xa6c], edi
mov dword [ebp - 0xa98], edx
mov dword [ebp - 0xa54], ecx
test eax, eax
jne 0x110ed7c8
mov eax, str.memVec
mov edx, dword [ebp + 0xc]
push eax
push edx
push esi
push str.Download__s__:_d__to__s_n
call fcn.111bd7b0
push ebx
push str.params_s_n
call fcn.111bd7b0
push 8
push str.https:__
push esi
call dword [sym.imp.MSVCR100.dll__wcsnicmp]
mov ebx, eax
neg ebx
sbb ebx, ebx
xor eax, eax
xor ecx, ecx
inc ebx
setne cl
mov word [ebp - 0x24c], ax
lea eax, [ebp - 0x24c]
lea edx, [esi + ecx*2 + 0xe]
push edx
push 0x104
push eax
call dword [sym.imp.MSVCR100.dll_wcscpy_s]
lea ecx, [ebp - 0x24c]
push 0x2f
push ecx
call dword [sym.imp.MSVCR100.dll_wcschr]
xor ecx, ecx
add esp, 0x38
mov dword [ebp - 0xa74], eax
cmp eax, ecx
je 0x110ede30
xor edx, edx
mov word [eax], dx
mov dword [ebp - 0xa5c], ecx
mov dword [ebp - 0xa60], ecx
mov dword [ebp - 0xa70], ecx
mov dword [ebp - 0xa58], ecx
mov dword [ebp - 0xa7c], ecx
mov dword [ebp - 0xa50], ecx
mov dword [ebp - 0xa94], 4
mov dword [ebp - 0xa90], 1
xor esi, esi
jmp 0x110ed888
mov edi, dword [ebp - 0xa6c]
xor ecx, ecx
mov eax, edi
cmp edi, ecx
jne 0x110ed893
mov eax, str.nsm_1.0
push ecx
push ecx
push ecx
mov ecx, dword [ebp + esi*4 - 0xa94]
push ecx
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov edi, eax
mov dword [ebp - 0xa78], edi
test edi, edi
jne 0x110ed971
inc esi
cmp esi, 2
jb 0x110ed880
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpOpen_failed__gle_d_n
call fcn.110ed5b0
add esp, 8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpConnect_failed__gle_d_n
call fcn.110ed5b0
add esp, 8
mov esi, dword [ebp - 0xa50]
mov dword [ebp - 0xa88], 0
test esi, esi
je 0x110eda9d
push 0
push 0x10000
push 0x110ed610
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetStatusCallback]
push 4
lea eax, [ebp - 0xa88]
push eax
push 0x2d
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0xa58], eax
test eax, eax
je 0x110eda9d
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0xa58], eax
test eax, eax
jne 0x110eda51
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.WinHttpReceiveResponse_failed__gle_d_n
call fcn.110ed5b0
add esp, 8
jmp 0x110eda9d
mov eax, dword [ebp + 0xc]
test eax, eax
jne 0x110ed97d
mov eax, 0x1bb
push 0
push eax
lea edx, [ebp - 0x24c]
push edx
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0xa7c], eax
test eax, eax
je 0x110ed8cf
mov eax, dword [ebp - 0xa74]
add eax, 2
lea edx, [ebp - 0xa4c]
sub edx, eax
lea ecx, [ecx]
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x110ed9b0
mov eax, dword [ebp - 0xa68]
mov edx, eax
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x110ed9c7
sub eax, edx
mov esi, edx
mov edx, eax
lea eax, [ebp - 0xa4c]
add eax, 0xfffffffe
mov cx, word [eax + 2]
add eax, 2
test cx, cx
jne 0x110ed9e1
mov ecx, edx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp - 0xa7c]
and ecx, 3
neg ebx
sbb ebx, ebx
and ebx, 0x800000
push ebx
lea eax, [ebp - 0xa94]
push eax
push 0
push 0
rep movsb byte es:[edi], byte [esi]
lea ecx, [ebp - 0xa4c]
push ecx
push 0x1120999c
push edx
mov dword [ebp - 0xa94], 0x1121f414
mov dword [ebp - 0xa90], 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, dword [ebp - 0xa78]
mov dword [ebp - 0xa50], eax
jmp 0x110ed8e3
mov ebx, dword [ebp - 0xa54]
test ebx, ebx
je 0x110eda9d
lea ecx, [ebp - 0xa6c]
push ecx
lea edx, [ebp - 0xa54]
push edx
push 0x4e
push esi
mov dword [ebp - 0xa54], 0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryOption]
test eax, eax
je 0x110eda9d
mov eax, dword [ebp - 0xa54]
push ebx
push eax
call fcn.110ed640
mov ecx, dword [ebp - 0xa54]
add esp, 8
push ecx
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
mov ebx, 0x40
push ebx
lea edx, [ebp - 0x44]
push 0
push edx
call sub.MSVCR100.dll_memset
xor eax, eax
add esp, 0xc
mov dword [ebp - 0xa64], ebx
mov dword [ebp - 0xa80], eax
mov dword [ebp - 0xa68], eax
mov dword [ebp - 0xa74], 0xffffffff
cmp dword [ebp - 0xa58], eax
je 0x110edbf2
lea ecx, [ebp - 0xa80]
push ecx
lea edx, [ebp - 0xa64]
push edx
lea ecx, [ebp - 0x44]
push ecx
push eax
push 0x13
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov dword [ebp - 0xa64], ebx
call esi
mov edi, dword [sym.imp.MSVCR100.dll__wtoi]
test eax, eax
je 0x110edb18
lea edx, [ebp - 0x44]
push edx
call edi
add esp, 4
mov dword [ebp - 0xa74], eax
lea eax, [ebp - 0xa80]
push eax
mov eax, dword [ebp - 0xa50]
lea ecx, [ebp - 0xa64]
push ecx
lea edx, [ebp - 0x44]
push edx
push 0
push 5
push eax
mov dword [ebp - 0xa64], ebx
call esi
mov dword [ebp - 0xa58], eax
lea ecx, [ebp - 0x44]
test eax, eax
je 0x110edbb1
push ecx
call edi
mov esi, dword [ebp - 0xa8c]
xor ebx, ebx
add esp, 4
mov dword [ebp - 0xa6c], eax
cmp esi, ebx
je 0x110edb6a
push eax
mov ecx, esi
call fcn.11048c50
mov eax, dword [ebp - 0xa84]
cmp eax, ebx
je 0x110edc54
push 0x111f88e8
push eax
call dword [sym.imp.MSVCR100.dll__wfopen]
add esp, 8
mov dword [ebp - 0xa54], eax
cmp eax, ebx
jne 0x110edc60
cmp esi, ebx
jne 0x110edc60
mov edi, dword [ebp - 0xa78]
mov esi, dword [ebp - 0xa50]
mov dword [ebp - 0xa58], ebx
jmp 0x110edc0d
lea edx, [ebp - 0xa80]
push edx
mov edx, dword [ebp - 0xa50]
lea eax, [ebp - 0xa64]
push eax
push ecx
push 0
push 0x24
push edx
mov dword [ebp - 0xa64], ebx
call esi
test eax, eax
je 0x110edbe6
lea eax, [ebp - 0x44]
push eax
call edi
add esp, 4
mov dword [ebp - 0xa68], eax
mov esi, dword [ebp - 0xa50]
mov edi, dword [ebp - 0xa78]
mov eax, dword [ebp - 0xa88]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Download_Error__d_has_occurred__dwSSLStatusx_x_n
call fcn.110ed5b0
add esp, 0xc
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test esi, esi
je 0x110edc1a
push esi
call ebx
mov eax, dword [ebp - 0xa7c]
test eax, eax
je 0x110edc27
push eax
call ebx
test edi, edi
je 0x110edc2e
push edi
call ebx
mov esi, dword [ebp - 0xa58]
test esi, esi
je 0x110eddd4
mov ecx, dword [ebp - 0xa84]
mov edx, dword [ebp - 0xa70]
push ecx
push edx
push str.downloaded__d_bytes_to__s_n
jmp 0x110edde7
mov dword [ebp - 0xa54], ebx
jmp 0x110edb95
mov edi, dword [ebp - 0xa50]
lea ecx, [ebp - 0xa5c]
push ecx
push edi
mov dword [ebp - 0xa5c], ebx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x110edd75
mov eax, dword [ebp - 0xa5c]
cmp eax, ebx
je 0x110edd98
inc eax
push eax
call fcn.11170a40
mov esi, eax
add esp, 4
cmp esi, ebx
je 0x110edd8b
mov edx, dword [ebp - 0xa5c]
inc edx
push edx
push ebx
push esi
call sub.MSVCR100.dll_memset
mov ecx, dword [ebp - 0xa5c]
add esp, 0xc
lea eax, [ebp - 0xa60]
push eax
push ecx
push esi
push edi
mov dword [ebp - 0xa60], ebx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x110edcf2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Download_Error__u_in_WinHttpReadData._n
call fcn.110ed5b0
add esp, 8
mov dword [ebp - 0xa58], ebx
jmp 0x110edd4e
mov eax, dword [ebp - 0xa54]
cmp eax, ebx
je 0x110edd12
mov edx, dword [ebp - 0xa60]
push eax
push edx
push 1
push esi
call dword [sym.imp.MSVCR100.dll_fwrite]
add esp, 0x10
jmp 0x110edd42
mov eax, dword [ebp - 0xa8c]
cmp eax, ebx
je 0x110edd42
mov edx, dword [ebp - 0xa60]
mov ecx, dword [ebp - 0xa70]
lea edi, [ecx + edx]
cmp edi, dword [ebp - 0xa6c]
ja 0x110edd42
mov eax, dword [eax]
push edx
add eax, ecx
push esi
push eax
call sub.MSVCR100.dll_memcpy
add esp, 0xc
mov eax, dword [ebp - 0xa60]
add dword [ebp - 0xa70], eax
push esi
call sub.MSVCR100.dll_void___cdecl_operator_delete___void__
add esp, 4
cmp dword [ebp - 0xa60], ebx
je 0x110edd98
cmp dword [ebp - 0xa5c], ebx
jbe 0x110edd98
cmp dword [ebp - 0xa58], ebx
jne 0x110edc60
jmp 0x110edd98
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Download_Error__u_in_WinHttpQueryDataAvailable._n
call fcn.110ed5b0
add esp, 8
jmp 0x110edd98
push str.Download_Out_of_memory_n
call fcn.110ed5b0
add esp, 4
mov eax, dword [ebp - 0xa54]
cmp eax, ebx
je 0x110eddac
push eax
call dword [sym.imp.MSVCR100.dll_fclose]
add esp, 4
mov edx, dword [ebp - 0xa70]
mov edi, dword [ebp - 0xa78]
mov esi, dword [ebp - 0xa50]
xor ecx, ecx
cmp edx, dword [ebp - 0xa6c]
sete cl
mov dword [ebp - 0xa58], ecx
jmp 0x110edc0d
mov eax, dword [ebp - 0xa68]
mov ecx, dword [ebp - 0xa74]
push eax
push ecx
push str.statusCode_d__retryAfter_d_n
call fcn.110ed5b0
mov eax, dword [ebp - 0xa98]
add esp, 0xc
test eax, eax
je 0x110ede01
mov edx, dword [ebp - 0xa68]
mov dword [eax], edx
test esi, esi
je 0x110ede1c
mov eax, dword [ebp - 0xa74]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.111d9022
mov esp, ebp
pop ebp
ret
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.111d9022
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.111d9022
mov esp, ebp
pop ebp
ret