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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x518334]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov eax, dword [ebp + 8]
call fcn.00407b4d
movzx eax, al
test eax, eax
je 0x4d21fa
xor eax, eax
jmp 0x4d2475
mov word [ebp - 0x218], 0
push 0x208
push 0
lea ecx, [ebp - 0x216]
push ecx
call fcn.00497210
add esp, 0xc
push 0x4ee95c
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.0040b343
cmp eax, 0xffffffff
je 0x4d226b
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4ee980
call fcn.004d13f0
add esp, 0xc
test eax, eax
jne 0x4d2251
xor eax, eax
jmp 0x4d2475
lea eax, [ebp - 0x218]
push eax
push str._ALLUSERSPROFILE_
mov ecx, dword [ebp + 8]
push ecx
call fcn.00455c3b
jmp 0x4d2464
push 0x4ee9c8
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.0040b343
cmp eax, 0xffffffff
je 0x4d22bd
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4ee9dc
call fcn.004d13f0
add esp, 0xc
test eax, eax
jne 0x4d22a3
xor eax, eax
jmp 0x4d2475
lea eax, [ebp - 0x218]
push eax
push str._APPDATA_
mov ecx, dword [ebp + 8]
push ecx
call fcn.00455c3b
jmp 0x4d2464
push 0x4eea04
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.0040b343
cmp eax, 0xffffffff
je 0x4d230f
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4eea14
call fcn.004d13f0
add esp, 0xc
test eax, eax
jne 0x4d22f5
xor eax, eax
jmp 0x4d2475
lea eax, [ebp - 0x218]
push eax
push 0x4eea24
mov ecx, dword [ebp + 8]
push ecx
call fcn.00455c3b
jmp 0x4d2464
push 0x4eea34
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.0040b343
cmp eax, 0xffffffff
je 0x4d235a
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.DLL_GetSystemDirectoryW]
test eax, eax
ja 0x4d2340
xor eax, eax
jmp 0x4d2475
lea eax, [ebp - 0x218]
push eax
push str._SYSTEM_
mov ecx, dword [ebp + 8]
push ecx
call fcn.00455c3b
jmp 0x4d2464
push 0x4eea5c
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.0040b343
cmp eax, 0xffffffff
je 0x4d23a5
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.DLL_GetWindowsDirectoryW]
test eax, eax
ja 0x4d238b
xor eax, eax
jmp 0x4d2475
lea eax, [ebp - 0x218]
push eax
push str._WINDOWS_
mov ecx, dword [ebp + 8]
push ecx
call fcn.00455c3b
jmp 0x4d2464
push 0x4eea84
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.0040b343
cmp eax, 0xffffffff
je 0x4d2407
push 0x20a
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.00497210
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.00455c3b
jmp 0x4d2464
push 0x4eeaac
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.0040b343
cmp eax, 0xffffffff
je 0x4d245d
push 0x20a
push 0
lea ecx, [ebp - 0x218]
push ecx
call fcn.00497210
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.00455c3b
jmp 0x4d2464
mov eax, 1
jmp 0x4d2475
mov edx, dword [ebp + 8]
push edx
call fcn.004d2180
add esp, 4
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0049c88a
mov esp, ebp
pop ebp
ret