Function at 0x40da10
Capabilities:
Get common file path

Disassembly:
sub esp, 0x408
mov eax, dword [0x49e280]
xor eax, esp
mov dword [esp + 0x404], eax
push ebx
push esi
xor eax, eax
push 0x1fe
mov esi, ecx
push eax
lea ecx, [esp + 0x216]
push ecx
mov word [esp + 0x218], ax
call fcn.0045acf0
xor edx, edx
push 0x1fe
push edx
lea eax, [esp + 0x22]
push eax
mov word [esp + 0x24], dx
call fcn.0045acf0
add esp, 0x18
test esi, esi
je 0x40dd0e
mov ebx, dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
call ebx
test eax, eax
je 0x40dd0e
test edi, edi
je 0x40dd0e
push ebp
push esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrcpyW]
push 0x100
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
lea edx, [esp + 0x10]
push edx
call ebx
mov ebp, dword [sym.imp.USER32.dll_wsprintfW]
test eax, eax
je 0x40dad4
push str.WinDir
lea eax, [esp + 0x214]
push 0x48cb20
push eax
call ebp
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x220]
mov ecx, edi
call fcn.0040d580
add esp, 0x10
push 0x100
lea edx, [esp + 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
lea eax, [esp + 0x10]
push eax
call ebx
test eax, eax
je 0x40db19
push str.SysDir
lea ecx, [esp + 0x214]
push 0x48cb38
push ecx
call ebp
lea edx, [esp + 0x1c]
push edx
lea edx, [esp + 0x220]
mov ecx, edi
call fcn.0040d580
add esp, 0x10
mov ebx, dword [sym.imp.ComFnUtl.dll_ComFnUtl_GetSpecialFolderW]
push 0x100
lea eax, [esp + 0x14]
push eax
push 0xb
push 0
call ebx
add esp, 0x10
test eax, eax
je 0x40db70
cmp word [esp + 0x12], 0x3a
jne 0x40db70
cmp word [esp + 0x14], 0x5c
jne 0x40db70
push str.StartMenuDir
lea ecx, [esp + 0x214]
push 0x48cb5c
push ecx
call ebp
lea edx, [esp + 0x1c]
push edx
lea edx, [esp + 0x220]
mov ecx, edi
call fcn.0040d580
add esp, 0x10
push 0x20019
push str.SoftwareMicrosoftWindowsCurrentVersion
push reloc.OLEAUT32.dll_SysReAllocString
mov dword [esp + 0x18], 0x200
call dword [sym.imp.SzUPFUtl.dll_SzUPFUtl_OpenKeyW]
mov esi, eax
add esp, 0xc
test esi, esi
je 0x40dbb8
push 0
lea eax, [esp + 0x10]
push eax
lea ecx, [esp + 0x18]
push ecx
push 0x48cbbc
push esi
call dword [sym.imp.SzUPFUtl.dll_SzUPFUtl_QueryRegistryValueW]
add esp, 0x14
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x40dbf1
push str.ProgramFilesDir
lea eax, [esp + 0x214]
push 0x48cbfc
push eax
call ebp
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x220]
mov ecx, edi
call fcn.0040d580
add esp, 0x10
push 0x100
lea edx, [esp + 0x14]
push edx
push 2
push 0
call ebx
add esp, 0x10
mov esi, 0x3a
test eax, eax
je 0x40dc46
cmp word [esp + 0x12], si
jne 0x40dc46
cmp word [esp + 0x14], 0x5c
jne 0x40dc46
push str.ProgramsDir
lea eax, [esp + 0x214]
push 0x48cc1c
push eax
call ebp
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x220]
mov ecx, edi
call fcn.0040d580
add esp, 0x10
push 0x100
lea edx, [esp + 0x14]
push edx
push 7
push 0
call ebx
add esp, 0x10
test eax, eax
je 0x40dc96
cmp word [esp + 0x12], si
jne 0x40dc96
cmp word [esp + 0x14], 0x5c
jne 0x40dc96
push str.StartupDir
lea eax, [esp + 0x214]
push 0x48cc3c
push eax
call ebp
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x220]
mov ecx, edi
call fcn.0040d580
add esp, 0x10
push 0x100
lea edx, [esp + 0x14]
push edx
push 0x10
push 0
call ebx
add esp, 0x10
test eax, eax
je 0x40dce6
cmp word [esp + 0x12], si
jne 0x40dce6
cmp word [esp + 0x14], 0x5c
jne 0x40dce6
push str.DesktopDir
lea eax, [esp + 0x214]
push 0x48cc5c
push eax
call ebp
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x220]
mov ecx, edi
call fcn.0040d580
add esp, 0x10
push edi
call fcn.0040d750
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
pop ebp
pop esi
pop ebx
mov ecx, dword [esp + 0x404]
xor ecx, esp
call fcn.00457c10
add esp, 0x408
ret
mov ecx, dword [esp + 0x40c]
pop esi
pop ebx
xor ecx, esp
xor eax, eax
call fcn.00457c10
add esp, 0x408
ret