Function at 0x407ec0
Capabilities:
Delete file
Initialize winhttp library
Receive http response
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x46b3dd
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x48f244]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
mov esi, dword [sym.imp.WINHTTP.dll_WinHttpCloseHandle]
mov dword [ebp - 0x38], eax
mov eax, dword [edi + 0x10]
test eax, eax
je 0x407f0d
push eax
call esi
mov dword [edi + 0x10], 0
mov eax, dword [edi + 0xc]
test eax, eax
je 0x407f1e
push eax
call esi
mov dword [edi + 0xc], 0
mov eax, dword [edi + 8]
test eax, eax
je 0x407f2f
push eax
call esi
mov dword [edi + 8], 0
push 0
push 0
push 0
push 0
push 0x4838a8
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [edi + 8], eax
test eax, eax
jne 0x407f5a
mov dword [edi + 0x80], 1
xor al, al
jmp 0x4081fd
push dword [edi + 0x1c]
push dword [edi + 0x18]
push dword [edi + 0x14]
push 0
push eax
call dword [sym.imp.WINHTTP.dll_WinHttpSetTimeouts]
push 1
push ecx
push 0
push 0
push 0
push ebx
mov ecx, edi
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
call fcn.00409cd0
test al, al
je 0x407fb6
lea eax, [ebp - 0x34]
mov ecx, edi
push eax
call fcn.00409c20
test al, al
jne 0x407fbd
mov dword [edi + 0x80], 4
xor al, al
jmp 0x4081fd
xor eax, eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
mov dword [ebp - 4], eax
mov ecx, edi
lea eax, [ebp - 0x28]
push eax
call fcn.00409b90
test al, al
je 0x408010
push 0
push 0x483860
lea ecx, [ebp - 0x28]
call fcn.00404920
cmp eax, 0xffffffff
je 0x408010
mov eax, 5
xor bl, bl
mov dword [edi + 0x80], eax
jmp 0x4081c5
push 0
push 0x80
push 2
push 0
push 2
push 0x40000000
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x408044
mov eax, 7
xor bl, bl
mov dword [edi + 0x80], eax
jmp 0x4081c5
mov esi, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push dword [ebp - 0x34]
push ebx
call esi
push ebx
call dword [sym.imp.KERNEL32.dll_SetEndOfFile]
push 0
push 0
push 0
push ebx
call esi
lea eax, [ebp - 0x30]
push eax
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x40807b
cmp dword [ebp - 0x30], 0
jne 0x408092
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor bl, bl
jmp 0x4081c5
push 0x1000
call fcn.00447d93
add esp, 4
mov esi, eax
mov ecx, dword [edi + 0x7c]
test ecx, ecx
je 0x4080b7
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
test al, al
jne 0x408198
cmp dword [ebp - 0x30], 0x1000
jbe 0x4080d3
push esi
call fcn.00447d78
push dword [ebp - 0x30]
call fcn.00447d93
add esp, 8
mov esi, eax
lea eax, [ebp - 0x3c]
push eax
push dword [ebp - 0x30]
push esi
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpReadData]
test eax, eax
je 0x408198
push 0
lea eax, [ebp - 0x44]
push eax
push dword [ebp - 0x3c]
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x408198
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x44]
jne 0x408198
add dword [ebp - 0x40], eax
mov ecx, dword [edi + 0x7c]
test ecx, ecx
je 0x408160
mov eax, dword [ebp - 0x40]
sub esp, 0x10
mov edx, dword [ecx]
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x484ed0]
mov eax, dword [ebp - 0x34]
movsd qword [esp + 8], xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x484ed0]
movsd qword [esp], xmm0
push 0
push dword [edi + 0x78]
call dword [edx]
lea eax, [ebp - 0x30]
push eax
push dword [edi + 0x10]
call dword [sym.imp.WINHTTP.dll_WinHttpQueryDataAvailable]
test eax, eax
je 0x408198
cmp dword [ebp - 0x30], 0
ja 0x4080a1
mov al, 1
push esi
mov byte [ebp - 0x29], al
mov byte [ebp - 0x34], al
call fcn.00447d78
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [ebp - 0x29]
jmp 0x4081b6
push esi
call fcn.00447d78
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor bl, bl
mov byte [ebp - 0x34], bl
mov ecx, dword [edi + 0x7c]
test ecx, ecx
je 0x4081c5
mov eax, dword [ecx]
push dword [ebp - 0x34]
call dword [eax + 8]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4081fb
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4081f1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40821b
push edx
push ecx
call fcn.00439095
add esp, 8
mov al, bl
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004390b1
mov esp, ebp
pop ebp
ret 8
call fcn.004480ba
int3