Function at 0x49756e
Capabilities:
Get common file path

Disassembly:
push 0x21c
mov eax, 0x518c15
call fcn.004db2a7
mov byte [ebp - 0x221], dl
mov edi, ecx
push str.ProgramFiles64Folder
push dword [edi]
call fcn.004e32f5
pop ecx
pop ecx
test eax, eax
jne 0x49762b
push edi
lea ecx, [ebp - 0x228]
call fcn.00406ff4
and dword [ebp - 4], 0
lea ecx, [ebp - 0x228]
push str.ProgramW6432
call fcn.0047bc20
test eax, eax
je 0x49761c
mov eax, dword [ebp - 0x228]
mov ebx, dword [edi]
sub ebx, 0x10
lea edx, [eax - 0x10]
cmp edx, ebx
je 0x4975ff
cmp dword [ebx + 0xc], 0
jl 0x4975f4
mov ecx, dword [edx]
cmp ecx, dword [ebx]
jne 0x4975f4
mov ecx, edx
call fcn.00406f9b
mov ecx, ebx
mov esi, eax
call fcn.0040d570
lea eax, [esi + 0x10]
mov dword [edi], eax
jmp 0x4975ff
push dword [eax - 0xc]
mov ecx, edi
push eax
call fcn.0040d7d9
mov ecx, edi
call fcn.00478820
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.0040d05a
mov al, 1
jmp 0x4978bb
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x228]
call fcn.0040d05a
xor ebx, ebx
lea ecx, [ebp - 0x220]
push str.SystemFolder
inc ebx
call fcn.0040d859
mov dword [ebp - 4], ebx
mov ecx, edi
push dword [eax]
call fcn.00406ef1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
mov esi, eax
call fcn.0040d05a
test esi, esi
jne 0x4976aa
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.004e07a4
pop ecx
push eax
lea eax, [ebp - 0x21c]
mov ecx, edi
push eax
call fcn.0040d7d9
mov ecx, edi
call fcn.00478820
jmp 0x4978b9
push str.System32Folder
lea ecx, [ebp - 0x220]
call fcn.0040d859
mov dword [ebp - 4], 2
mov ecx, edi
push dword [eax]
call fcn.00406ef1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
mov esi, eax
call fcn.0040d05a
test esi, esi
jne 0x497708
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 0x4977c9
push str.WindowsFolder
lea ecx, [ebp - 0x220]
call fcn.0040d859
mov dword [ebp - 4], 3
mov ecx, edi
push dword [eax]
call fcn.00406ef1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
mov esi, eax
call fcn.0040d05a
test esi, esi
jne 0x497751
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x4976f1
push str.WindowsVolume
lea ecx, [ebp - 0x220]
call fcn.0040d859
mov dword [ebp - 4], 4
mov ecx, edi
push dword [eax]
call fcn.00406ef1
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x220]
mov esi, eax
call fcn.0040d05a
test esi, esi
jne 0x4977a3
push 0x104
lea eax, [ebp - 0x21c]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor eax, eax
mov word [ebp - 0x216], ax
jmp 0x4977de
push str.TempFolder
push dword [edi]
call fcn.004e32f5
pop ecx
pop ecx
test eax, eax
jne 0x4977ff
lea eax, [ebp - 0x21c]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
add eax, eax
cmp eax, 0x208
jae 0x49796e
xor ecx, ecx
mov word [ebp + eax - 0x21c], cx
lea eax, [ebp - 0x21c]
push eax
call fcn.004e07a4
pop ecx
push eax
lea eax, [ebp - 0x21c]
mov ecx, edi
push eax
call fcn.0040d7d9
jmp 0x4978b9
push str.SETUPEXEDIR
push dword [edi]
call fcn.004e32f5
pop ecx
pop ecx
test eax, eax
jne 0x4978ce
mov eax, dword [0x5805f0]
cmp dword [eax - 0xc], 0
jne 0x49788b
push 0x104
lea eax, [ebp - 0x21c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub eax, 1
je 0x49784b
push 0x5c
pop ecx
cmp word [ebp + eax*2 - 0x21c], cx
je 0x49784b
sub eax, 1
jne 0x49783c
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x49796e
xor ecx, ecx
mov word [ebp + eax - 0x21c], cx
lea eax, [ebp - 0x21c]
push eax
call fcn.004e07a4
pop ecx
push eax
lea eax, [ebp - 0x21c]
mov ecx, 0x5805f0
push eax
call fcn.0040d7d9
mov eax, dword [0x5805f0]
mov ebx, dword [edi]
lea ecx, [eax - 0x10]
sub ebx, 0x10
cmp ecx, ebx
je 0x4978b6
cmp dword [ebx + 0xc], 0
jl 0x4978c1
mov edx, dword [ecx]
cmp edx, dword [ebx]
jne 0x4978c1
call fcn.00406f9b
mov ecx, ebx
mov esi, eax
call fcn.0040d570
lea eax, [esi + 0x10]
mov dword [edi], eax
xor ebx, ebx
inc ebx
mov al, bl
call fcn.004db251
ret
push dword [eax - 0xc]
mov ecx, edi
push eax
call fcn.0040d7d9
jmp 0x4978b6
xor esi, esi
push dword [esi*4 + 0x543090]
mov ecx, edi
call fcn.00406ef1
test eax, eax
je 0x4978e8
inc esi
cmp esi, 0xe
jb 0x4978d0
cmp esi, 0xe
jae 0x497967
lea eax, [ebp - 0x220]
push eax
push dword [esi*4 + 0x543050]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x497924
mov ecx, dword [esi*4 + 0x543050]
mov edx, edi
call fcn.00497974
test al, al
jne 0x4978b9
mov ecx, edi
call fcn.00497a76
mov bl, al
jmp 0x4978b9
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 0x497682
xor bl, bl
jmp 0x4978b9
call fcn.004daeef
int3