Function at 0x4d4c21
Capabilities:
Get common file path
Set current directory

Disassembly:
mov eax, 0x4e97ce
call fcn.004d1ec0
sub esp, 0x46c
mov eax, dword [0x52f220]
push ebx
push esi
xor eax, ebp
push edi
mov edi, dword [ebp + 8]
mov esi, ecx
xor ebx, ebx
cmp dword [esi + 4], ebx
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x478], edi
jne 0x4d4ece
push edi
lea ecx, [ebp - 0x26c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
push ebx
push 0x5c
lea ecx, [ebp - 0x26c]
mov dword [ebp - 4], ebx
call dword [sym.imp.MSVCP71.dll_public:_unsigned_int___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::find_wchar_t__unsigned_int_const]
mov ecx, dword [sym.imp.MSVCP71.dll_unsigned_int_const_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::npos]
cmp eax, dword [ecx]
push edi
jne 0x4d4e6c
mov edi, dword [sym.imp.KERNEL32.dll_LoadLibraryW]
call edi
cmp eax, ebx
mov ebx, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov dword [esi + 4], eax
jne 0x4d4d29
lea eax, [ebp - 0x234]
push eax
call fcn.00454ce0
pop ecx
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
jae 0x4d4cbd
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x218]
call fcn.004d4b40
push dword [ebp - 0x478]
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x250]
push eax
mov byte [ebp - 4], 2
call fcn.00407691
mov eax, dword [ebp - 0x24c]
add esp, 0xc
cmp dword [ebp - 0x238], 8
jae 0x4d4cfe
lea eax, [ebp - 0x24c]
push eax
call edi
lea ecx, [ebp - 0x250]
mov dword [esi + 4], eax
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea eax, [ebp - 0x218]
push eax
call ebx
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esi + 4], 0
jne 0x4d4ebe
lea eax, [ebp - 0x234]
push eax
call fcn.00454c04
pop ecx
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
jae 0x4d4d55
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x218]
call fcn.004d4b40
push dword [ebp - 0x478]
lea eax, [ebp - 0x234]
push eax
lea eax, [ebp - 0x250]
push eax
mov byte [ebp - 4], 4
call fcn.00407691
mov eax, dword [ebp - 0x24c]
add esp, 0xc
cmp dword [ebp - 0x238], 8
jae 0x4d4d96
lea eax, [ebp - 0x24c]
push eax
call edi
lea ecx, [ebp - 0x250]
mov dword [esi + 4], eax
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
lea eax, [ebp - 0x218]
push eax
call ebx
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 0
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
cmp dword [esi + 4], 0
jne 0x4d4ebe
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x234]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::constructor_wchar_t_const__]
push 0x507180
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 5
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
jae 0x4d4e1a
lea eax, [ebp - 0x230]
push eax
lea ecx, [ebp - 0x474]
call fcn.004d4b40
push dword [ebp - 0x478]
lea ecx, [ebp - 0x234]
mov byte [ebp - 4], 6
call dword [sym.imp.MSVCP71.dll_public:_class_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t______thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::operator_wchar_t_const__]
cmp dword [ebp - 0x21c], 8
mov eax, dword [ebp - 0x230]
jae 0x4d4e51
lea eax, [ebp - 0x230]
push eax
call edi
mov dword [esi + 4], eax
lea eax, [ebp - 0x474]
push eax
call ebx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x234]
jmp 0x4d4eb8
lea eax, [ebp - 0x250]
push eax
call fcn.004549a0
cmp dword [ebp - 0x238], 8
mov eax, dword [ebp - 0x24c]
pop ecx
pop ecx
jae 0x4d4e8f
lea eax, [ebp - 0x24c]
push eax
lea ecx, [ebp - 0x474]
call fcn.004d4b40
push edi
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov dword [esi + 4], eax
lea eax, [ebp - 0x474]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
lea ecx, [ebp - 0x250]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x26c]
call dword [sym.imp.MSVCP71.dll_public:_void___thiscall_std::basic_string_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__::destructor_void_]
mov ecx, dword [ebp - 0xc]
xor eax, eax
cmp dword [esi + 4], eax
pop edi
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x10]
setne al
pop esi
xor ecx, ebp
pop ebx
call fcn.004d1f17
leave
ret 4