Function at 0x414585
Capabilities:
Check if file exists
Check os version
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x234
and dword [ebp - 4], 0
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jbe 0x4145b2
cmp dword [ebp + 0xc], 5
je 0x4145ab
cmp dword [ebp + 0xc], 0x1a
jne 0x4145b2
mov dword [ebp + 0xc], 2
and byte [ebp - 0x234], 0
push ebx
push esi
push edi
push 0x40
xor eax, eax
pop ecx
lea edi, [ebp - 0x233]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x28]
mov byte [ebp - 6], 1
push eax
push dword [ebp + 0xc]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x41461e
and byte [ebp - 6], 0
lea eax, [ebp - 0x234]
push eax
push dword [ebp - 0x28]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
test eax, eax
je 0x41461e
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x41461e
mov eax, dword [ebp - 0x30]
push dword [ebp - 0x28]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 0x30]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
and byte [ebp - 5], 0
cmp dword [ebp + 0xc], 0x26
mov ebx, 0x446564
mov edi, 0x44655c
mov esi, 0x446558
je 0x414641
cmp dword [ebp + 0xc], 0x2b
jne 0x4146e0
lea eax, [ebp - 0x234]
push 0
push eax
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x38], edi
call fcn.00403177
push 0x44c700
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x4c], esi
call fcn.004031e6
push 0
push eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], edi
call fcn.00406d6c
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x24], esi
call fcn.0040252a
lea ecx, [ebp - 0x24]
call fcn.00402db3
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4146d4
lea eax, [ebp - 0x74]
push 0
push eax
lea ecx, [ebp - 0x24]
call fcn.00407325
add eax, 0x10
mov eax, dword [eax]
test eax, eax
jne 0x4146b6
and dword [ebp - 0x2c], eax
jmp 0x4146c0
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov dword [ebp - 0x2c], eax
lea ecx, [ebp - 0x74]
call fcn.0040252a
cmp dword [ebp - 0x2c], 0
je 0x4146d4
and byte [ebp - 5], 0
jmp 0x4146d8
mov byte [ebp - 5], 1
lea ecx, [ebp - 0x24]
call fcn.0040252a
cmp byte [ebp - 6], 0
jne 0x4146ec
cmp byte [ebp - 5], 0
je 0x41470a
cmp dword [ebp + 0xc], 0x1a
je 0x414918
cmp dword [ebp + 0xc], 0x26
je 0x414851
cmp dword [ebp + 0xc], 0x2b
je 0x4147a1
cmp byte [ebp - 0x234], 0
je 0x414743
lea eax, [ebp - 0x234]
push 0
push eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], edi
call fcn.00403177
push 0x44c700
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x24], esi
mov dword [ebp - 4], 1
call fcn.004031e6
jmp 0x414767
lea eax, [ebp - 0x234]
push 0
push eax
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x40], ebx
mov dword [ebp - 0x38], edi
call fcn.00403177
mov dword [ebp - 0x4c], esi
mov dword [ebp - 4], 2
lea eax, [ebp - 0x4c]
mov ecx, dword [ebp + 8]
push 0
push eax
mov dword [ecx + 0xc], ebx
mov dword [ecx + 0x14], edi
call fcn.00406d6c
mov edi, dword [ebp + 8]
test byte [ebp - 4], 2
mov dword [edi], esi
je 0x41478f
and dword [ebp - 4], 0xfffffffd
lea ecx, [ebp - 0x4c]
call fcn.0040252a
test byte [ebp - 4], 1
je 0x41498f
lea ecx, [ebp - 0x24]
jmp 0x41498a
lea eax, [ebp - 0x24]
push 1
push eax
call fcn.0041526c
pop ecx
pop ecx
lea ecx, [ebp - 0x24]
call fcn.00402db3
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4147fe
lea eax, [ebp - 0x130]
push 0
push eax
lea ecx, [ebp - 0x24]
call fcn.00407325
add eax, 0x10
mov eax, dword [eax]
test eax, eax
jne 0x4147e3
and dword [ebp + 0xc], eax
jmp 0x4147ed
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov dword [ebp + 0xc], eax
lea ecx, [ebp - 0x130]
call fcn.0040252a
cmp dword [ebp + 0xc], 0
jne 0x414830
lea eax, [ebp - 0x4c]
push 0x26
push eax
call fcn.00414585
pop ecx
pop ecx
mov ecx, eax
call fcn.00413ee8
push eax
lea ecx, [ebp - 0x24]
call fcn.0040266e
lea ecx, [ebp - 0x4c]
call fcn.0040252a
push str.Common_Files_
lea ecx, [ebp - 0x24]
call fcn.004031e6
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x24]
push 0
push eax
mov dword [ecx + 0xc], ebx
mov dword [ecx + 0x14], edi
call fcn.00406d6c
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x24]
mov dword [edi], esi
jmp 0x41498a
lea eax, [ebp - 0x24]
push 0
push eax
call fcn.0041526c
pop ecx
pop ecx
lea ecx, [ebp - 0x24]
call fcn.00402db3
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x4148ae
lea eax, [ebp - 0xb8]
push 0
push eax
lea ecx, [ebp - 0x24]
call fcn.00407325
add eax, 0x10
mov eax, dword [eax]
test eax, eax
jne 0x414893
and dword [ebp + 0xc], eax
jmp 0x41489d
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
mov dword [ebp + 0xc], eax
lea ecx, [ebp - 0xb8]
call fcn.0040252a
cmp dword [ebp + 0xc], 0
jne 0x4148fa
lea eax, [ebp - 0xe0]
push 0
push eax
lea eax, [ebp - 0x90]
push 0
push eax
call fcn.00412f7e
pop ecx
pop ecx
mov ecx, eax
call fcn.00407325
push eax
lea ecx, [ebp - 0x24]
call fcn.0040266e
lea ecx, [ebp - 0xe0]
call fcn.0040252a
lea ecx, [ebp - 0x90]
call fcn.0040252a
push str.Program_Files_
lea ecx, [ebp - 0x24]
call fcn.00403410
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x24]
push 0
push eax
mov dword [ecx + 0xc], ebx
mov dword [ecx + 0x14], edi
call fcn.00406d6c
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x24]
mov dword [edi], esi
jmp 0x41498a
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x68]
push 5
push eax
call fcn.00414585
pop ecx
pop ecx
mov ecx, eax
call fcn.00413ee8
mov ecx, eax
call fcn.004071b2
push 0
push eax
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x10], edi
call fcn.00406d6c
lea ecx, [ebp - 0x108]
mov dword [ebp - 0x24], esi
call fcn.0040252a
lea ecx, [ebp - 0x68]
call fcn.0040252a
push str.Application_Data_
lea ecx, [ebp - 0x24]
call fcn.004031e6
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x24]
push 0
push eax
mov dword [ecx + 0xc], ebx
mov dword [ecx + 0x14], edi
call fcn.00406d6c
mov edi, dword [ebp + 8]
lea ecx, [ebp - 0x24]
mov dword [edi], esi
call fcn.0040252a
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret