Function at 0x46f548
Capabilities:
Get common file path
Get program files directory

Disassembly:
push ebp
lea ebp, [esp - 0x3dc]
sub esp, 0x45c
mov eax, dword [0x4f4de0]
xor eax, ebp
mov dword [ebp + 0x3d8], eax
push ebx
mov ebx, dword [ebp + 0x3e4]
mov eax, dword [ebx]
cmp dword [eax - 0xc], 0
push esi
push edi
mov dword [ebp - 0x64], ebx
jne 0x46f591
xor eax, eax
mov ecx, dword [ebp + 0x3d8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00497941
add ebp, 0x3dc
leave
ret
push 0x4fc0d8
lea ecx, [ebp - 0x50]
call fcn.00418850
mov eax, dword [ebx]
mov esi, str.CLSID:
lea edi, [ebp + 0x3c8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
push 6
movsd dword es:[edi], dword [esi]
lea ecx, [ebp + 0x3c8]
push ecx
push eax
movsw word es:[edi], word [esi]
call dword [sym.imp.SHLWAPI.dll_StrCmpNIW]
test eax, eax
jne 0x46f690
mov eax, dword [ebx]
mov eax, dword [eax - 0xc]
add eax, 0xfffffffa
push eax
lea eax, [ebp - 0x4c]
push eax
mov ecx, ebx
call fcn.0046e4a6
push dword [eax]
lea eax, [ebp - 0x48]
push str.CLSID_sInprocServer32
push 0x208
push eax
call fcn.00415b00
mov ecx, dword [ebp - 0x4c]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.00404d30
lea eax, [ebp - 0x50]
push eax
push dword [ebp + 0x3e8]
push ecx
mov ecx, esp
push 0x4d67f4
call fcn.00404050
push ecx
lea eax, [ebp - 0x48]
mov ecx, esp
push eax
call fcn.00404050
push SysReAllocStringLen
lea ecx, [ebp - 0x70]
call fcn.0040b9b0
push eax
call fcn.0040be00
pop ecx
pop ecx
lea ecx, [ebp - 0x70]
mov esi, eax
call fcn.0040c410
test esi, esi
je 0x46f68c
push dword [ebp - 0x50]
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test eax, eax
je 0x46f68c
sub eax, dword [ebp - 0x50]
lea ecx, [ebp - 0x50]
sar eax, 1
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.004187d0
push eax
mov ecx, ebx
call fcn.00404570
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
xor esi, esi
inc esi
mov ecx, dword [ebp - 0x50]
add ecx, 0xfffffff0
call fcn.00404d30
mov eax, esi
jmp 0x46f579
xor esi, esi
jmp 0x46f67a
cmp byte [0x4fa668], 0
mov esi, 0x4fa66c
mov edi, str.commonfiles_x64_
jne 0x46fba9
mov ebx, 0x104
push ebx
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x48]
push eax
call dword [sym.imp.SHLWAPI.dll_PathStripToRootW]
push 0x4ca1e8
lea ecx, [ebp - 0x54]
call fcn.00404050
lea eax, [ebp - 0x54]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp - 0x48]
push ecx
mov ecx, eax
call fcn.00404670
mov ecx, dword [ebp - 0x54]
add ecx, 0xfffffff0
call fcn.00404d30
and dword [ebp - 0x54], 0
mov eax, dword [ebp - 0x54]
push 0
push dword [eax + 0x4ca10c]
lea eax, [ebp + 0x1c0]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x46f746
mov eax, dword [ebp - 0x54]
push dword [eax + 0x4ca108]
lea ecx, [ebp - 0x4c]
call fcn.00404050
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp + 0x1c0]
push ecx
mov ecx, eax
call fcn.00404670
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
add dword [ebp - 0x54], 8
cmp dword [ebp - 0x54], 0xe0
jb 0x46f6f3
xor eax, eax
cmp dword [0x4fa694], eax
je 0x46f8ef
push eax
push 0x26
lea ecx, [ebp + 0x1c0]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x46f8ef
lea eax, [ebp + 0x1c0]
push eax
call fcn.0049860b
lea eax, [ebp + eax*2 + 0x1b4]
mov dword [esp], str.__x86_
push eax
mov dword [ebp - 0x4c], eax
call fcn.00498d33
pop ecx
pop ecx
test eax, eax
jne 0x46f8ef
mov ecx, dword [ebp - 0x4c]
mov word [ecx], ax
push str.programfiles_x64_
lea ecx, [ebp - 0x4c]
call fcn.00404050
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp + 0x1c0]
push ecx
mov ecx, eax
call fcn.00404670
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
push str.Common_Files
push ebx
lea eax, [ebp + 0x1c0]
push eax
call fcn.004073a0
push edi
lea ecx, [ebp - 0x4c]
call fcn.00404050
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp + 0x1c0]
push ecx
mov ecx, eax
call fcn.00404670
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
push edi
lea ecx, [ebp - 0x54]
call fcn.00404050
push str._office2010x64sharedir_
lea ecx, [ebp - 0x4c]
call fcn.00404050
mov ebx, str.Microsoft_Shared
push ebx
lea eax, [ebp - 0x54]
push eax
mov ecx, esi
call fcn.00426e70
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.004067a0
mov dword [ebp - 0x60], eax
add esp, 0xc
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
push dword [ebp - 0x60]
mov ecx, eax
call fcn.00404570
mov ecx, dword [ebp - 0x58]
add ecx, 0xfffffff0
call fcn.00404d30
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
mov ecx, dword [ebp - 0x54]
add ecx, 0xfffffff0
call fcn.00404d30
push edi
lea ecx, [ebp - 0x54]
call fcn.00404050
push str._office2013x64sharedir_
lea ecx, [ebp - 0x4c]
call fcn.00404050
push ebx
lea eax, [ebp - 0x54]
push eax
mov ecx, esi
call fcn.00426e70
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.004067a0
mov ebx, eax
add esp, 0xc
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
push ebx
mov ecx, eax
call fcn.00404570
mov ecx, dword [ebp - 0x58]
add ecx, 0xfffffff0
call fcn.00404d30
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
mov ecx, dword [ebp - 0x54]
add ecx, 0xfffffff0
call fcn.00404d30
push 0
push 0x2b
lea eax, [ebp + 0x1c0]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x46faea
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE9
push eax
call fcn.004048a0
mov ebx, dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x46f95f
push str._office2000commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404050
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.00404570
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE10
push eax
call fcn.004048a0
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x46f9ae
push str._office2002commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404050
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.00404570
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE11
push eax
call fcn.004048a0
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x46f9fd
push str._office2003commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404050
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.00404570
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE12
push eax
call fcn.004048a0
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x46fa4c
push str._office2007commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404050
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.00404570
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE14
push eax
call fcn.004048a0
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x46fa9b
push str._office2010commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404050
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.00404570
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE15
push eax
call fcn.004048a0
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x46faea
push str._office2013commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404050
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.00404570
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
xor ebx, ebx
lea eax, [ebp - 0x50]
push eax
push dword [ebx + 0x4c99c8]
push ecx
mov ecx, esp
push str.Path
call fcn.00404050
push ecx
mov ecx, esp
push dword [ebx + 0x4c99c4]
call fcn.00404050
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x80]
call fcn.0040b9b0
push eax
call fcn.0040be00
pop ecx
pop ecx
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x58], eax
call fcn.0040c410
cmp dword [ebp - 0x58], 0
je 0x46fb90
mov eax, dword [ebp - 0x50]
mov eax, dword [eax - 0xc]
test eax, eax
jle 0x46fb90
dec eax
push eax
lea ecx, [ebp - 0x50]
call fcn.00407a90
cmp ax, 0x5c
jne 0x46fb61
mov eax, dword [ebp - 0x50]
mov eax, dword [eax - 0xc]
dec eax
push eax
lea ecx, [ebp - 0x50]
call fcn.00404d00
push dword [ebx + 0x4c99c0]
lea ecx, [ebp - 0x4c]
call fcn.00404050
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00426e70
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.00404570
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d30
add ebx, 0xc
cmp ebx, 0x420
jb 0x46faec
mov ebx, dword [ebp - 0x64]
mov byte [0x4fa668], 1
mov ecx, ebx
call fcn.004050f0
cmp dword [0x4fa694], 0
je 0x46fbf7
cmp dword [ebp + 0x3e8], 0
je 0x46fbf7
mov eax, dword [ebx]
push str.programfiles
push eax
call fcn.00498d33
pop ecx
pop ecx
test eax, eax
jne 0x46fbdc
push str.programfiles_x64_
jmp 0x46fbf0
mov eax, dword [ebx]
push str.commonfiles
push eax
call fcn.00498d33
pop ecx
pop ecx
test eax, eax
jne 0x46fbf7
push edi
mov ecx, ebx
call fcn.00404670
push ebx
lea eax, [ebp - 0x68]
push eax
mov ecx, esi
call fcn.00427060
push esi
push dword [0x4fa684]
lea ecx, [ebp - 0x5c]
call fcn.0040a920
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x68]
call fcn.00409fa0
test al, al
jne 0x46f68c
lea ecx, [ebp - 0x68]
call fcn.00428290
add eax, 4
push eax
mov ecx, ebx
call fcn.00404570
jmp 0x46f677