Function at 0x415a11
Capabilities:
Check if file exists
Get common file path
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x410]
sub esp, 0x490
mov eax, dword [0x4d9778]
xor eax, ebp
mov dword [ebp + 0x40c], eax
mov eax, dword [ebp + 0x41c]
push esi
mov esi, dword [ebp + 0x418]
push edi
push esi
mov edi, ecx
mov dword [ebp - 0x60], eax
call fcn.00415121
test al, al
je 0x415a50
mov al, 1
jmp 0x415d55
push ebx
xor ebx, ebx
push ebx
push 0x473a64
mov ecx, esi
call fcn.00415006
mov dword [ebp - 0x64], eax
cmp eax, 0xffffffff
jne 0x415a90
push esi
add edi, 4
lea eax, [ebp - 0x20]
push edi
push eax
call fcn.00406c5e
mov ecx, dword [ebp - 0x60]
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
call fcn.00406799
push ebx
push 1
lea ecx, [ebp - 0x20]
jmp 0x415d4d
lea ecx, [ebp - 0x59]
push ecx
push 0xffffffffffffffff
inc eax
push eax
push esi
lea ecx, [ebp - 0x3c]
call fcn.00406a1f
lea eax, [ebp - 0x59]
push eax
push dword [ebp - 0x64]
lea ecx, [ebp - 0x58]
push ebx
push esi
call fcn.00406a1f
push str.InstallDir
lea ecx, [ebp - 0x20]
call fcn.00406c07
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00408ac6
pop ecx
neg eax
sbb al, al
pop ecx
xor esi, esi
push ebx
inc al
inc esi
push esi
lea ecx, [ebp - 0x20]
mov byte [ebp - 0x59], al
call fcn.004064bb
cmp byte [ebp - 0x59], bl
je 0x415b11
lea eax, [ebp - 0x3c]
push eax
add edi, 4
lea eax, [ebp - 0x20]
push edi
push eax
call fcn.00406c5e
mov ecx, dword [ebp - 0x60]
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
call fcn.00406799
lea ecx, [ebp - 0x20]
jmp 0x415cbb
push str.AppData
lea ecx, [ebp - 0x20]
call fcn.00406c07
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00408ac6
pop ecx
pop ecx
neg eax
sbb al, al
push ebx
inc al
push esi
lea ecx, [ebp - 0x20]
mov byte [ebp - 0x59], al
call fcn.004064bb
cmp byte [ebp - 0x59], bl
je 0x415b7e
add edi, 4
lea eax, [ebp - 0x20]
push edi
push eax
call fcn.00409ac8
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x20]
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.00406c5e
add esp, 0x14
mov ecx, dword [ebp - 0x60]
push 0xffffffffffffffff
push ebx
push eax
call fcn.00406799
push ebx
push esi
lea ecx, [ebp - 0x80]
call fcn.004064bb
jmp 0x415b09
push str.TEMP
lea ecx, [ebp - 0x20]
call fcn.00406c07
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00408ac6
pop ecx
pop ecx
neg eax
sbb al, al
push ebx
inc al
push esi
lea ecx, [ebp - 0x20]
mov byte [ebp - 0x59], al
call fcn.004064bb
cmp byte [ebp - 0x59], bl
je 0x415c0c
xor eax, eax
push 0x206
mov word [ebp + 0x204], ax
lea eax, [ebp + 0x206]
push ebx
push eax
call fcn.0044d010
add esp, 0xc
push 0x104
lea eax, [ebp + 0x204]
push eax
push str.TEMP
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp + 0x204]
push eax
lea ecx, [ebp - 0x20]
call fcn.00406c07
push eax
lea eax, [ebp - 0x80]
push eax
call fcn.00406c5e
add esp, 0xc
jmp 0x415b66
push 0x4768a0
lea ecx, [ebp - 0x20]
call fcn.00406c07
lea eax, [ebp - 0x58]
push eax
lea eax, [ebp - 0x20]
push eax
call fcn.00408ac6
pop ecx
pop ecx
neg eax
sbb al, al
push ebx
inc al
push esi
lea ecx, [ebp - 0x20]
mov byte [ebp - 0x59], al
call fcn.004064bb
cmp byte [ebp - 0x59], bl
je 0x415c98
xor eax, eax
push 0x206
mov word [ebp + 0x204], ax
lea eax, [ebp + 0x206]
push ebx
push eax
call fcn.0044d010
add esp, 0xc
lea eax, [ebp + 0x204]
push eax
push ebx
push ebx
push 0x1a
push ebx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp + 0x204]
push eax
lea ecx, [ebp - 0x20]
call fcn.00406c07
push str.duowanyyyypip
lea ecx, [ebp - 0x20]
call fcn.0040698e
lea eax, [ebp - 0x3c]
push eax
lea eax, [ebp - 0x20]
jmp 0x415bfa
lea eax, [ebp - 0x3c]
push eax
add edi, 4
lea eax, [ebp - 0x80]
push edi
push eax
call fcn.00406c5e
mov ecx, dword [ebp - 0x60]
add esp, 0xc
push 0xffffffffffffffff
push ebx
push eax
call fcn.00406799
lea ecx, [ebp - 0x80]
push ebx
push esi
call fcn.004064bb
xor eax, eax
push 0x206
mov word [ebp - 4], ax
lea eax, [ebp - 2]
push ebx
push eax
call fcn.0044d010
mov eax, dword [ebp - 0x60]
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x415ce8
mov eax, dword [eax + 4]
jmp 0x415ceb
add eax, 4
push 0xffffffffffffffff
push eax
lea eax, [ebp - 4]
push 0x104
push eax
call fcn.0044e82e
add esp, 0x10
lea eax, [ebp - 4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 4]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x415d3e
lea eax, [ebp - 4]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
je 0x415d3e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [ebp - 4]
push eax
push str.SHCreateDirectory_fail__path_is__s__last_error_is__d
call fcn.0044c2ed
add esp, 0xc
push ebx
push esi
lea ecx, [ebp - 0x58]
call fcn.004064bb
push ebx
push esi
lea ecx, [ebp - 0x3c]
call fcn.004064bb
xor al, al
pop ebx
mov ecx, dword [ebp + 0x40c]
pop edi
xor ecx, ebp
pop esi
call fcn.0044ca2f
add ebp, 0x410
leave
ret 8