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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4e4d55
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x109c
call fcn.004c1670
push esi
mov ecx, 0x51c276
call fcn.004c108d
push 0
push 0
push 0
push 0
push 0x4eb96c
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0
jne 0x4090b0
xor al, al
jmp 0x4094fe
push 0x3c
push 0
lea eax, [ebp - 0xa8]
push eax
call fcn.004c4400
add esp, 0xc
push 0x3c
push 0
lea ecx, [ebp - 0xa8]
push ecx
call fcn.004c4400
add esp, 0xc
mov dword [ebp - 0xa8], 0x3c
mov dword [ebp - 0xa0], 0xffffffff
mov dword [ebp - 0x94], 0xffffffff
mov dword [ebp - 0x78], 0xffffffff
mov dword [ebp - 0x70], 0xffffffff
mov edx, dword [ebp + 8]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
add eax, 2
mov dword [ebp - 0x54], eax
mov ecx, dword [ebp - 0x28]
mov dx, word [ecx]
mov word [ebp - 0x2e], dx
add dword [ebp - 0x28], 2
cmp word [ebp - 0x2e], 0
jne 0x409111
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x54]
sar eax, 1
mov dword [ebp - 0x58], eax
lea ecx, [ebp - 0xa8]
push ecx
push 0
mov edx, dword [ebp - 0x58]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x409153
xor al, al
jmp 0x4094fe
mov ecx, dword [ebp - 0x98]
push ecx
lea ecx, [ebp - 0x14]
call fcn.00407470
mov dword [ebp - 4], 0
push 0
push 0x4eb994
lea ecx, [ebp - 0x14]
call fcn.00409610
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 0xffffffff
je 0x4091b6
mov edx, dword [ebp - 0x44]
push edx
lea eax, [ebp - 0x64]
push eax
lea ecx, [ebp - 0x14]
call fcn.0040a860
mov dword [ebp - 0x5c], eax
mov ecx, dword [ebp - 0x5c]
mov dword [ebp - 0x60], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x60]
push edx
lea ecx, [ebp - 0x14]
call fcn.00407fd0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.00407d20
push 0
movzx eax, word [ebp - 0x90]
push eax
lea ecx, [ebp - 0x14]
call fcn.00408170
push eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 0
jne 0x4091f7
mov byte [ebp - 0x19], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407d20
mov al, byte [ebp - 0x19]
jmp 0x4094fe
mov dword [ebp - 0x48], 0
movzx edx, word [ebp - 0x90]
cmp edx, 0x1bb
jne 0x409214
mov dword [ebp - 0x48], 0x800000
mov eax, dword [ebp - 0x48]
push eax
push 0
push 0
push 0
mov ecx, dword [ebp - 0x7c]
push ecx
push 0x4eb998
mov edx, dword [ebp - 0x4c]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x40925f
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1a], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407d20
mov al, byte [ebp - 0x1a]
jmp 0x4094fe
mov dword [ebp - 0x68], 0x3300
push 4
lea ecx, [ebp - 0x68]
push ecx
push 0x1f
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x4092ab
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1b], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407d20
mov al, byte [ebp - 0x1b]
jmp 0x4094fe
push 0
push 0
push 0
push 0
push 0
push 0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x4092f4
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407d20
mov al, byte [ebp - 0x1c]
jmp 0x4094fe
push 0
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x409333
mov eax, dword [ebp - 0x10]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1d], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407d20
mov al, byte [ebp - 0x1d]
jmp 0x4094fe
mov dword [ebp - 0x38], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x40], xmm0
mov dword [ebp - 0x6c], 4
push 0
lea edx, [ebp - 0x6c]
push edx
lea eax, [ebp - 0x38]
push eax
push 0
push 0x20000005
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x409397
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1e], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407d20
mov al, byte [ebp - 0x1e]
jmp 0x4094fe
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
jne 0x4093eb
mov edx, dword [ebp - 0x10]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1f], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407d20
mov al, byte [ebp - 0x1f]
jmp 0x4094fe
mov ecx, 1
test ecx, ecx
je 0x4094ca
mov dword [ebp - 0x34], 0
lea edx, [ebp - 0x34]
push edx
push 0x1000
lea eax, [ebp - 0x10a8]
push eax
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x409423
cmp dword [ebp - 0x34], 0
jne 0x409428
jmp 0x4094ca
mov dword [ebp - 0x50], 0
push 0
lea edx, [ebp - 0x50]
push edx
mov eax, dword [ebp - 0x34]
push eax
lea ecx, [ebp - 0x10a8]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x409484
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x20], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407d20
mov al, byte [ebp - 0x20]
jmp 0x4094fe
mov eax, dword [ebp - 0x50]
xor ecx, ecx
add eax, dword [ebp - 0x40]
adc ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x3c], ecx
cmp dword [ebp + 0x10], 0
je 0x4094c5
cmp dword [ebp - 0x38], 0
je 0x4094c5
push 0
push 0x64
mov edx, dword [ebp - 0x3c]
push edx
mov eax, dword [ebp - 0x40]
push eax
call fcn.004c1630
mov ecx, dword [ebp - 0x38]
xor esi, esi
push esi
push ecx
push edx
push eax
call fcn.004c1580
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
jmp 0x4093eb
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x21], 1
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call fcn.00407d20
mov al, byte [ebp - 0x21]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret