Function at 0x415919
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.00415029
test al, al
je 0x415958
mov al, 1
jmp 0x415c5d
push ebx
xor ebx, ebx
push ebx
push 0x473a64
mov ecx, esi
call fcn.00414f0e
mov dword [ebp - 0x64], eax
cmp eax, 0xffffffff
jne 0x415998
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 0x415c55
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 0x415a19
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 0x415bc3
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 0x415a86
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 0x415a11
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 0x415b14
xor eax, eax
push 0x206
mov word [ebp + 0x204], ax
lea eax, [ebp + 0x206]
push ebx
push eax
call fcn.0044d0c0
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 0x415a6e
push 0x476880
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 0x415ba0
xor eax, eax
push 0x206
mov word [ebp + 0x204], ax
lea eax, [ebp + 0x206]
push ebx
push eax
call fcn.0044d0c0
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 0x415b02
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.0044d0c0
mov eax, dword [ebp - 0x60]
add esp, 0xc
cmp dword [eax + 0x18], 8
jb 0x415bf0
mov eax, dword [eax + 4]
jmp 0x415bf3
add eax, 4
push 0xffffffffffffffff
push eax
lea eax, [ebp - 4]
push 0x104
push eax
call fcn.0044e8de
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 0x415c46
lea eax, [ebp - 4]
push eax
push ebx
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
test eax, eax
je 0x415c46
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.0044c398
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.0044cad9
add ebp, 0x410
leave
ret 8