Function at 0x47437d
Capabilities:
Get common file path

Disassembly:
push ebp
lea ebp, [esp - 0x3a4]
sub esp, 0x424
mov eax, dword [0x51f714]
xor eax, ebp
mov dword [ebp + 0x3a0], eax
push edi
mov edi, ecx
push str.ProgramFiles64Folder
push edi
call fcn.00438350
test eax, eax
jne 0x4743eb
push edi
lea eax, [ebp - 0x80]
push eax
call fcn.00425ecf
push 0x4fa380
lea eax, [ebp - 0x80]
call fcn.004747ba
test eax, eax
je 0x4743e3
lea eax, [ebp - 0x80]
call fcn.004432a9
mov eax, edi
call fcn.0045c2d0
lea ecx, [ebp - 0x80]
call fcn.00402907
mov al, 1
jmp 0x474600
lea ecx, [ebp - 0x80]
call fcn.00402907
push ebx
push esi
push str.SystemFolder
lea eax, [ebp - 0x7c]
push eax
mov byte [ebp - 0x75], 1
call fcn.004046e4
push dword [eax]
push edi
call fcn.00438350
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [ebp - 0x7c]
inc bl
call fcn.00402907
test bl, bl
je 0x47442f
push 0x104
lea eax, [ebp + 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x47446b
push str.WindowsFolder
lea eax, [ebp - 0x7c]
push eax
call fcn.004046e4
push dword [eax]
push edi
call fcn.00438350
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [ebp - 0x7c]
inc bl
call fcn.00402907
test bl, bl
je 0x474484
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 0x4744f6
push str.WindowsVolume
lea eax, [ebp - 0x7c]
push eax
call fcn.004046e4
push dword [eax]
push edi
call fcn.00438350
mov ebx, eax
neg ebx
sbb bl, bl
lea ecx, [ebp - 0x7c]
inc bl
call fcn.00402907
test bl, bl
je 0x4744cb
push 0x104
lea eax, [ebp + 0x198]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor eax, eax
mov word [ebp + 0x19e], ax
jmp 0x4744f6
push str.TempFolder
push edi
call fcn.00438350
test eax, eax
jne 0x474508
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.004046c1
jmp 0x4745fb
push str.SETUPEXEDIR
push edi
call fcn.00438350
test eax, eax
jne 0x474562
mov eax, dword [0x523358]
cmp dword [eax - 0xc], 0
mov esi, 0x523358
jne 0x474556
push 0x105
lea eax, [ebp - 0x74]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
jmp 0x474542
cmp word [ebp + eax*2 - 0x74], 0x5c
je 0x474545
dec eax
jne 0x47453a
xor ecx, ecx
mov word [ebp + eax*2 - 0x72], cx
lea eax, [ebp - 0x74]
push eax
push esi
call fcn.004046c1
mov eax, esi
call fcn.004432a9
jmp 0x4745fb
xor esi, esi
push dword [esi*4 + 0x521ae8]
push edi
call fcn.00438350
test eax, eax
je 0x47457b
inc esi
cmp esi, 0xe
jb 0x474564
cmp esi, 0xe
jae 0x4745f7
lea eax, [ebp - 0x7c]
push eax
lea esi, [esi*4 + 0x4fa348]
push dword [esi]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x4745b1
push dword [esi]
mov ebx, edi
call fcn.00474616
pop ecx
test al, al
jne 0x4745fb
call fcn.004746ea
mov byte [ebp - 0x75], al
jmp 0x4745fb
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 0x4745f7
lea eax, [ebp + 0x198]
push eax
push edi
call fcn.004046c1
mov eax, edi
call fcn.0045c2d0
jmp 0x4745fb
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.004ad67b
add ebp, 0x3a4
leave
ret