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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x478
push ebx
push esi
push edi
push 0x40
xor ebx, ebx
pop ecx
xor eax, eax
lea edi, [ebp - 0x477]
mov byte [ebp - 0x478], bl
mov byte [ebp - 1], 1
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 8]
push eax
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jl 0x40fb20
lea eax, [ebp - 0x478]
mov byte [ebp - 1], bl
push eax
push dword [ebp - 8]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
lea eax, [ebp - 0xc]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
test eax, eax
jl 0x40fb20
mov eax, dword [ebp - 0xc]
push dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
lea eax, [ebp - 3]
push ebx
push eax
lea eax, [ebp - 0x478]
mov edi, 0x446870
mov esi, 0x446868
push eax
lea ecx, [ebp - 0x88]
mov byte [ebp - 2], bl
mov dword [ebp - 0x88], edi
mov dword [ebp - 0x68], esi
call fcn.0040cc06
push 0x44c700
lea ecx, [ebp - 0x88]
call fcn.0040b50c
lea ecx, [ebp - 0x88]
call fcn.0041052b
cmp dword [ebp + 0xc], 0x2b
je 0x40fb74
cmp dword [ebp + 0xc], 0x26
jne 0x40fbba
lea ecx, [ebp - 0x88]
call fcn.0040cf8e
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40fbb6
lea eax, [ebp - 0xbc]
lea ecx, [ebp - 0x88]
push eax
call fcn.0041035b
mov eax, dword [eax + 0xc]
lea ecx, [ebp - 0xbc]
mov dword [ebp - 0x60], eax
call fcn.00403643
cmp dword [ebp - 0x60], ebx
mov byte [ebp - 2], bl
jne 0x40fbba
mov byte [ebp - 2], 1
cmp byte [ebp - 1], bl
jne 0x40fbc4
cmp byte [ebp - 2], bl
je 0x40fc1c
lea eax, [ebp - 3]
push ebx
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x14], esi
call fcn.00403e51
mov eax, dword [ebp + 0xc]
sub eax, 5
je 0x40ff5d
sub eax, 0xf
je 0x40ff01
sub eax, 6
je 0x40fdc6
dec eax
dec eax
je 0x40fdc6
sub eax, 7
je 0x40fdc6
sub eax, 3
je 0x40fce8
sub eax, 5
je 0x40fc36
lea ecx, [ebp - 0x34]
call fcn.00403643
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x88]
push ebx
push eax
mov dword [ecx], edi
mov dword [ecx + 0x20], esi
call fcn.00403eac
jmp 0x410087
lea eax, [ebp - 0x5c]
push 1
push eax
call fcn.0041084d
pop ecx
pop ecx
lea ecx, [ebp - 0x5c]
call fcn.0041052b
lea ecx, [ebp - 0x5c]
call fcn.0040cf8e
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40fc84
lea eax, [ebp - 0x2a4]
lea ecx, [ebp - 0x5c]
push eax
call fcn.0041035b
mov eax, dword [eax + 0xc]
lea ecx, [ebp - 0x2a4]
mov dword [ebp + 0xc], eax
call fcn.00403643
cmp dword [ebp + 0xc], ebx
jne 0x40fcce
lea eax, [ebp - 0x1d4]
push 0x26
push eax
call fcn.0040fab0
pop ecx
pop ecx
mov ecx, eax
call fcn.0040b495
push dword [0x4465a8]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x58]
call fcn.00404361
lea ecx, [ebp - 0x1d4]
call fcn.00403643
push 0x44cfd8
lea ecx, [ebp - 0x5c]
call fcn.0040b50c
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x5c]
push ebx
push eax
mov dword [ecx], edi
mov dword [ecx + 0x20], esi
call fcn.00403eac
lea ecx, [ebp - 0x5c]
jmp 0x40ff53
lea eax, [ebp - 0x5c]
push ebx
push eax
call fcn.0041084d
pop ecx
pop ecx
lea ecx, [ebp - 0x5c]
call fcn.0041052b
lea ecx, [ebp - 0x5c]
call fcn.0040cf8e
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40fd35
lea eax, [ebp - 0x30c]
lea ecx, [ebp - 0x5c]
push eax
call fcn.0041035b
mov eax, dword [eax + 0xc]
lea ecx, [ebp - 0x30c]
mov dword [ebp + 0xc], eax
call fcn.00403643
cmp dword [ebp + 0xc], ebx
jne 0x40fdac
lea eax, [ebp - 0x134]
push ebx
push eax
call fcn.0041009a
pop ecx
pop ecx
push dword [0x4465a8]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x58]
call fcn.00404361
lea ecx, [ebp - 0x134]
call fcn.00403643
lea eax, [ebp - 0x208]
lea ecx, [ebp - 0x5c]
push eax
call fcn.0041035b
push dword [0x4465a8]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x58]
call fcn.00404361
lea ecx, [ebp - 0x208]
call fcn.00403643
push 0x44cfbc
lea ecx, [ebp - 0x5c]
call fcn.0040b50c
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x5c]
push ebx
push eax
mov dword [ecx], edi
mov dword [ecx + 0x20], esi
call fcn.00403eac
lea ecx, [ebp - 0x5c]
jmp 0x40ff53
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jbe 0x40fe08
lea eax, [ebp - 0x1ac]
push ebx
push eax
call fcn.0041009a
pop ecx
pop ecx
push dword [0x4465a8]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.00404361
lea ecx, [ebp - 0x1ac]
jmp 0x40febc
lea eax, [ebp - 0x15c]
push 5
push eax
call fcn.0040fab0
pop ecx
pop ecx
push dword [0x4465a8]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.00404361
lea ecx, [ebp - 0x15c]
call fcn.00403643
cmp dword [ebp - 0x28], ebx
je 0x40fec1
lea eax, [ebp - 0x374]
lea ecx, [ebp - 0x34]
push eax
call fcn.0040b495
mov ecx, eax
call fcn.004102dc
push dword [0x4465a8]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.00404361
lea ecx, [ebp - 0x374]
call fcn.00403643
cmp dword [ebp + 0xc], 0x23
jne 0x40fef7
lea eax, [ebp - 0x23c]
lea ecx, [ebp - 0x34]
push eax
call fcn.0040b495
mov ecx, eax
call fcn.004102dc
push dword [0x4465a8]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.00404361
lea ecx, [ebp - 0x23c]
call fcn.00403643
cmp dword [ebp + 0xc], 0x23
jne 0x40fef7
lea eax, [ebp - 3]
push 1
push eax
push 0x44cfb0
lea ecx, [ebp - 0xe4]
call fcn.0040cc06
lea eax, [ebp - 0xe4]
lea ecx, [ebp - 0x34]
push eax
call fcn.00410459
lea ecx, [ebp - 0xe4]
call fcn.00403643
push 0x44cf8c
jmp 0x410065
lea eax, [ebp - 0x5c]
push 1
push eax
call fcn.0041009a
pop ecx
lea eax, [ebp - 1]
pop ecx
push 1
push eax
push 0x44cf84
lea ecx, [ebp - 0x10c]
call fcn.0040cc06
lea eax, [ebp - 0x10c]
lea ecx, [ebp - 0x5c]
push eax
call fcn.00410459
lea ecx, [ebp - 0x10c]
call fcn.00403643
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x5c]
push ebx
push eax
mov dword [ecx], edi
mov dword [ecx + 0x20], esi
call fcn.00403eac
lea ecx, [ebp - 0x5c]
call fcn.00403643
jmp 0x41007f
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jbe 0x40ffbd
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x184]
push ebx
push eax
call fcn.0041009a
pop ecx
pop ecx
mov ecx, eax
call fcn.0041035b
push dword [0x4465a8]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.00404361
lea ecx, [ebp - 0x270]
call fcn.00403643
lea ecx, [ebp - 0x184]
call fcn.00403643
jmp 0x410059
lea eax, [ebp - 0x2d8]
push eax
lea eax, [ebp - 0xb0]
push 2
push eax
call fcn.0040fab0
pop ecx
pop ecx
mov ecx, eax
call fcn.0040b495
mov ecx, eax
call fcn.004102dc
push dword [0x4465a8]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.00404361
lea ecx, [ebp - 0x2d8]
call fcn.00403643
lea ecx, [ebp - 0xb0]
call fcn.00403643
lea eax, [ebp - 0x340]
lea ecx, [ebp - 0x34]
push eax
call fcn.0040b495
mov ecx, eax
call fcn.004102dc
push dword [0x4465a8]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.00404361
lea ecx, [ebp - 0x340]
call fcn.00403643
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 5
jb 0x410060
push 0x44cf68
jmp 0x410065
push 0x44cf54
lea ecx, [ebp - 0x34]
call fcn.0040b50c
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x34]
push ebx
push eax
mov dword [ecx], edi
mov dword [ecx + 0x20], esi
call fcn.00403eac
lea ecx, [ebp - 0x34]
call fcn.00403643
lea ecx, [ebp - 0x88]
call fcn.00403643
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret