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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x207c
call fcn.004e1f60
mov eax, dword [0x55e2f4]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x2018], eax
mov eax, dword [ebp + 0xc]
push esi
mov esi, dword [ebp + 0x14]
mov dword [ebp - 0x2020], eax
mov eax, dword [ebp + 0x20]
push edi
mov edi, dword [ebp + 0x24]
mov dword [ebp - 0x201c], eax
mov eax, dword [ebp + 0x28]
push 0x802
mov dword [ebp - 0x2024], eax
lea eax, [ebp - 0x808]
push 0
push eax
call fcn.004e46b0
push 0x802
lea eax, [ebp - 0x1810]
push 0
push eax
call fcn.004e46b0
add esp, 0x18
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
push 0x58
lea eax, [ebp - 0x207c]
push 0
push eax
call fcn.004e46b0
add esp, 0xc
test ebx, ebx
je 0x4040e5
push ebx
push 0x5168f0
lea eax, [ebp - 0x1810]
push 0x401
push eax
call fcn.00405500
lea eax, [ebp - 0x1810]
add esp, 0x10
mov dword [ebp - 0x2050], eax
test edi, edi
je 0x4040fe
push edi
lea eax, [ebp - 0x808]
push 0x401
push eax
call fcn.004e8510
add esp, 0xc
push 0
xor eax, eax
mov dword [ebp - 0x207c], 0x58
push 0
mov word [esi], ax
mov eax, dword [ebp - 0x2018]
push 0
push str.CC_VOLUMES
mov dword [ebp - 0x2078], eax
call fcn.004bb8b0
add esp, 4
push eax
push 0
push 0
push str.ALL_FILES
call fcn.004bb8b0
add esp, 4
push eax
lea eax, [ebp - 0x2014]
push str._s__.__c._c_s__.ccx__c.ccx_c_c
push eax
call fcn.004054c0
mov ecx, dword [ebp - 0x201c]
lea eax, [ebp - 0x2014]
push dword [ebp - 0x2020]
test ecx, ecx
mov dword [ebp - 0x2064], 1
mov dword [ebp - 0x205c], 0x401
cmovne eax, ecx
mov dword [ebp - 0x2070], eax
lea eax, [ebp - 0x808]
mov dword [ebp - 0x2060], eax
call fcn.004bb8b0
mov ebx, dword [ebp + 0x1c]
add esp, 0x28
mov edi, dword [ebp + 0x18]
test ebx, ebx
mov dword [ebp - 0x204c], eax
mov ecx, 0x1000
mov eax, dword [ebp - 0x2024]
mov dword [ebp - 0x2040], eax
mov eax, 2
cmovne ecx, eax
xor edx, edx
test edi, edi
mov eax, 0x2000000
cmovne eax, edx
or ecx, eax
or ecx, 0x804
mov dword [ebp - 0x2048], ecx
test edi, edi
jne 0x4041df
call fcn.004042c0
call dword [sym.imp.KERNEL32.DLL_GetCurrentThreadId]
mov dword [0x560804], eax
lea eax, [ebp - 0x207c]
mov dword [0x560800], 1
push eax
test ebx, ebx
jne 0x40424f
call dword [sym.imp.comdlg32.dll_GetOpenFileNameW]
test eax, eax
je 0x404259
lea ecx, [ebp - 0x808]
mov dword [0x560800], 0
mov eax, ecx
sub esi, eax
nop dword [eax]
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [esi + ecx - 2], ax
test ax, ax
jne 0x404220
test edi, edi
jne 0x404239
call fcn.004042c0
pop edi
pop esi
mov eax, 1
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004e1f40
mov esp, ebp
pop ebp
ret
call dword [sym.imp.comdlg32.dll_GetSaveFileNameW]
test eax, eax
jne 0x404209
lea eax, [ebp - 0x100c]
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 - 0x100c]
je 0x404296
push 0x401
push eax
call fcn.0041ed70
add esp, 8
lea eax, [ebp - 0x100c]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
call dword [sym.imp.ole32.dll_CoUninitialize]
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004e1f40
mov esp, ebp
pop ebp
ret