Function at 0x4026df
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x620
push ebx
push esi
xor ebx, ebx
push 0x1fc
lea eax, [ebp - 0x414]
push ebx
push eax
mov dword [ebp - 0x418], ebx
call fcn.00409cd0
mov esi, dword [ebp + 0xc]
add esi, 8
add esp, 0xc
mov dword [ebp - 0xc], ebx
cmp word [esi], bx
jne 0x40271c
xor eax, eax
jmp 0x40295f
push edi
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
push esi
lea eax, [ebp - 0x218]
push eax
call edi
cmp word [ebp - 0x218], 0x25
jne 0x402955
lea eax, [ebp - 0x216]
push 0x25
push eax
call fcn.004099a5
pop ecx
pop ecx
cmp eax, ebx
je 0x402955
xor ecx, ecx
mov word [ebp - 0x218], cx
mov word [eax], cx
add eax, 2
mov dword [ebp - 0x10], eax
movzx eax, word [ebp - 0x216]
mov dword [ebp - 8], ebx
mov dword [ebp - 4], ebx
cmp eax, 0x44
je 0x4028cb
cmp eax, 0x4d
je 0x4028ad
cmp eax, 0x50
je 0x40288f
cmp eax, 0x53
je 0x402865
cmp eax, 0x57
je 0x402834
cmp eax, 0x74
jne 0x402922
mov edi, dword [sym.imp.KERNEL32.dll_lstrcmpW]
push str.temp
lea eax, [ebp - 0x216]
push eax
call edi
test eax, eax
jne 0x4027d2
lea eax, [ebp - 0x418]
push eax
push 0x100
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
push 0x4164b0
push esi
call edi
test eax, eax
jne 0x4028ee
mov eax, dword [ebp + 0xc]
cmp dword [eax + 0x318], ebx
je 0x4028ee
lea eax, [ebp - 0x620]
push eax
push ebx
push dword [ebp + 0x10]
call fcn.00402397
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatW]
add esp, 0xc
push 0x4164ac
lea eax, [ebp - 0x418]
push eax
call esi
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x418]
push eax
call esi
mov dword [ebp - 0xc], 1
jmp 0x4028ee
push str.WinDir
lea eax, [ebp - 0x216]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x4028ee
push 0x100
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
jmp 0x4028ee
push str.SystemDir
lea eax, [ebp - 0x216]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x4028ee
push 0x100
lea eax, [ebp - 0x418]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x4028ee
push str.ProgramFiles
lea eax, [ebp - 0x216]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x4028ee
lea eax, [ebp - 4]
push eax
push 0x26
jmp 0x4028e7
push str.MyDocuments
lea eax, [ebp - 0x216]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x4028ee
lea eax, [ebp - 4]
push eax
push 5
jmp 0x4028e7
push str.Desktop
lea eax, [ebp - 0x216]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpW]
test eax, eax
jne 0x4028ee
lea eax, [ebp - 4]
push eax
push 0x10
push ebx
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
cmp dword [ebp - 4], ebx
je 0x402922
lea eax, [ebp - 0x418]
push eax
push dword [ebp - 4]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
lea eax, [ebp - 8]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov eax, dword [ebp - 8]
push dword [ebp - 4]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp word [ebp - 0x418], bx
je 0x402938
lea eax, [ebp - 0x418]
push eax
call fcn.00402335
pop ecx
push dword [ebp - 0x10]
lea eax, [ebp - 0x418]
push eax
push 0x416438
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_wsprintfW]
add esp, 0x10
jmp 0x40295b
push esi
push dword [ebp + 8]
call edi
mov eax, dword [ebp - 0xc]
pop edi
pop esi
pop ebx
leave
ret