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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x50331c]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov eax, dword [ebp + 8]
call fcn.004220b9
movzx eax, al
test eax, eax
je 0x4c5e9a
xor eax, eax
jmp 0x4c6115
mov word [ebp - 0x218], 0
push 0x208
push 0
lea ecx, [ebp - 0x216]
push ecx
call fcn.00489db0
add esp, 0xc
push 0x4e0eb8
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00416053
cmp eax, 0xffffffff
je 0x4c5f0b
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4e0edc
call fcn.004c5430
add esp, 0xc
test eax, eax
jne 0x4c5ef1
xor eax, eax
jmp 0x4c6115
lea eax, [ebp - 0x218]
push eax
push 0x4e0f00
mov ecx, dword [ebp + 8]
push ecx
call fcn.0045b8d1
jmp 0x4c6104
push 0x4e0f24
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00416053
cmp eax, 0xffffffff
je 0x4c5f5d
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4e0f38
call fcn.004c5430
add esp, 0xc
test eax, eax
jne 0x4c5f43
xor eax, eax
jmp 0x4c6115
lea eax, [ebp - 0x218]
push eax
push 0x4e0f4c
mov ecx, dword [ebp + 8]
push ecx
call fcn.0045b8d1
jmp 0x4c6104
push 0x4e0f60
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00416053
cmp eax, 0xffffffff
je 0x4c5faf
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4e0f70
call fcn.004c5430
add esp, 0xc
test eax, eax
jne 0x4c5f95
xor eax, eax
jmp 0x4c6115
lea eax, [ebp - 0x218]
push eax
push str._TEMP_
mov ecx, dword [ebp + 8]
push ecx
call fcn.0045b8d1
jmp 0x4c6104
push 0x4e0f90
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00416053
cmp eax, 0xffffffff
je 0x4c5ffa
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
ja 0x4c5fe0
xor eax, eax
jmp 0x4c6115
lea eax, [ebp - 0x218]
push eax
push 0x4e0fa4
mov ecx, dword [ebp + 8]
push ecx
call fcn.0045b8d1
jmp 0x4c6104
push 0x4e0fb8
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00416053
cmp eax, 0xffffffff
je 0x4c6045
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
ja 0x4c602b
xor eax, eax
jmp 0x4c6115
lea eax, [ebp - 0x218]
push eax
push 0x4e0fcc
mov ecx, dword [ebp + 8]
push ecx
call fcn.0045b8d1
jmp 0x4c6104
push 0x4e0fe0
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00416053
cmp eax, 0xffffffff
je 0x4c60a7
push 0x20a
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.00489db0
add esp, 0xc
push 0x105
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [ebp - 0x218]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea edx, [ebp - 0x218]
push edx
push 0x4e0ff4
mov eax, dword [ebp + 8]
push eax
call fcn.0045b8d1
jmp 0x4c6104
push 0x4e1008
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00416053
cmp eax, 0xffffffff
je 0x4c60fd
push 0x20a
push 0
lea ecx, [ebp - 0x218]
push ecx
call fcn.00489db0
add esp, 0xc
lea edx, [ebp - 0x218]
push edx
push 0
push 0
push 0x26
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x218]
push eax
push str._PROGRAMFILES_
mov ecx, dword [ebp + 8]
push ecx
call fcn.0045b8d1
jmp 0x4c6104
mov eax, 1
jmp 0x4c6115
mov edx, dword [ebp + 8]
push edx
call fcn.004c5e20
add esp, 4
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00491d9b
mov esp, ebp
pop ebp
ret