Function at 0x412e9d
Capabilities:
Get common file path

Disassembly:
push 0x21c
mov eax, 0x4377f5
call fcn.004226b6
mov byte [ebp - 0x219], dl
mov edi, ecx
push str.ProgramFiles64Folder
call fcn.00401fb5
test eax, eax
jne 0x412f62
mov ecx, dword [edi]
sub ecx, 0x10
call fcn.00404f5e
add eax, 0x10
mov dword [ebp - 0x224], eax
and dword [ebp - 4], 0
lea ecx, [ebp - 0x224]
push str.ProgramW6432
call fcn.004080e7
test eax, eax
je 0x412f50
mov eax, dword [ebp - 0x224]
mov ebx, dword [edi]
sub ebx, 0x10
lea edx, [eax - 0x10]
mov dword [ebp - 0x228], edx
cmp edx, ebx
je 0x412f37
cmp dword [ebx + 0xc], 0
jl 0x412f2c
mov ecx, dword [edx]
cmp ecx, dword [ebx]
jne 0x412f2c
mov ecx, edx
call fcn.00404f5e
mov ecx, ebx
mov esi, eax
call fcn.00402471
lea eax, [esi + 0x10]
mov dword [edi], eax
jmp 0x412f37
push dword [eax - 0xc]
mov ecx, edi
push eax
call fcn.004026cf
mov ecx, edi
call fcn.00407130
mov ecx, dword [ebp - 0x228]
call fcn.00402471
mov al, 1
jmp 0x4131f7
or dword [ebp - 4], 0xffffffff
mov ecx, dword [ebp - 0x224]
lea ecx, [ecx - 0x10]
call fcn.00402471
xor ebx, ebx
lea ecx, [ebp - 0x220]
push str.SystemFolder
inc ebx
call fcn.00402742
mov dword [ebp - 4], ebx
mov ecx, edi
push dword [eax]
call fcn.00401fb5
or dword [ebp - 4], 0xffffffff
mov esi, eax
mov ecx, dword [ebp - 0x220]
add ecx, 0xfffffff0
call fcn.00402471
test esi, esi
jne 0x412fe4
lea eax, [ebp - 0x218]
xor ecx, ecx
push eax
movzx eax, byte [ebp - 0x219]
xor eax, ebx
push ecx
push ecx
lea eax, [eax*4 + 0x25]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x218]
push eax
call fcn.00425b9b
pop ecx
push eax
lea eax, [ebp - 0x218]
mov ecx, edi
push eax
call fcn.004026cf
mov ecx, edi
call fcn.00407130
jmp 0x4131f5
push str.System32Folder
lea ecx, [ebp - 0x220]
call fcn.00402742
mov dword [ebp - 4], 2
mov ecx, edi
push dword [eax]
call fcn.00401fb5
or dword [ebp - 4], 0xffffffff
mov esi, eax
mov ecx, dword [ebp - 0x220]
add ecx, 0xfffffff0
call fcn.00402471
test esi, esi
jne 0x413030
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
jmp 0x41307a
push str.WindowsFolder
lea ecx, [ebp - 0x220]
call fcn.00402742
mov dword [ebp - 4], 3
mov ecx, edi
push dword [eax]
call fcn.00401fb5
or dword [ebp - 4], 0xffffffff
mov esi, eax
mov ecx, dword [ebp - 0x220]
add ecx, 0xfffffff0
call fcn.00402471
test esi, esi
jne 0x41308e
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
push 0x5c
pop ecx
mov word [ebp + eax*2 - 0x218], cx
lea eax, [eax*2 + 2]
jmp 0x413107
push str.WindowsVolume
lea ecx, [ebp - 0x220]
call fcn.00402742
mov dword [ebp - 4], 4
mov ecx, edi
push dword [eax]
call fcn.00401fb5
or dword [ebp - 4], 0xffffffff
mov esi, eax
mov ecx, dword [ebp - 0x220]
add ecx, 0xfffffff0
call fcn.00402471
test esi, esi
jne 0x4130e3
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor eax, eax
mov word [ebp - 0x212], ax
jmp 0x41311c
push str.TempFolder
mov ecx, edi
call fcn.00401fb5
test eax, eax
jne 0x41313d
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
add eax, eax
cmp eax, 0x208
jae 0x4132aa
xor ecx, ecx
mov word [ebp + eax - 0x218], cx
lea eax, [ebp - 0x218]
push eax
call fcn.00425b9b
pop ecx
push eax
lea eax, [ebp - 0x218]
mov ecx, edi
push eax
call fcn.004026cf
jmp 0x4131f5
push str.SETUPEXEDIR
mov ecx, edi
call fcn.00401fb5
test eax, eax
jne 0x41320a
mov eax, dword [0x44fcd4]
cmp dword [eax - 0xc], 0
jne 0x4131c7
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub eax, 1
je 0x413187
push 0x5c
pop ecx
cmp word [ebp + eax*2 - 0x218], cx
je 0x413187
sub eax, 1
jne 0x413178
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x4132aa
xor ecx, ecx
mov word [ebp + eax - 0x218], cx
lea eax, [ebp - 0x218]
push eax
call fcn.00425b9b
pop ecx
push eax
lea eax, [ebp - 0x218]
mov ecx, 0x44fcd4
push eax
call fcn.004026cf
mov eax, dword [0x44fcd4]
mov ebx, dword [edi]
lea ecx, [eax - 0x10]
sub ebx, 0x10
cmp ecx, ebx
je 0x4131f2
cmp dword [ebx + 0xc], 0
jl 0x4131fd
mov edx, dword [ecx]
cmp edx, dword [ebx]
jne 0x4131fd
call fcn.00404f5e
mov ecx, ebx
mov esi, eax
call fcn.00402471
lea eax, [esi + 0x10]
mov dword [edi], eax
xor ebx, ebx
inc ebx
mov al, bl
call fcn.00422671
ret
push dword [eax - 0xc]
mov ecx, edi
push eax
call fcn.004026cf
jmp 0x4131f2
xor esi, esi
push dword [esi*4 + 0x446d58]
mov ecx, edi
call fcn.00401fb5
test eax, eax
je 0x413224
inc esi
cmp esi, 0xe
jb 0x41320c
cmp esi, 0xe
jae 0x4132a3
lea eax, [ebp - 0x228]
push eax
push dword [esi*4 + 0x446d20]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x413260
mov ecx, dword [esi*4 + 0x446d20]
mov edx, edi
call fcn.004132b0
test al, al
jne 0x4131f5
mov ecx, edi
call fcn.004133c1
mov bl, al
jmp 0x4131f5
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x228]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
and dword [ebp - 0x224], 0
mov esi, eax
lea eax, [ebp - 0x224]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov ecx, dword [ebp - 0x224]
push dword [ebp - 0x228]
push ecx
mov edx, dword [ecx]
call dword [edx + 0x14]
test esi, esi
jne 0x412fbc
xor bl, bl
jmp 0x4131f5
call fcn.004222e1
int3