Function at 0x477d46
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov eax, dword [0x52472c]
xor eax, ebp
mov dword [ebp + 0x3a0], eax
push edi
mov edi, ecx
push str.ProgramFiles64Folder
push edi
call fcn.0043b02c
test eax, eax
jne 0x477db4
push edi
lea eax, [ebp - 0x80]
push eax
call fcn.0041804a
push 0x4fe818
lea eax, [ebp - 0x80]
call fcn.00461570
test eax, eax
je 0x477dac
lea eax, [ebp - 0x80]
call fcn.0044607b
mov eax, edi
call fcn.0045eef0
lea ecx, [ebp - 0x80]
call fcn.00402964
mov al, 1
jmp 0x477fc9
lea ecx, [ebp - 0x80]
call fcn.00402964
push ebx
push esi
push str.SystemFolder
lea eax, [ebp - 0x7c]
push eax
mov byte [ebp - 0x75], 1
call fcn.004054af
push dword [eax]
push edi
call fcn.0043b02c
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [ebp - 0x7c]
inc bl
call fcn.00402964
test bl, bl
je 0x477df8
push 0x104
lea eax, [ebp + 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x477e34
push str.WindowsFolder
lea eax, [ebp - 0x7c]
push eax
call fcn.004054af
push dword [eax]
push edi
call fcn.0043b02c
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [ebp - 0x7c]
inc bl
call fcn.00402964
test bl, bl
je 0x477e4d
push 0x104
lea eax, [ebp + 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
add eax, eax
push 0x5c
pop ecx
mov word [ebp + eax + 0x198], cx
xor ecx, ecx
mov word [ebp + eax + 0x19a], cx
jmp 0x477ebf
push str.WindowsVolume
lea eax, [ebp - 0x7c]
push eax
call fcn.004054af
push dword [eax]
push edi
call fcn.0043b02c
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [ebp - 0x7c]
inc bl
call fcn.00402964
test bl, bl
je 0x477e94
push 0x104
lea eax, [ebp + 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor eax, eax
mov word [ebp + 0x19e], ax
jmp 0x477ebf
push str.TempFolder
push edi
call fcn.0043b02c
test eax, eax
jne 0x477ed1
lea eax, [ebp + 0x198]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
xor ecx, ecx
mov word [ebp + eax*2 + 0x198], cx
lea eax, [ebp + 0x198]
push eax
push edi
call fcn.0040548c
jmp 0x477fc4
push str.SETUPEXEDIR
push edi
call fcn.0043b02c
test eax, eax
jne 0x477f2b
mov eax, dword [0x5283d8]
cmp dword [eax - 0xc], 0
mov esi, 0x5283d8
jne 0x477f1f
push 0x105
lea eax, [ebp - 0x74]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
jmp 0x477f0b
cmp word [ebp + eax*2 - 0x74], 0x5c
je 0x477f0e
dec eax
jne 0x477f03
xor ecx, ecx
mov word [ebp + eax*2 - 0x72], cx
lea eax, [ebp - 0x74]
push eax
push esi
call fcn.0040548c
mov eax, esi
call fcn.0044607b
jmp 0x477fc4
xor esi, esi
push dword [esi*4 + 0x526b38]
push edi
call fcn.0043b02c
test eax, eax
je 0x477f44
inc esi
cmp esi, 0xe
jb 0x477f2d
cmp esi, 0xe
jae 0x477fc0
lea eax, [ebp - 0x7c]
push eax
lea esi, [esi*4 + 0x4fe7e0]
push dword [esi]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x477f7a
push dword [esi]
mov ebx, edi
call fcn.00477fdf
pop ecx
test al, al
jne 0x477fc4
call fcn.004780b3
mov byte [ebp - 0x75], al
jmp 0x477fc4
lea eax, [ebp + 0x198]
push eax
push dword [ebp - 0x7c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
and dword [ebp - 0x80], 0
mov esi, eax
lea eax, [ebp - 0x80]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov eax, dword [ebp - 0x80]
push dword [ebp - 0x7c]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
test esi, esi
je 0x477fc0
lea eax, [ebp + 0x198]
push eax
push edi
call fcn.0040548c
mov eax, edi
call fcn.0045eef0
jmp 0x477fc4
mov byte [ebp - 0x75], 0
mov al, byte [ebp - 0x75]
pop esi
pop ebx
mov ecx, dword [ebp + 0x3a0]
xor ecx, ebp
pop edi
call fcn.004b196e
add ebp, 0x3a4
leave
ret