Function at 0x4f51ac
Capabilities:
Get common file path

Disassembly:
push 0x14
mov eax, 0x598eb8
call fcn.00584f68
push 0x5c
push dword [ebp + 8]
call dword [sym.imp.MSVCR80.dll_wcschr]
test eax, eax
pop ecx
pop ecx
jne 0x4f533b
cmp word [0x613250], ax
mov ebx, 0x613250
mov edi, 0x612a50
jne 0x4f5256
mov esi, 0x400
push esi
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0x5c
push ebx
call dword [sym.imp.MSVCR80.dll_wcsrchr]
test eax, eax
pop ecx
pop ecx
je 0x4f5202
and word [eax + 2], 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
test eax, eax
jbe 0x4f522a
add eax, eax
lea ecx, [eax + 0x612a50]
cmp word [ecx - 2], 0x5c
je 0x4f522a
and word [eax + 0x612a52], 0
mov word [ecx], 0x5c
push esi
push 0x612250
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
test eax, eax
jbe 0x4f5256
add eax, eax
lea ecx, [eax + 0x612250]
cmp word [ecx - 2], 0x5c
je 0x4f5256
and word [eax + 0x612252], 0
mov word [ecx], 0x5c
push edi
lea ecx, [ebp - 0x18]
call sym.txupd.exe_public:_void___thiscall_CTXStringW::constructor_wchar_t__
push dword [ebp + 8]
and dword [ebp - 4], 0
push eax
lea eax, [ebp - 0x14]
push eax
call sym.txupd.exe_class_CTXStringW___cdecl_operator_class_CTXStringW_const___wchar_t_const__
add esp, 0xc
mov ecx, eax
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
mov esi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
push eax
call esi
mov edi, eax
test edi, edi
lea ecx, [ebp - 0x14]
sete byte [ebp - 0xd]
call sym.txupd.exe_public:_void___thiscall_CTXStringW::destructor_void_
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x18]
call sym.txupd.exe_public:_void___thiscall_CTXStringW::destructor_void_
cmp byte [ebp - 0xd], 0
je 0x4f5346
push 0x612250
lea ecx, [ebp - 0x14]
call sym.txupd.exe_public:_void___thiscall_CTXStringW::constructor_wchar_t__
push dword [ebp + 8]
mov dword [ebp - 4], 1
push eax
lea eax, [ebp - 0x18]
push eax
call sym.txupd.exe_class_CTXStringW___cdecl_operator_class_CTXStringW_const___wchar_t_const__
add esp, 0xc
mov ecx, eax
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call esi
mov edi, eax
test edi, edi
lea ecx, [ebp - 0x18]
sete byte [ebp - 0xd]
call sym.txupd.exe_public:_void___thiscall_CTXStringW::destructor_void_
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x14]
call sym.txupd.exe_public:_void___thiscall_CTXStringW::destructor_void_
cmp byte [ebp - 0xd], 0
je 0x4f5346
push ebx
lea ecx, [ebp - 0x20]
call sym.txupd.exe_public:_void___thiscall_CTXStringW::constructor_wchar_t__
push dword [ebp + 8]
mov dword [ebp - 4], 2
push eax
lea eax, [ebp - 0x1c]
push eax
call sym.txupd.exe_class_CTXStringW___cdecl_operator_class_CTXStringW_const___wchar_t_const__
add esp, 0xc
mov ecx, eax
call sym.txupd.exe_public:_wchar_t_const____thiscall_CTXStringW::operator_wchar_t_const__void_const
push eax
call esi
lea ecx, [ebp - 0x1c]
mov edi, eax
call sym.txupd.exe_public:_void___thiscall_CTXStringW::destructor_void_
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call sym.txupd.exe_public:_void___thiscall_CTXStringW::destructor_void_
jmp 0x4f5346
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov edi, eax
mov eax, edi
call fcn.00585040
ret