Function at 0x4b45e0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x562a81
mov eax, dword fs:[0]
push eax
sub esp, 0x424
mov eax, dword [0x5d8024]
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 byte [ebp - 0x426], dl
mov edi, ecx
mov ebx, dword [edi]
mov ecx, str.ProgramFiles64Folder
mov eax, ebx
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4b4646
test dx, dx
je 0x4b4642
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4b4646
add eax, 4
add ecx, 4
test dx, dx
jne 0x4b4620
xor eax, eax
jmp 0x4b464b
sbb eax, eax
or eax, 1
or esi, 0xffffffff
test eax, eax
jne 0x4b4723
lea ecx, [ebx - 0x10]
call fcn.00408b20
add eax, 0x10
mov dword [ebp - 0x424], eax
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x424]
push str.ProgramW6432
call fcn.004938d0
test eax, eax
je 0x4b46ff
lea eax, [ebp - 0x424]
mov ecx, edi
push eax
call fcn.00478220
mov edx, dword [edi]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x4b46bc
lea eax, [ecx - 1]
test eax, eax
js 0x4b4e1e
cmp eax, ecx
jg 0x4b4e1e
cmp word [edx + eax*2], 0x5c
je 0x4b46bc
push 0x5c
mov ecx, edi
call fcn.00490c80
mov dword [ebp - 4], 0xffffffff
or eax, 0xffffffff
mov edx, dword [ebp - 0x424]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b46e1
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
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.00521781
mov esp, ebp
pop ebp
ret
mov dword [ebp - 4], 0xffffffff
mov eax, esi
mov edx, dword [ebp - 0x424]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b4723
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov bh, 1
mov byte [ebp - 0x425], bh
call fcn.00409310
test eax, eax
je 0x4b4e14
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x424], eax
mov dword [ebp - 4], 4
mov eax, str.SystemFolder
lea ecx, [ebp - 0x424]
test eax, 0xffff0000
jne 0x4b476c
movzx eax, ax
push eax
call fcn.00415200
jmp 0x4b4778
push 0xc
push str.SystemFolder
call fcn.00408e90
mov dword [ebp - 4], 5
lea edx, [ebp - 0x424]
mov ecx, edi
call fcn.0040d060
mov bl, al
mov dword [ebp - 4], 0xffffffff
mov ecx, esi
mov edx, dword [ebp - 0x424]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4b47b2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x4b4849
lea eax, [ebp - 0x218]
push eax
movzx eax, byte [ebp - 0x426]
xor eax, 1
push 0
push 0
lea eax, [eax*4 + 0x25]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b47f0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.00408e90
mov edx, dword [edi]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x4b4c4a
lea eax, [ecx - 1]
test eax, eax
js 0x4b4e1e
cmp eax, ecx
jg 0x4b4e1e
cmp word [edx + eax*2], 0x5c
je 0x4b4c4a
push 0x5c
mov ecx, edi
call fcn.00490c80
mov al, bh
jmp 0x4b46e3
call fcn.00409310
test eax, eax
je 0x4b4e14
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x424], eax
mov dword [ebp - 4], 7
mov eax, str.System32Folder
lea ecx, [ebp - 0x424]
test eax, 0xffff0000
jne 0x4b488a
movzx eax, ax
push eax
call fcn.00415200
jmp 0x4b4896
push 0xe
push str.System32Folder
call fcn.00408e90
mov dword [ebp - 4], 8
lea edx, [ebp - 0x424]
mov ecx, edi
call fcn.0040d060
mov bl, al
mov dword [ebp - 4], 0xffffffff
mov ecx, esi
mov edx, dword [ebp - 0x424]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4b48d0
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x4b4930
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ecx, 0x5c
mov word [ebp + eax*2 - 0x218], cx
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x4b4e28
xor ecx, ecx
mov word [ebp + eax - 0x218], cx
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b4920
jmp 0x4b4b42
call fcn.00409310
test eax, eax
je 0x4b4e14
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x424], eax
mov dword [ebp - 4], 0xa
mov eax, str.WindowsFolder
lea ecx, [ebp - 0x424]
test eax, 0xffff0000
jne 0x4b4971
movzx eax, ax
push eax
call fcn.00415200
jmp 0x4b497d
push 0xd
push str.WindowsFolder
call fcn.00408e90
mov dword [ebp - 4], 0xb
lea edx, [ebp - 0x424]
mov ecx, edi
call fcn.0040d060
mov bl, al
mov dword [ebp - 4], 0xffffffff
mov ecx, esi
mov edx, dword [ebp - 0x424]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4b49b7
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x4b4a10
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
mov ecx, 0x5c
mov word [ebp + eax*2 - 0x218], cx
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x4b4e28
xor ecx, ecx
mov word [ebp + eax - 0x218], cx
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b4a00
jmp 0x4b4b42
call fcn.00409310
test eax, eax
je 0x4b4e14
mov edx, dword [eax]
mov ecx, eax
call dword [edx + 0xc]
add eax, 0x10
mov dword [ebp - 0x424], eax
mov dword [ebp - 4], 0xd
mov eax, str.WindowsVolume
lea ecx, [ebp - 0x424]
test eax, 0xffff0000
jne 0x4b4a51
movzx eax, ax
push eax
call fcn.00415200
jmp 0x4b4a5d
push 0xd
push str.WindowsVolume
call fcn.00408e90
mov dword [ebp - 4], 0xe
lea edx, [ebp - 0x424]
mov ecx, edi
call fcn.0040d060
mov bl, al
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x424]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x4b4a95
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
test bl, bl
je 0x4b4acd
push 0x104
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryW]
xor eax, eax
lea ecx, [ebp - 0x218]
mov word [ebp - 0x212], ax
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b4ac0
jmp 0x4b4b42
mov ecx, dword [edi]
mov edx, str.TempFolder
mov eax, ecx
mov si, word [eax]
cmp si, word [edx]
jne 0x4b4afc
test si, si
je 0x4b4af8
mov si, word [eax + 2]
cmp si, word [edx + 2]
jne 0x4b4afc
add eax, 4
add edx, 4
test si, si
jne 0x4b4ad6
xor eax, eax
jmp 0x4b4b01
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4b4b5c
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
add eax, eax
cmp eax, 0x208
jae 0x4b4e28
xor ecx, ecx
mov word [ebp + eax - 0x218], cx
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b4b37
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.00408e90
mov al, bh
jmp 0x4b46e3
mov eax, str.SETUPEXEDIR
mov dx, word [ecx]
cmp dx, word [eax]
jne 0x4b4b87
test dx, dx
je 0x4b4b83
mov dx, word [ecx + 2]
cmp dx, word [eax + 2]
jne 0x4b4b87
add ecx, 4
add eax, 4
test dx, dx
jne 0x4b4b61
xor eax, eax
jmp 0x4b4b8c
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4b4c29
mov eax, dword [0x5de688]
cmp dword [eax - 0xc], 0
jne 0x4b4c16
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub eax, 1
je 0x4b4bd0
nop dword [eax + eax]
cmp word [ebp + eax*2 - 0x218], 0x5c
je 0x4b4bd0
sub eax, 1
jne 0x4b4bc0
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x4b4e28
xor ecx, ecx
mov word [ebp + eax - 0x218], cx
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b4bf5
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, 0x5de688
call fcn.00408e90
push 0x5de688
mov ecx, edi
call fcn.00478220
mov al, bh
jmp 0x4b46e3
xor esi, esi
nop dword [eax + eax]
mov edx, dword [esi*4 + 0x596184]
mov ecx, edi
call fcn.0040cfd0
test al, al
jne 0x4b4c51
inc esi
cmp esi, 0xe
jb 0x4b4c30
xor bh, bh
mov al, bh
jmp 0x4b46e3
lea eax, [ebp - 0x42c]
push eax
push dword [esi*4 + 0x59614c]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x4b4db5
mov eax, dword fs:[0x2c]
mov ebx, dword [esi*4 + 0x59614c]
mov ecx, dword [eax]
mov eax, dword [0x5deaac]
cmp eax, dword [ecx + 4]
jle 0x4b4cdd
push 0x5deaac
call fcn.00521b77
add esp, 4
cmp dword [0x5deaac], 0xffffffff
jne 0x4b4cdd
mov dword [ebp - 4], 0x10
push 0x578040
mov dword [0x5deab0], 0x58c324
mov dword [0x5deab4], 0
call fcn.00521a2f
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0x5deaac
call fcn.00521b2d
add esp, 4
cmp dword [0x5deab4], 0
jne 0x4b4d38
push str.shfolder.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, dword [0x5deab4]
mov esi, eax
cmp esi, ecx
je 0x4b4d13
mov edx, dword [0x5deab0]
mov ecx, 0x5deab0
call dword [edx + 4]
mov ecx, esi
mov dword [0x5deab4], ecx
test ecx, ecx
je 0x4b4d2c
push 0x5960e0
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x5de774], eax
test eax, eax
jne 0x4b4d41
mov ecx, edi
call fcn.004b4e30
jmp 0x4b46e3
mov eax, dword [0x5de774]
test eax, eax
je 0x4b4d2c
lea ecx, [ebp - 0x420]
push ecx
push 0
push 0
push ebx
push 0
call eax
test eax, eax
jne 0x4b4d2c
lea ecx, [ebp - 0x420]
lea edx, [ecx + 2]
nop
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b4d60
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.00408e90
mov edx, dword [edi]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x4b4daa
lea eax, [ecx - 1]
test eax, eax
js 0x4b4e1e
cmp eax, ecx
jg 0x4b4e1e
cmp word [edx + eax*2], 0x5c
je 0x4b4daa
push 0x5c
mov ecx, edi
call fcn.00490c80
mov al, byte [ebp - 0x425]
jmp 0x4b46e3
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x42c]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov esi, eax
mov dword [ebp - 0x424], 0
lea eax, [ebp - 0x424]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov ecx, dword [ebp - 0x424]
push dword [ebp - 0x42c]
push ecx
mov edx, dword [ecx]
call dword [edx + 0x14]
test esi, esi
je 0x4b4c48
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b4e04
jmp 0x4b47fb
push 0x80004005
call fcn.00408fe0
push 0x80070057
call fcn.00408fe0
call fcn.00521d6e
int3