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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4c614d
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x4fa534]
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 0x40a52d
push eax
call esi
mov dword [edi + 0x10], 0
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40a53e
push eax
call esi
mov dword [edi + 0xc], 0
mov eax, dword [edi + 8]
test eax, eax
je 0x40a54f
push eax
call esi
mov dword [edi + 8], 0
push 0
push 0
push 0
push 0
push 0x4e920c
call dword [sym.imp.WINHTTP.dll_WinHttpOpen]
mov dword [edi + 8], eax
test eax, eax
jne 0x40a57a
mov dword [edi + 0x80], 1
xor al, al
jmp 0x40a81d
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.0040c590
test al, al
je 0x40a5d6
lea eax, [ebp - 0x34]
mov ecx, edi
push eax
call fcn.0040c4f0
test al, al
jne 0x40a5dd
mov dword [edi + 0x80], 4
xor al, al
jmp 0x40a81d
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.0040c460
test al, al
je 0x40a630
push 0
push 0x4e8e68
lea ecx, [ebp - 0x28]
call fcn.00405030
cmp eax, 0xffffffff
je 0x40a630
mov eax, 5
xor bl, bl
mov dword [edi + 0x80], eax
jmp 0x40a7e5
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 0x40a664
mov eax, 7
xor bl, bl
mov dword [edi + 0x80], eax
jmp 0x40a7e5
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 0x40a69b
cmp dword [ebp - 0x30], 0
jne 0x40a6b2
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
xor bl, bl
jmp 0x40a7e5
push 0x1000
call fcn.00470500
add esp, 4
mov esi, eax
mov ecx, dword [edi + 0x7c]
test ecx, ecx
je 0x40a6d7
mov eax, dword [ecx]
mov eax, dword [eax + 4]
call eax
test al, al
jne 0x40a7b8
cmp dword [ebp - 0x30], 0x1000
jbe 0x40a6f3
push esi
call fcn.004704e5
push dword [ebp - 0x30]
call fcn.00470500
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 0x40a7b8
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 0x40a7b8
mov eax, dword [ebp - 0x3c]
cmp eax, dword [ebp - 0x44]
jne 0x40a7b8
add dword [ebp - 0x40], eax
mov ecx, dword [edi + 0x7c]
test ecx, ecx
je 0x40a780
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 + 0x4e9550]
mov eax, dword [ebp - 0x34]
movsd qword [esp + 8], xmm0
movd xmm0, eax
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x4e9550]
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 0x40a7b8
cmp dword [ebp - 0x30], 0
ja 0x40a6c1
mov al, 1
push esi
mov byte [ebp - 0x29], al
mov byte [ebp - 0x34], al
call fcn.004704e5
add esp, 4
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, byte [ebp - 0x29]
jmp 0x40a7d6
push esi
call fcn.004704e5
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 0x40a7e5
mov eax, dword [ecx]
push dword [ebp - 0x34]
call dword [eax + 8]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x40a81b
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40a811
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x40a83b
push edx
push ecx
call fcn.0043c464
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.0043c480
mov esp, ebp
pop ebp
ret 8
call fcn.00470977
int3