Function at 0x49173a
Capabilities:
Get common file path

Disassembly:
push 0x21c
mov eax, 0x50d216
call fcn.004d0e17
mov byte [ebp - 0x221], dl
mov edi, ecx
push str.ProgramFiles64Folder
push dword [edi]
call fcn.004d87a0
pop ecx
pop ecx
test eax, eax
jne 0x4917c1
push edi
lea ecx, [ebp - 0x228]
call fcn.004069f3
and dword [ebp - 4], 0
lea ecx, [ebp - 0x228]
push str.ProgramW6432
call fcn.004772d0
test eax, eax
je 0x4917b2
lea eax, [ebp - 0x228]
mov ecx, edi
push eax
call fcn.0044d0c3
mov ecx, edi
call fcn.004740e0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.0040ca45
mov al, 1
jmp 0x491acd
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.0040ca45
xor ebx, ebx
lea ecx, [ebp - 0x220]
push str.SystemFolder
inc ebx
call fcn.0040d264
mov dword [ebp - 4], ebx
mov ecx, edi
push dword [eax]
call fcn.004068f0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
mov esi, eax
call fcn.0040ca45
test esi, esi
jne 0x491840
lea eax, [ebp - 0x21c]
xor ecx, ecx
push eax
movzx eax, byte [ebp - 0x221]
xor eax, ebx
push ecx
push ecx
lea eax, [eax*4 + 0x25]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x21c]
push eax
call fcn.004d5c34
pop ecx
push eax
lea eax, [ebp - 0x21c]
mov ecx, edi
push eax
call fcn.0040d1b7
mov ecx, edi
call fcn.004740e0
jmp 0x491acb
push str.System32Folder
lea ecx, [ebp - 0x220]
call fcn.0040d264
mov dword [ebp - 4], 2
mov ecx, edi
push dword [eax]
call fcn.004068f0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
mov esi, eax
call fcn.0040ca45
test esi, esi
jne 0x4918a3
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
push 0x5c
pop ecx
mov word [ebp + eax*2 - 0x21c], cx
lea eax, [eax*2 + 2]
jmp 0x491964
call fcn.004d0a67
push str.WindowsFolder
lea ecx, [ebp - 0x220]
call fcn.0040d264
mov dword [ebp - 4], 3
mov ecx, edi
push dword [eax]
call fcn.004068f0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
mov esi, eax
call fcn.0040ca45
test esi, esi
jne 0x4918ec
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x491887
push str.WindowsVolume
lea ecx, [ebp - 0x220]
call fcn.0040d264
mov dword [ebp - 4], 4
mov ecx, edi
push dword [eax]
call fcn.004068f0
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
mov esi, eax
call fcn.0040ca45
test esi, esi
jne 0x49193e
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor eax, eax
mov word [ebp - 0x216], ax
jmp 0x491979
push str.TempFolder
push dword [edi]
call fcn.004d87a0
pop ecx
pop ecx
test eax, eax
jne 0x49199a
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
add eax, eax
cmp eax, 0x208
jae 0x49189e
xor ecx, ecx
mov word [ebp + eax - 0x21c], cx
lea eax, [ebp - 0x21c]
push eax
call fcn.004d5c34
pop ecx
push eax
lea eax, [ebp - 0x21c]
mov ecx, edi
push eax
call fcn.0040d1b7
jmp 0x491acb
push str.SETUPEXEDIR
push dword [edi]
call fcn.004d87a0
pop ecx
pop ecx
test eax, eax
jne 0x491a30
mov eax, dword [0x5735e4]
mov esi, 0x5735e4
cmp dword [eax - 0xc], 0
jne 0x491a23
push 0x104
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub eax, 1
je 0x4919eb
push 0x5c
pop ecx
cmp word [ebp + eax*2 - 0x21c], cx
je 0x4919eb
sub eax, 1
jne 0x4919dc
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x49189e
xor ecx, ecx
mov word [ebp + eax - 0x21c], cx
lea eax, [ebp - 0x21c]
push eax
call fcn.004d5c34
pop ecx
push eax
lea eax, [ebp - 0x21c]
mov ecx, esi
push eax
call fcn.0040d1b7
push esi
mov ecx, edi
call fcn.0044d0c3
jmp 0x491acb
xor esi, esi
push dword [esi*4 + 0x536f40]
mov ecx, edi
call fcn.004068f0
test eax, eax
je 0x491a4a
inc esi
cmp esi, 0xe
jb 0x491a32
cmp esi, 0xe
jae 0x491ac9
lea eax, [ebp - 0x220]
push eax
push dword [esi*4 + 0x536f78]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x491a86
mov ecx, dword [esi*4 + 0x536f78]
mov edx, edi
call fcn.00491ad3
test al, al
jne 0x491acb
mov ecx, edi
call fcn.00491bc8
mov bl, al
jmp 0x491acb
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0x220]
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 - 0x220]
push ecx
mov edx, dword [ecx]
call dword [edx + 0x14]
test esi, esi
jne 0x491818
xor bl, bl
mov al, bl
call fcn.004d0dc1
ret