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

Disassembly:
push ebp
lea ebp, [esp - 0x3dc]
sub esp, 0x45c
mov eax, dword [0x4ffeb0]
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 0x47603e
xor eax, eax
mov ecx, dword [ebp + 0x3d8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004a0e91
add ebp, 0x3dc
leave
ret
push 0x50739c
lea ecx, [ebp - 0x50]
call fcn.0041af40
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 0x47613d
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.00474f53
push dword [eax]
lea eax, [ebp - 0x48]
push str.CLSID_sInprocServer32
push 0x208
push eax
call fcn.0041b220
mov ecx, dword [ebp - 0x4c]
add esp, 0x10
add ecx, 0xfffffff0
call fcn.00404d60
lea eax, [ebp - 0x50]
push eax
push dword [ebp + 0x3e8]
push ecx
mov ecx, esp
push 0x4e0c80
call fcn.00404030
push ecx
lea eax, [ebp - 0x48]
mov ecx, esp
push eax
call fcn.00404030
push SysReAllocString
lea ecx, [ebp - 0x70]
call fcn.0040f060
push eax
call fcn.0040f4b0
pop ecx
pop ecx
lea ecx, [ebp - 0x70]
mov esi, eax
call fcn.0040faf0
test esi, esi
je 0x476139
push dword [ebp - 0x50]
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
test eax, eax
je 0x476139
sub eax, dword [ebp - 0x50]
lea ecx, [ebp - 0x50]
sar eax, 1
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.004297e0
push eax
mov ecx, ebx
call fcn.004044f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
xor esi, esi
inc esi
mov ecx, dword [ebp - 0x50]
add ecx, 0xfffffff0
call fcn.00404d60
mov eax, esi
jmp 0x476026
xor esi, esi
jmp 0x476127
cmp byte [0x505908], 0
mov esi, 0x50590c
mov edi, str.commonfiles_x64_
jne 0x476656
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 0x4d41c8
lea ecx, [ebp - 0x54]
call fcn.00404030
lea eax, [ebp - 0x54]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp - 0x48]
push ecx
mov ecx, eax
call fcn.004045f0
mov ecx, dword [ebp - 0x54]
add ecx, 0xfffffff0
call fcn.00404d60
and dword [ebp - 0x54], 0
mov eax, dword [ebp - 0x54]
push 0
push dword [eax + 0x4d40ec]
lea eax, [ebp + 0x1c0]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x4761f3
mov eax, dword [ebp - 0x54]
push dword [eax + 0x4d40e8]
lea ecx, [ebp - 0x4c]
call fcn.00404030
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp + 0x1c0]
push ecx
mov ecx, eax
call fcn.004045f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
add dword [ebp - 0x54], 8
cmp dword [ebp - 0x54], 0xe0
jb 0x4761a0
xor eax, eax
cmp dword [0x505934], eax
je 0x47639c
push eax
push 0x26
lea ecx, [ebp + 0x1c0]
push ecx
push eax
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x47639c
lea eax, [ebp + 0x1c0]
push eax
call fcn.004a1b5b
lea eax, [ebp + eax*2 + 0x1b4]
mov dword [esp], str.__x86_
push eax
mov dword [ebp - 0x4c], eax
call fcn.004a2283
pop ecx
pop ecx
test eax, eax
jne 0x47639c
mov ecx, dword [ebp - 0x4c]
mov word [ecx], ax
push str.programfiles_x64_
lea ecx, [ebp - 0x4c]
call fcn.00404030
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp + 0x1c0]
push ecx
mov ecx, eax
call fcn.004045f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
push str.Common_Files
push ebx
lea eax, [ebp + 0x1c0]
push eax
call fcn.00406280
push edi
lea ecx, [ebp - 0x4c]
call fcn.00404030
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp + 0x1c0]
push ecx
mov ecx, eax
call fcn.004045f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
push edi
lea ecx, [ebp - 0x54]
call fcn.00404030
push str._office2010x64sharedir_
lea ecx, [ebp - 0x4c]
call fcn.00404030
mov ebx, str.Microsoft_Shared
push ebx
lea eax, [ebp - 0x54]
push eax
mov ecx, esi
call fcn.00438a60
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00406480
mov dword [ebp - 0x60], eax
add esp, 0xc
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
push dword [ebp - 0x60]
mov ecx, eax
call fcn.004044f0
mov ecx, dword [ebp - 0x58]
add ecx, 0xfffffff0
call fcn.00404d60
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
mov ecx, dword [ebp - 0x54]
add ecx, 0xfffffff0
call fcn.00404d60
push edi
lea ecx, [ebp - 0x54]
call fcn.00404030
push str._office2013x64sharedir_
lea ecx, [ebp - 0x4c]
call fcn.00404030
push ebx
lea eax, [ebp - 0x54]
push eax
mov ecx, esi
call fcn.00438a60
push eax
lea eax, [ebp - 0x58]
push eax
call fcn.00406480
mov ebx, eax
add esp, 0xc
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
push ebx
mov ecx, eax
call fcn.004044f0
mov ecx, dword [ebp - 0x58]
add ecx, 0xfffffff0
call fcn.00404d60
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
mov ecx, dword [ebp - 0x54]
add ecx, 0xfffffff0
call fcn.00404d60
push 0
push 0x2b
lea eax, [ebp + 0x1c0]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathW]
test eax, eax
je 0x476597
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE9
push eax
call fcn.00404ba0
mov ebx, dword [sym.imp.SHLWAPI.dll_PathIsDirectoryW]
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x47640c
push str._office2000commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404030
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.004044f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE10
push eax
call fcn.00404ba0
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x47645b
push str._office2002commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404030
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.004044f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE11
push eax
call fcn.00404ba0
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x4764aa
push str._office2003commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404030
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.004044f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE12
push eax
call fcn.00404ba0
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x4764f9
push str._office2007commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404030
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.004044f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE14
push eax
call fcn.00404ba0
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x476548
push str._office2010commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404030
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.004044f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
lea eax, [ebp + 0x1c0]
push eax
lea eax, [ebp - 0x50]
push str._sMicrosoft_SharedOFFICE15
push eax
call fcn.00404ba0
add esp, 0xc
push dword [ebp - 0x50]
call ebx
test eax, eax
je 0x476597
push str._office2013commdir_
lea ecx, [ebp - 0x4c]
call fcn.00404030
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.004044f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
xor ebx, ebx
lea eax, [ebp - 0x50]
push eax
push dword [ebx + 0x4d39a8]
push ecx
mov ecx, esp
push 0x4e0bc8
call fcn.00404030
push ecx
mov ecx, esp
push dword [ebx + 0x4d39a4]
call fcn.00404030
push reloc.OLEAUT32.dll_SysReAllocString
lea ecx, [ebp - 0x80]
call fcn.0040f060
push eax
call fcn.0040f4b0
pop ecx
pop ecx
lea ecx, [ebp - 0x80]
mov dword [ebp - 0x58], eax
call fcn.0040faf0
cmp dword [ebp - 0x58], 0
je 0x47663d
mov eax, dword [ebp - 0x50]
mov eax, dword [eax - 0xc]
test eax, eax
jle 0x47663d
dec eax
push eax
lea ecx, [ebp - 0x50]
call fcn.00406380
cmp ax, 0x5c
jne 0x47660e
mov eax, dword [ebp - 0x50]
mov eax, dword [eax - 0xc]
dec eax
push eax
lea ecx, [ebp - 0x50]
call fcn.00404c10
push dword [ebx + 0x4d39a0]
lea ecx, [ebp - 0x4c]
call fcn.00404030
lea eax, [ebp - 0x4c]
push eax
mov ecx, esi
call fcn.00438a60
lea ecx, [ebp - 0x50]
push ecx
mov ecx, eax
call fcn.004044f0
mov ecx, dword [ebp - 0x4c]
add ecx, 0xfffffff0
call fcn.00404d60
add ebx, 0xc
cmp ebx, 0x420
jb 0x476599
mov ebx, dword [ebp - 0x64]
mov byte [0x505908], 1
mov ecx, ebx
call fcn.00404fb0
cmp dword [0x505934], 0
je 0x4766a4
cmp dword [ebp + 0x3e8], 0
je 0x4766a4
mov eax, dword [ebx]
push str.programfiles
push eax
call fcn.004a2283
pop ecx
pop ecx
test eax, eax
jne 0x476689
push str.programfiles_x64_
jmp 0x47669d
mov eax, dword [ebx]
push str.commonfiles
push eax
call fcn.004a2283
pop ecx
pop ecx
test eax, eax
jne 0x4766a4
push edi
mov ecx, ebx
call fcn.004045f0
push ebx
lea eax, [ebp - 0x68]
push eax
mov ecx, esi
call fcn.00438c50
push esi
push dword [0x505924]
lea ecx, [ebp - 0x5c]
call fcn.00439df0
lea eax, [ebp - 0x5c]
push eax
lea ecx, [ebp - 0x68]
call fcn.00439460
test al, al
jne 0x476139
lea ecx, [ebp - 0x68]
call fcn.00439430
add eax, 4
push eax
mov ecx, ebx
call fcn.004044f0
jmp 0x476124