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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50d321
mov eax, dword fs:[0]
push eax
mov eax, 0x41898
call fcn.004e1f60
mov eax, dword [0x55e2f4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x10]
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
push 0x3fffc
mov dword [ebp - 0x4184c], eax
lea eax, [ebp - 0x41818]
push 0
push eax
call fcn.004e46b0
push 0x802
lea eax, [ebp - 0x814]
push 0
push eax
call fcn.004e46b0
add esp, 0x18
xor ebx, ebx
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
push 0x58
lea eax, [ebp - 0x418a4]
push ebx
push eax
call fcn.004e46b0
add esp, 0xc
mov dword [ebp - 0x418a4], 0x58
mov dword [ebp - 0x418a0], esi
push ebx
push ebx
push ebx
push str.CC_VOLUMES
call fcn.004bb8b0
add esp, 4
push eax
push ebx
push ebx
push str.ALL_FILES
call fcn.004bb8b0
add esp, 4
push eax
lea eax, [ebp - 0x181c]
push str._s__.__c._c_s__.ccx__c.ccx_c_c
push eax
call fcn.004054c0
lea eax, [ebp - 0x181c]
mov dword [ebp - 0x4188c], 1
mov dword [ebp - 0x41898], eax
lea eax, [ebp - 0x41818]
push edi
mov dword [ebp - 0x41888], eax
mov dword [ebp - 0x41884], 0x1fffe
call fcn.004bb8b0
mov ecx, dword [ebp + 0x14]
xor edx, edx
add esp, 0x28
mov dword [ebp - 0x41874], eax
test ecx, ecx
mov eax, 0x2000000
cmovne eax, edx
or eax, 0x80a04
mov dword [ebp - 0x41870], eax
test ecx, ecx
jne 0x404705
call fcn.004042c0
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
mov dword [0x560804], eax
lea eax, [ebp - 0x418a4]
push eax
mov dword [0x560800], 1
call dword [sym.imp.comdlg32.dll_GetOpenFileNameW]
test eax, eax
je 0x404928
movzx eax, word [ebp - 0x4186c]
mov dword [0x560800], ebx
cmp word [ebp + eax*2 - 0x4181a], bx
je 0x40479f
lea eax, [ebp - 0x41818]
push eax
lea ecx, [ebp - 0x41830]
call fcn.00403e70
mov ecx, dword [ebp - 0x4184c]
lea eax, [ebp - 0x41830]
push eax
mov dword [ebp - 4], 0
call fcn.00405410
mov eax, dword [ebp - 0x4181c]
mov dword [ebp - 4], 0xffffffff
cmp eax, 8
jb 0x404918
inc eax
lea ecx, [ebp - 0x41830]
push eax
push dword [ebp - 0x41830]
call fcn.004052a0
jmp 0x404918
xor ecx, ecx
movzx eax, word [ebp + ecx - 0x41818]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0x816], ax
test ax, ax
jne 0x4047a1
lea eax, [ebp - 0x814]
push eax
call fcn.0041eee0
lea ecx, [ebp - 0x41818]
add esp, 4
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4047d1
sub ecx, edx
lea edi, [ebp - 0x41816]
sar ecx, 1
lea edi, [edi + ecx*2]
mov esi, edi
lea ecx, [esi + 2]
nop
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x4047f0
sub esi, ecx
sar esi, 1
cmp esi, 1
jle 0x404918
mov ebx, dword [ebp - 0x4184c]
nop
xor eax, eax
mov dword [ebp - 0x41834], 7
mov dword [ebp - 0x41838], 0
mov word [ebp - 0x41848], ax
cmp word [ebp - 0x814], ax
jne 0x40483a
xor ecx, ecx
jmp 0x404852
lea ecx, [ebp - 0x814]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x404843
sub ecx, edx
sar ecx, 1
push ecx
lea eax, [ebp - 0x814]
push eax
lea ecx, [ebp - 0x41848]
call fcn.004051a0
push edi
lea eax, [ebp - 0x41848]
mov dword [ebp - 4], 1
push eax
lea eax, [ebp - 0x41830]
push eax
call fcn.00403cd0
add esp, 0xc
push eax
mov ecx, ebx
mov byte [ebp - 4], 2
call fcn.00405410
mov eax, dword [ebp - 0x4181c]
cmp eax, 8
jb 0x4048ad
inc eax
lea ecx, [ebp - 0x41830]
push eax
push dword [ebp - 0x41830]
call fcn.004052a0
xor eax, eax
mov dword [ebp - 0x4181c], 7
mov word [ebp - 0x41830], ax
mov eax, dword [ebp - 0x41834]
mov dword [ebp - 0x41820], 0
mov dword [ebp - 4], 0xffffffff
cmp eax, 8
jb 0x4048ef
inc eax
lea ecx, [ebp - 0x41848]
push eax
push dword [ebp - 0x41848]
call fcn.004052a0
lea edi, [edi + esi*2]
add edi, 2
mov esi, edi
lea ecx, [esi + 2]
nop word [eax + eax]
mov ax, word [esi]
add esi, 2
test ax, ax
jne 0x404900
sub esi, ecx
sar esi, 1
cmp esi, 1
jg 0x404810
cmp dword [ebp + 0x14], 0
jne 0x404923
call fcn.004042c0
mov ebx, 1
lea eax, [ebp - 0x1018]
mov dword [0x560800], 0
push eax
push 0
push 0
push 0x28
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
lea eax, [ebp - 0x1018]
je 0x404965
push 0x401
push eax
call fcn.0041ed70
add esp, 8
lea eax, [ebp - 0x1018]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004e1f40
mov esp, ebp
pop ebp
ret