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

Disassembly:
push ebp
mov ebp, esp
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x4df725
push eax
mov eax, 0x1098
mov dword fs:[0], esp
call fcn.004ba770
push ebx
push esi
mov ecx, 0x513279
call fcn.004ba18d
lea eax, [ebp - 0xd]
mov dword [ebp - 0x40], 0x690057
push eax
lea ecx, [ebp - 0x30]
mov dword [ebp - 0x3c], 0x48006e
push ecx
lea edx, [ebp - 0x40]
mov dword [ebp - 0x38], 0x540054
push edx
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x34], 0x50
call fcn.00403eb0
push 0
push 0
push 0
push 0
push dword [eax]
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov ebx, eax
lea ecx, [ebp - 0x98]
mov dword [ebp - 0x24], ebx
call fcn.0040b7b0
test ebx, ebx
je 0x4051ac
mov edx, dword [ebp + 8]
xorps xmm0, xmm0
mov ecx, edx
mov dword [ebp - 0x88], 0
movlpd qword [ebp - 0x80], xmm0
movlpd qword [ebp - 0x74], xmm0
movlpd qword [ebp - 0x6c], xmm0
movlpd qword [ebp - 0x64], xmm0
lea esi, [ecx + 2]
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x8c], 0x3c
mov dword [ebp - 0x84], 0xffffffff
mov dword [ebp - 0x78], 0xffffffff
mov dword [ebp - 0x5c], 0xffffffff
mov dword [ebp - 0x54], 0xffffffff
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404ec2
lea eax, [ebp - 0x8c]
sub ecx, esi
push eax
push 0
sar ecx, 1
push ecx
push edx
call dword [sym.imp.WINHTTP.dll_WinHttpCrackUrl]
test eax, eax
je 0x4051ac
push edi
push dword [ebp - 0x7c]
lea ecx, [ebp - 0x14]
call fcn.00403b10
mov eax, dword [ebp - 0x14]
or edi, 0xffffffff
mov dword [ebp - 4], 0
cmp dword [eax - 0xc], 0
jl 0x404f63
push 0x4e7950
push eax
call fcn.004bd5c9
mov ecx, eax
add esp, 8
test ecx, ecx
je 0x404f60
mov eax, dword [ebp - 0x14]
sub ecx, eax
sar ecx, 1
cmp ecx, edi
je 0x404f63
push ecx
lea eax, [ebp - 0x18]
push eax
lea ecx, [ebp - 0x14]
call fcn.00405e50
push eax
lea ecx, [ebp - 0x14]
mov byte [ebp - 4], 1
call fcn.00404120
mov edx, dword [ebp - 0x18]
mov eax, edi
mov byte [ebp - 4], 0
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x404f60
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x14]
push 0
push dword [ebp - 0x74]
push eax
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpConnect]
mov dword [ebp - 0x18], eax
test eax, eax
je 0x405178
mov ecx, 0x1bb
mov dword [ebp - 0x30], 0x450047
xor esi, esi
mov dword [ebp - 0x2c], 0x54
cmp cx, word [ebp - 0x74]
lea edx, [ebp - 0x30]
mov eax, 0x800000
lea ecx, [ebp - 0x28]
cmove esi, eax
lea eax, [ebp - 0xd]
push eax
push ecx
push edx
lea ecx, [ebp - 0xa4]
call fcn.00403eb0
push esi
push 0
push 0
push 0
push dword [ebp - 0x60]
push dword [eax]
push dword [ebp - 0x18]
call dword [sym.imp.WINHTTP.dll_WinHttpOpenRequest]
lea ecx, [ebp - 0xa4]
mov esi, eax
call fcn.0040b7b0
test esi, esi
jne 0x404fe5
push ebx
call dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
jmp 0x405178
push 4
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0x3300
push eax
push 0x1f
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSetOption]
test eax, eax
je 0x40516c
push 0
push 0
push 0
push 0
push 0
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpSendRequest]
test eax, eax
je 0x40516c
push 0
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReceiveResponse]
test eax, eax
je 0x40516c
push 0
lea eax, [ebp - 0x48]
mov dword [ebp - 0x20], 0
push eax
lea eax, [ebp - 0x20]
mov dword [ebp - 0x48], 4
push eax
push 0
push 0x20000005
xorps xmm0, xmm0
push esi
movlpd qword [ebp - 0x50], xmm0
call dword [sym.imp.WINHTTP.dll_WinHttpQueryHeaders]
test eax, eax
je 0x40516c
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x28], eax
cmp eax, 0xffffffff
je 0x40516c
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
push 0x1000
lea eax, [ebp - 0x10a4]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x405137
mov edi, dword [ebp - 0x4c]
mov ebx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x405131
push 0
lea ecx, [ebp - 0x18]
mov dword [ebp - 0x18], 0
push ecx
push eax
lea eax, [ebp - 0x10a4]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x405150
add ebx, dword [ebp - 0x18]
adc edi, 0
cmp dword [ebp + 0x10], 0
je 0x40510f
cmp dword [ebp - 0x20], 0
je 0x40510f
push 0
push 0x64
push edi
push ebx
call fcn.004ba730
push 0
push dword [ebp - 0x20]
push edx
push eax
call fcn.004ba680
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
lea eax, [ebp - 0x1c]
mov dword [ebp - 0x1c], 0
push eax
push 0x1000
lea eax, [ebp - 0x10a4]
push eax
push esi
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
jne 0x4050b8
mov ebx, dword [ebp - 0x24]
or edi, 0xffffffff
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push ebx
call esi
mov bl, 1
jmp 0x40517a
push dword [ebp - 0x28]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push dword [ebp - 0x24]
call esi
or edi, 0xffffffff
jmp 0x405178
push esi
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
call esi
push ebx
call esi
xor bl, bl
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], edi
dec edi
test edi, edi
pop edi
jg 0x40519a
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
pop esi
mov al, bl
pop ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0xc]
xor al, al
pop esi
pop ebx
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret