Function at 0x40f9f7
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 0x40fa67
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 0x40fa67
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, 0x446878
mov esi, 0x446870
push eax
lea ecx, [ebp - 0x88]
mov byte [ebp - 2], bl
mov dword [ebp - 0x88], edi
mov dword [ebp - 0x68], esi
call fcn.0040cb18
push 0x44c700
lea ecx, [ebp - 0x88]
call fcn.0040b4c1
lea ecx, [ebp - 0x88]
call fcn.00410472
cmp dword [ebp + 0xc], 0x2b
je 0x40fabb
cmp dword [ebp + 0xc], 0x26
jne 0x40fb01
lea ecx, [ebp - 0x88]
call fcn.0040cea0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40fafd
lea eax, [ebp - 0xbc]
lea ecx, [ebp - 0x88]
push eax
call fcn.004102a2
mov eax, dword [eax + 0xc]
lea ecx, [ebp - 0xbc]
mov dword [ebp - 0x60], eax
call fcn.0040e0a8
cmp dword [ebp - 0x60], ebx
mov byte [ebp - 2], bl
jne 0x40fb01
mov byte [ebp - 2], 1
cmp byte [ebp - 1], bl
jne 0x40fb0b
cmp byte [ebp - 2], bl
je 0x40fb63
lea eax, [ebp - 3]
push ebx
push eax
lea ecx, [ebp - 0x34]
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x14], esi
call fcn.00403e8f
mov eax, dword [ebp + 0xc]
sub eax, 5
je 0x40fea4
sub eax, 0xf
je 0x40fe48
sub eax, 6
je 0x40fd0d
dec eax
dec eax
je 0x40fd0d
sub eax, 7
je 0x40fd0d
sub eax, 3
je 0x40fc2f
sub eax, 5
je 0x40fb7d
lea ecx, [ebp - 0x34]
call fcn.0040e0a8
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x88]
push ebx
push eax
mov dword [ecx], edi
mov dword [ecx + 0x20], esi
call fcn.00403eea
jmp 0x40ffce
lea eax, [ebp - 0x5c]
push 1
push eax
call fcn.00410794
pop ecx
pop ecx
lea ecx, [ebp - 0x5c]
call fcn.00410472
lea ecx, [ebp - 0x5c]
call fcn.0040cea0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40fbcb
lea eax, [ebp - 0x2a4]
lea ecx, [ebp - 0x5c]
push eax
call fcn.004102a2
mov eax, dword [eax + 0xc]
lea ecx, [ebp - 0x2a4]
mov dword [ebp + 0xc], eax
call fcn.0040e0a8
cmp dword [ebp + 0xc], ebx
jne 0x40fc15
lea eax, [ebp - 0x1d4]
push 0x26
push eax
call fcn.0040f9f7
pop ecx
pop ecx
mov ecx, eax
call fcn.0040b44a
push dword [0x4465b0]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x58]
call fcn.0040439f
lea ecx, [ebp - 0x1d4]
call fcn.0040e0a8
push str.Common_Files_
lea ecx, [ebp - 0x5c]
call fcn.0040b4c1
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x5c]
push ebx
push eax
mov dword [ecx], edi
mov dword [ecx + 0x20], esi
call fcn.00403eea
lea ecx, [ebp - 0x5c]
jmp 0x40fe9a
lea eax, [ebp - 0x5c]
push ebx
push eax
call fcn.00410794
pop ecx
pop ecx
lea ecx, [ebp - 0x5c]
call fcn.00410472
lea ecx, [ebp - 0x5c]
call fcn.0040cea0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x40fc7c
lea eax, [ebp - 0x30c]
lea ecx, [ebp - 0x5c]
push eax
call fcn.004102a2
mov eax, dword [eax + 0xc]
lea ecx, [ebp - 0x30c]
mov dword [ebp + 0xc], eax
call fcn.0040e0a8
cmp dword [ebp + 0xc], ebx
jne 0x40fcf3
lea eax, [ebp - 0x134]
push ebx
push eax
call fcn.0040ffe1
pop ecx
pop ecx
push dword [0x4465b0]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x58]
call fcn.0040439f
lea ecx, [ebp - 0x134]
call fcn.0040e0a8
lea eax, [ebp - 0x208]
lea ecx, [ebp - 0x5c]
push eax
call fcn.004102a2
push dword [0x4465b0]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x58]
call fcn.0040439f
lea ecx, [ebp - 0x208]
call fcn.0040e0a8
push str.Program_Files
lea ecx, [ebp - 0x5c]
call fcn.0040b4c1
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x5c]
push ebx
push eax
mov dword [ecx], edi
mov dword [ecx + 0x20], esi
call fcn.00403eea
lea ecx, [ebp - 0x5c]
jmp 0x40fe9a
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jbe 0x40fd4f
lea eax, [ebp - 0x1ac]
push ebx
push eax
call fcn.0040ffe1
pop ecx
pop ecx
push dword [0x4465b0]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.0040439f
lea ecx, [ebp - 0x1ac]
jmp 0x40fe03
lea eax, [ebp - 0x15c]
push 5
push eax
call fcn.0040f9f7
pop ecx
pop ecx
push dword [0x4465b0]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.0040439f
lea ecx, [ebp - 0x15c]
call fcn.0040e0a8
cmp dword [ebp - 0x28], ebx
je 0x40fe08
lea eax, [ebp - 0x374]
lea ecx, [ebp - 0x34]
push eax
call fcn.0040b44a
mov ecx, eax
call fcn.00410223
push dword [0x4465b0]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.0040439f
lea ecx, [ebp - 0x374]
call fcn.0040e0a8
cmp dword [ebp + 0xc], 0x23
jne 0x40fe3e
lea eax, [ebp - 0x23c]
lea ecx, [ebp - 0x34]
push eax
call fcn.0040b44a
mov ecx, eax
call fcn.00410223
push dword [0x4465b0]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.0040439f
lea ecx, [ebp - 0x23c]
call fcn.0040e0a8
cmp dword [ebp + 0xc], 0x23
jne 0x40fe3e
lea eax, [ebp - 3]
push 1
push eax
push str.All_Users_
lea ecx, [ebp - 0xe4]
call fcn.0040cb18
lea eax, [ebp - 0xe4]
lea ecx, [ebp - 0x34]
push eax
call fcn.004103a0
lea ecx, [ebp - 0xe4]
call fcn.0040e0a8
push str.Application_Data_
jmp 0x40ffac
lea eax, [ebp - 0x5c]
push 1
push eax
call fcn.0040ffe1
pop ecx
lea eax, [ebp - 1]
pop ecx
push 1
push eax
push str.Fonts
lea ecx, [ebp - 0x10c]
call fcn.0040cb18
lea eax, [ebp - 0x10c]
lea ecx, [ebp - 0x5c]
push eax
call fcn.004103a0
lea ecx, [ebp - 0x10c]
call fcn.0040e0a8
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x5c]
push ebx
push eax
mov dword [ecx], edi
mov dword [ecx + 0x20], esi
call fcn.00403eea
lea ecx, [ebp - 0x5c]
call fcn.0040e0a8
jmp 0x40ffc6
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp eax, 0x80000000
jbe 0x40ff04
lea eax, [ebp - 0x270]
push eax
lea eax, [ebp - 0x184]
push ebx
push eax
call fcn.0040ffe1
pop ecx
pop ecx
mov ecx, eax
call fcn.004102a2
push dword [0x4465b0]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.0040439f
lea ecx, [ebp - 0x270]
call fcn.0040e0a8
lea ecx, [ebp - 0x184]
call fcn.0040e0a8
jmp 0x40ffa0
lea eax, [ebp - 0x2d8]
push eax
lea eax, [ebp - 0xb0]
push 2
push eax
call fcn.0040f9f7
pop ecx
pop ecx
mov ecx, eax
call fcn.0040b44a
mov ecx, eax
call fcn.00410223
push dword [0x4465b0]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.0040439f
lea ecx, [ebp - 0x2d8]
call fcn.0040e0a8
lea ecx, [ebp - 0xb0]
call fcn.0040e0a8
lea eax, [ebp - 0x340]
lea ecx, [ebp - 0x34]
push eax
call fcn.0040b44a
mov ecx, eax
call fcn.00410223
push dword [0x4465b0]
mov ecx, eax
add eax, 4
neg ecx
sbb ecx, ecx
push ebx
and ecx, eax
push ecx
lea ecx, [ebp - 0x30]
call fcn.0040439f
lea ecx, [ebp - 0x340]
call fcn.0040e0a8
call dword [sym.imp.KERNEL32.dll_GetVersion]
cmp al, 5
jb 0x40ffa7
push str.My_Documents_
jmp 0x40ffac
push str.Personal_
lea ecx, [ebp - 0x34]
call fcn.0040b4c1
mov ecx, dword [ebp + 8]
lea eax, [ebp - 0x34]
push ebx
push eax
mov dword [ecx], edi
mov dword [ecx + 0x20], esi
call fcn.00403eea
lea ecx, [ebp - 0x34]
call fcn.0040e0a8
lea ecx, [ebp - 0x88]
call fcn.0040e0a8
mov eax, dword [ebp + 8]
pop edi
pop esi
pop ebx
leave
ret