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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x5030c0]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov eax, dword [ebp + 8]
call fcn.004037c0
movzx eax, al
test eax, eax
je 0x4d2cea
xor eax, eax
jmp 0x4d2f65
mov word [ebp - 0x218], 0
push 0x208
push 0
lea ecx, [ebp - 0x216]
push ecx
call fcn.004a4620
add esp, 0xc
xor ecx, ecx
mov edx, 0x4e6224
mov esi, dword [ebp + 8]
call fcn.0040ff30
cmp eax, 0xffffffff
je 0x4d2d5b
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4e6248
call fcn.004d1f40
add esp, 0xc
test eax, eax
jne 0x4d2d41
xor eax, eax
jmp 0x4d2f65
lea eax, [ebp - 0x218]
push eax
push str._ALLUSERSPROFILE_
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f1a0
jmp 0x4d2f54
xor ecx, ecx
mov edx, 0x4e6290
mov esi, dword [ebp + 8]
call fcn.0040ff30
cmp eax, 0xffffffff
je 0x4d2dad
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4e62a4
call fcn.004d1f40
add esp, 0xc
test eax, eax
jne 0x4d2d93
xor eax, eax
jmp 0x4d2f65
lea eax, [ebp - 0x218]
push eax
push str._APPDATA_
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f1a0
jmp 0x4d2f54
xor ecx, ecx
mov edx, 0x4e62cc
mov esi, dword [ebp + 8]
call fcn.0040ff30
cmp eax, 0xffffffff
je 0x4d2dff
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4e62dc
call fcn.004d1f40
add esp, 0xc
test eax, eax
jne 0x4d2de5
xor eax, eax
jmp 0x4d2f65
lea eax, [ebp - 0x218]
push eax
push 0x4e62ec
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f1a0
jmp 0x4d2f54
xor ecx, ecx
mov edx, 0x4e62fc
mov esi, dword [ebp + 8]
call fcn.0040ff30
cmp eax, 0xffffffff
je 0x4d2e4a
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
ja 0x4d2e30
xor eax, eax
jmp 0x4d2f65
lea eax, [ebp - 0x218]
push eax
push str._SYSTEM_
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f1a0
jmp 0x4d2f54
xor ecx, ecx
mov edx, 0x4e6324
mov esi, dword [ebp + 8]
call fcn.0040ff30
cmp eax, 0xffffffff
je 0x4d2e95
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
ja 0x4d2e7b
xor eax, eax
jmp 0x4d2f65
lea eax, [ebp - 0x218]
push eax
push str._WINDOWS_
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040f1a0
jmp 0x4d2f54
xor ecx, ecx
mov edx, 0x4e634c
mov esi, dword [ebp + 8]
call fcn.0040ff30
cmp eax, 0xffffffff
je 0x4d2ef7
push 0x20a
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.004a4620
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 str._CUR_DIR_
mov eax, dword [ebp + 8]
push eax
call fcn.0040f1a0
jmp 0x4d2f54
xor ecx, ecx
mov edx, 0x4e6374
mov esi, dword [ebp + 8]
call fcn.0040ff30
cmp eax, 0xffffffff
je 0x4d2f4d
push 0x20a
push 0
lea ecx, [ebp - 0x218]
push ecx
call fcn.004a4620
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.0040f1a0
jmp 0x4d2f54
mov eax, 1
jmp 0x4d2f65
mov edx, dword [ebp + 8]
push edx
call fcn.004d2c70
add esp, 4
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004a460b
mov esp, ebp
pop ebp
ret