Function at 0x489f36
Capabilities:
Get common file path

Disassembly:
push 0x21c
mov eax, 0x509632
call fcn.004d2c4d
mov edi, ecx
push str.ProgramFiles64Folder
call fcn.004451dc
or esi, 0xffffffff
test eax, eax
jne 0x489fb6
push edi
lea ecx, [ebp - 0x228]
call fcn.004073cf
push str.ProgramW6432
lea ecx, [ebp - 0x228]
call fcn.00471c00
test eax, eax
je 0x489fa5
lea eax, [ebp - 0x228]
mov ecx, edi
push eax
call fcn.004434b9
mov ecx, edi
call fcn.0046f310
or dword [ebp - 4], esi
mov ecx, dword [ebp - 0x228]
lea ecx, [ecx - 0x10]
call fcn.00406df6
mov al, 1
jmp 0x48a255
mov dword [ebp - 4], esi
mov ecx, dword [ebp - 0x228]
lea ecx, [ecx - 0x10]
call fcn.00406df6
push str.SystemFolder
lea ecx, [ebp - 0x224]
mov byte [ebp - 0x21d], 1
call fcn.00409419
mov ecx, edi
push dword [eax]
call fcn.004451dc
mov ebx, eax
neg ebx
sbb bl, bl
mov dword [ebp - 4], esi
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffffff0
call fcn.00406df6
add bl, 1
je 0x48a00b
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x48a052
call fcn.004d289c
push str.WindowsFolder
lea ecx, [ebp - 0x224]
call fcn.00409419
mov ecx, edi
push dword [eax]
call fcn.004451dc
mov ebx, eax
neg ebx
sbb bl, bl
mov dword [ebp - 4], esi
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffffff0
call fcn.00406df6
add bl, 1
je 0x48a066
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x5c
pop ecx
mov word [ebp + eax*2 - 0x21c], cx
lea eax, [eax*2 + 2]
jmp 0x48a0dc
push str.WindowsVolume
lea ecx, [ebp - 0x224]
call fcn.00409419
mov ecx, edi
push dword [eax]
call fcn.004451dc
mov ebx, eax
neg ebx
sbb bl, bl
mov dword [ebp - 4], esi
mov ecx, dword [ebp - 0x224]
add ecx, 0xfffffff0
call fcn.00406df6
add bl, 1
je 0x48a0b8
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor eax, eax
mov word [ebp - 0x216], ax
jmp 0x48a0f1
push str.TempFolder
mov ecx, edi
call fcn.004451dc
test eax, eax
jne 0x48a10a
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
add eax, eax
cmp eax, 0x208
jae 0x48a006
xor ecx, ecx
mov word [ebp + eax - 0x21c], cx
lea eax, [ebp - 0x21c]
mov ecx, edi
push eax
call fcn.004093f1
mov al, byte [ebp - 0x21d]
jmp 0x48a255
push str.SETUPEXEDIR
mov ecx, edi
call fcn.004451dc
test eax, eax
jne 0x48a19e
mov eax, dword [0x56b840]
mov esi, 0x56b840
cmp dword [eax - 0xc], 0
jne 0x48a191
push 0x104
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub eax, 1
je 0x48a159
push 0x5c
pop ecx
cmp word [ebp + eax*2 - 0x21c], cx
je 0x48a159
sub eax, 1
jne 0x48a14a
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x48a006
xor ecx, ecx
mov word [ebp + eax - 0x21c], cx
lea eax, [ebp - 0x21c]
push eax
call fcn.004d828d
pop ecx
push eax
lea eax, [ebp - 0x21c]
mov ecx, esi
push eax
call fcn.0040937e
push esi
mov ecx, edi
call fcn.004434b9
jmp 0x48a0ff
xor esi, esi
push dword [esi*4 + 0x52dd80]
mov ecx, edi
call fcn.004451dc
test eax, eax
je 0x48a1b8
inc esi
cmp esi, 0xe
jb 0x48a1a0
cmp esi, 0xe
jae 0x48a253
lea eax, [ebp - 0x224]
push eax
push dword [esi*4 + 0x52ddb8]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x48a1fa
mov ecx, dword [esi*4 + 0x52ddb8]
mov edx, edi
call fcn.0048a25b
test al, al
jne 0x48a0ff
mov ecx, edi
call fcn.0048a35f
jmp 0x48a255
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0x224]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
and dword [ebp - 0x228], 0
mov esi, eax
lea eax, [ebp - 0x228]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov ecx, dword [ebp - 0x228]
push dword [ebp - 0x224]
push ecx
mov edx, dword [ecx]
call dword [edx + 0x14]
test esi, esi
je 0x48a253
lea eax, [ebp - 0x21c]
mov ecx, edi
push eax
call fcn.004093f1
mov ecx, edi
call fcn.0046f310
jmp 0x48a0ff
xor al, al
call fcn.004d2bf7
ret