Function at 0x409c00
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 0x4ee9d3
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
mov eax, 0x10f8
call fcn.004c71a0
push esi
mov ecx, 0x52429a
call fcn.004c6bbd
mov eax, 0x57
mov word [ebp - 0x70], ax
mov ecx, 0x69
mov word [ebp - 0x6e], cx
mov edx, 0x6e
mov word [ebp - 0x6c], dx
mov eax, 0x48
mov word [ebp - 0x6a], ax
mov ecx, 0x54
mov word [ebp - 0x68], cx
mov edx, 0x54
mov word [ebp - 0x66], dx
mov eax, 0x50
mov word [ebp - 0x64], ax
xor ecx, ecx
mov word [ebp - 0x62], cx
push 0
push 0
push 0
push 0
lea ecx, [ebp - 0x31]
call fcn.004063b0
push eax
lea edx, [ebp - 0x60]
push edx
lea eax, [ebp - 0x70]
push eax
lea ecx, [ebp - 0xfc]
call fcn.00406b20
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [eax]
push edx
lea ecx, [ebp - 0xe8]
call fcn.00406d10
mov dword [ebp - 0x9c], eax
mov ecx, dword [ebp - 0x9c]
call fcn.00415e30
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0xe8]
call fcn.00407960
cmp dword [ebp - 0x18], 0
jne 0x409cdb
xor al, al
jmp 0x40a209
push 0x3c
push 0
lea eax, [ebp - 0xdc]
push eax
call fcn.004cb140
add esp, 0xc
push 0x3c
push 0
lea ecx, [ebp - 0xdc]
push ecx
call fcn.004cb140
add esp, 0xc
mov dword [ebp - 0xdc], 0x3c
mov dword [ebp - 0xd4], 0xffffffff
mov dword [ebp - 0xc8], 0xffffffff
mov dword [ebp - 0xac], 0xffffffff
mov dword [ebp - 0xa4], 0xffffffff
mov edx, dword [ebp + 8]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
add eax, 2
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp - 0x28]
mov dx, word [ecx]
mov word [ebp - 0x34], dx
add dword [ebp - 0x28], 2
cmp word [ebp - 0x34], 0
jne 0x409d42
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x74]
sar eax, 1
mov dword [ebp - 0x78], eax
lea ecx, [ebp - 0xdc]
push ecx
push 0
mov edx, dword [ebp - 0x78]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
jne 0x409d84
xor al, al
jmp 0x40a209
mov ecx, dword [ebp - 0xcc]
push ecx
lea ecx, [ebp - 0x10]
call fcn.00406160
mov dword [ebp - 4], 0
push 0
push 0x4f6c98
lea ecx, [ebp - 0x10]
call fcn.0040a320
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
je 0x409ded
mov edx, dword [ebp - 0x2c]
push edx
lea eax, [ebp - 0x84]
push eax
lea ecx, [ebp - 0x10]
call fcn.0040bce0
mov dword [ebp - 0x7c], eax
mov ecx, dword [ebp - 0x7c]
mov dword [ebp - 0x80], ecx
mov byte [ebp - 4], 1
mov edx, dword [ebp - 0x80]
push edx
lea ecx, [ebp - 0x10]
call fcn.00407eb0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x84]
call fcn.00407640
push 0
push 0x4f6c9c
lea ecx, [ebp - 0x10]
call fcn.0040a320
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xffffffff
je 0x409e4c
mov eax, dword [ebp - 0x2c]
push eax
lea ecx, [ebp - 0x90]
push ecx
lea ecx, [ebp - 0x10]
call fcn.0040bce0
mov dword [ebp - 0x88], eax
mov edx, dword [ebp - 0x88]
mov dword [ebp - 0x8c], edx
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x8c]
push eax
lea ecx, [ebp - 0x10]
call fcn.00407eb0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x90]
call fcn.00407640
push 0
movzx ecx, word [ebp - 0xc4]
push ecx
lea ecx, [ebp - 0x10]
call fcn.004084d0
push eax
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0
jne 0x409e8d
mov byte [ebp - 0x19], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00407640
mov al, byte [ebp - 0x19]
jmp 0x40a209
mov dword [ebp - 0x50], 0
movzx eax, word [ebp - 0xc4]
cmp eax, 0x1bb
jne 0x409ea9
mov dword [ebp - 0x50], 0x800000
mov ecx, 0x47
mov word [ebp - 0x5c], cx
mov edx, 0x45
mov word [ebp - 0x5a], dx
mov eax, 0x54
mov word [ebp - 0x58], ax
xor ecx, ecx
mov word [ebp - 0x56], cx
mov edx, dword [ebp - 0x50]
push edx
push 0
push 0
push 0
mov eax, dword [ebp - 0xb0]
push eax
lea ecx, [ebp - 0x32]
call fcn.004063b0
push eax
lea ecx, [ebp - 0x54]
push ecx
lea edx, [ebp - 0x5c]
push edx
lea ecx, [ebp - 0x104]
call fcn.00406b20
mov ecx, dword [eax + 4]
push ecx
mov edx, dword [eax]
push edx
lea ecx, [ebp - 0xf4]
call fcn.00406d10
mov dword [ebp - 0x94], eax
mov ecx, dword [ebp - 0x94]
call fcn.00415e30
push eax
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
mov dword [ebp - 0x14], eax
lea ecx, [ebp - 0xf4]
call fcn.00407960
cmp dword [ebp - 0x14], 0
jne 0x409f5e
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov byte [ebp - 0x1a], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00407640
mov al, byte [ebp - 0x1a]
jmp 0x40a209
mov dword [ebp - 0xa0], 0x3300
push 4
lea edx, [ebp - 0xa0]
push edx
push 0x1f
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
jne 0x409fb0
mov ecx, dword [ebp - 0x14]
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 - 0x1b], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00407640
mov al, byte [ebp - 0x1b]
jmp 0x40a209
push 0
push 0
push 0
push 0
push 0
push 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
jne 0x409ff9
mov ecx, dword [ebp - 0x14]
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 - 0x1c], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00407640
mov al, byte [ebp - 0x1c]
jmp 0x40a209
push 0
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
jne 0x40a038
mov ecx, dword [ebp - 0x14]
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 - 0x1d], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00407640
mov al, byte [ebp - 0x1d]
jmp 0x40a209
mov dword [ebp - 0x3c], 0
xorps xmm0, xmm0
movlpd qword [ebp - 0x44], xmm0
mov dword [ebp - 0x98], 4
push 0
lea eax, [ebp - 0x98]
push eax
lea ecx, [ebp - 0x3c]
push ecx
push 0
push 0x20000005
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
jne 0x40a0a2
mov eax, dword [ebp - 0x14]
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 - 0x1e], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00407640
mov al, byte [ebp - 0x1e]
jmp 0x40a209
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
mov edx, dword [ebp + 0xc]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0xffffffff
jne 0x40a0f6
mov eax, dword [ebp - 0x14]
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 - 0x1f], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00407640
mov al, byte [ebp - 0x1f]
jmp 0x40a209
mov edx, 1
test edx, edx
je 0x40a1d5
mov dword [ebp - 0x38], 0
lea eax, [ebp - 0x38]
push eax
push 0x1000
lea ecx, [ebp - 0x1104]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x40a12e
cmp dword [ebp - 0x38], 0
jne 0x40a133
jmp 0x40a1d5
mov dword [ebp - 0x4c], 0
push 0
lea eax, [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
lea edx, [ebp - 0x1104]
push edx
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x40a18f
mov ecx, dword [ebp - 0x30]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [ebp - 0x14]
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 - 0x20], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x10]
call fcn.00407640
mov al, byte [ebp - 0x20]
jmp 0x40a209
mov ecx, dword [ebp - 0x4c]
xor edx, edx
add ecx, dword [ebp - 0x44]
adc edx, dword [ebp - 0x40]
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x40], edx
cmp dword [ebp + 0x10], 0
je 0x40a1d0
cmp dword [ebp - 0x3c], 0
je 0x40a1d0
push 0
push 0x64
mov eax, dword [ebp - 0x40]
push eax
mov ecx, dword [ebp - 0x44]
push ecx
call fcn.004c7160
mov ecx, dword [ebp - 0x3c]
xor esi, esi
push esi
push ecx
push edx
push eax
call fcn.004c70b0
mov edx, dword [ebp + 0x10]
mov dword [edx], eax
jmp 0x40a0f6
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x14]
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 - 0x10]
call fcn.00407640
mov al, byte [ebp - 0x21]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
ret