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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x298
mov eax, dword [0x4fb304]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
mov eax, dword [ebp + 8]
call fcn.00406fcc
movzx eax, al
test eax, eax
je 0x4ba84a
xor eax, eax
jmp 0x4baac5
mov word [ebp - 0x218], 0
push 0x208
push 0
lea ecx, [ebp - 0x216]
push ecx
call fcn.00480cb0
add esp, 0xc
push 0x4d6bb8
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00408e81
cmp eax, 0xffffffff
je 0x4ba8bb
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4d6bdc
call fcn.004b94f0
add esp, 0xc
test eax, eax
jne 0x4ba8a1
xor eax, eax
jmp 0x4baac5
lea eax, [ebp - 0x218]
push eax
push str._ALLUSERSPROFILE_
mov ecx, dword [ebp + 8]
push ecx
call fcn.0044a0e1
jmp 0x4baab4
push 0x4d6c24
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00408e81
cmp eax, 0xffffffff
je 0x4ba90d
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4d6c38
call fcn.004b94f0
add esp, 0xc
test eax, eax
jne 0x4ba8f3
xor eax, eax
jmp 0x4baac5
lea eax, [ebp - 0x218]
push eax
push str._APPDATA_
mov ecx, dword [ebp + 8]
push ecx
call fcn.0044a0e1
jmp 0x4baab4
push 0x4d6c60
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00408e81
cmp eax, 0xffffffff
je 0x4ba95f
push 0x104
lea edx, [ebp - 0x218]
push edx
push 0x4d6c70
call fcn.004b94f0
add esp, 0xc
test eax, eax
jne 0x4ba945
xor eax, eax
jmp 0x4baac5
lea eax, [ebp - 0x218]
push eax
push 0x4d6c80
mov ecx, dword [ebp + 8]
push ecx
call fcn.0044a0e1
jmp 0x4baab4
push 0x4d6c90
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00408e81
cmp eax, 0xffffffff
je 0x4ba9aa
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
ja 0x4ba990
xor eax, eax
jmp 0x4baac5
lea eax, [ebp - 0x218]
push eax
push str._SYSTEM_
mov ecx, dword [ebp + 8]
push ecx
call fcn.0044a0e1
jmp 0x4baab4
push 0x4d6cb8
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00408e81
cmp eax, 0xffffffff
je 0x4ba9f5
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
ja 0x4ba9db
xor eax, eax
jmp 0x4baac5
lea eax, [ebp - 0x218]
push eax
push str._WINDOWS_
mov ecx, dword [ebp + 8]
push ecx
call fcn.0044a0e1
jmp 0x4baab4
push 0x4d6ce0
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00408e81
cmp eax, 0xffffffff
je 0x4baa57
push 0x20a
push 0
lea edx, [ebp - 0x218]
push edx
call fcn.00480cb0
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.0044a0e1
jmp 0x4baab4
push 0x4d6d08
xor ecx, ecx
mov esi, dword [ebp + 8]
call fcn.00408e81
cmp eax, 0xffffffff
je 0x4baaad
push 0x20a
push 0
lea ecx, [ebp - 0x218]
push ecx
call fcn.00480cb0
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.0044a0e1
jmp 0x4baab4
mov eax, 1
jmp 0x4baac5
mov edx, dword [ebp + 8]
push edx
call fcn.004ba7d0
add esp, 4
mov eax, 1
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00485d3d
mov esp, ebp
pop ebp
ret