Function at 0x4010d0
Capabilities:
Initialize winhttp library
Prepare http request
Read http header
Receive http response
Reference http user-agent string
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xf4
mov eax, dword [0x434014]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push str.APPDATA
mov dword [ebp - 0xdc], edx
mov dword [ebp - 0xd8], ecx
call fcn.0040d2c0
add esp, 4
push eax
lea eax, [ebp - 0xd0]
push str._s_ty67nui8uhyh
push eax
call fcn.00401410
add esp, 0xc
mov dword [ebp - 0xe0], 0
xor edi, edi
mov dword [ebp - 0xd4], 0
xor ebx, ebx
mov dword [ebp - 0xec], 0
xor eax, eax
push edi
push edi
push edi
push edi
push str.Mozilla_5.0__Windows_NT_6.1__WOW64__rv:12.0__Gecko_20100101_Firefox_12.0
lea esi, [ebx + 1]
mov dword [ebp - 0xe4], eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0xf0], eax
test eax, eax
je 0x401175
push edi
push 0x1bb
push dword [ebp - 0xd8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0xe4], eax
jmp 0x401177
xor eax, eax
mov dword [ebp - 0xe8], 0x3300
test eax, eax
je 0x4011a4
push 0x800000
push 0
push 0
push 0
push dword [ebp - 0xdc]
push 0x4313ac
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov edi, eax
push 4
lea eax, [ebp - 0xe8]
push eax
push 0x1f
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test edi, edi
je 0x40125d
push 0
push 0
push 0
push 0
push 0
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
mov ebx, eax
test ebx, ebx
je 0x40125d
push 0
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
mov ebx, eax
test ebx, ebx
je 0x40125d
push 0
lea eax, [ebp - 0xd4]
push eax
push 0
push 0
push 0x16
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40124d
mov eax, dword [ebp - 0xd4]
xor ecx, ecx
shr eax, 1
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405f39
add esp, 4
mov dword [ebp - 0xe0], eax
lea ecx, [ebp - 0xd4]
push 0
push ecx
push eax
push 0
push 0x16
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
mov ebx, eax
test ebx, ebx
je 0x40125d
push dword [ebp - 0xe0]
call fcn.00405f34
add esp, 4
jmp 0x401271
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__d_has_occurred._n
call fcn.004013d0
add esp, 8
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0xd0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
xor ecx, ecx
mov dword [ebp - 0xd8], eax
cmp eax, 0xffffffff
cmove esi, ecx
test ebx, ebx
je 0x40135f
nop word [eax + eax]
lea eax, [ebp - 0xd4]
mov dword [ebp - 0xd4], 0
push eax
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
neg eax
sbb eax, eax
and esi, eax
mov eax, dword [ebp - 0xd4]
inc eax
push eax
call fcn.00405f39
mov ecx, dword [ebp - 0xd4]
add esp, 4
inc ecx
mov ebx, eax
push ecx
push 0
push ebx
call fcn.00407da0
add esp, 0xc
lea eax, [ebp - 0xec]
push eax
push dword [ebp - 0xd4]
push ebx
push edi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x401310
xor esi, esi
jmp 0x40133a
push 0
lea eax, [ebp - 0xdc]
mov dword [ebp - 0xdc], 0
push eax
push dword [ebp - 0xd4]
push ebx
push dword [ebp - 0xd8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x401352
push ebx
call fcn.00405f34
add esp, 4
cmp dword [ebp - 0xd4], 0
ja 0x4012b0
jmp 0x401361
push str.writing_failed__n
call fcn.004013d0
add esp, 4
xor esi, esi
mov ebx, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
test edi, edi
je 0x40136e
push edi
call ebx
mov eax, dword [ebp - 0xe4]
test eax, eax
je 0x40137b
push eax
call ebx
mov eax, dword [ebp - 0xf0]
test eax, eax
je 0x401388
push eax
call ebx
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00405f23
mov esp, ebp
pop ebp
ret