Function at 0x4b5fe0
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55d05c
mov eax, dword fs:[0]
push eax
sub esp, 0x42c
mov eax, dword [0x5d0074]
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 - 0x422], dl
mov edi, ecx
mov esi, dword [edi]
mov ecx, str.ProgramFiles64Folder
mov eax, esi
nop
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4b6046
test dx, dx
je 0x4b6042
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4b6046
add eax, 4
add ecx, 4
test dx, dx
jne 0x4b6020
xor eax, eax
jmp 0x4b604b
sbb eax, eax
or eax, 1
or ebx, 0xffffffff
test eax, eax
jne 0x4b6171
lea ecx, [esi - 0x10]
call fcn.0040be70
add eax, 0x10
mov dword [ebp - 0x428], eax
mov dword [ebp - 4], 1
lea ecx, [ebp - 0x428]
push str.ProgramW6432
call fcn.00495350
test eax, eax
je 0x4b614d
mov eax, dword [ebp - 0x428]
or esi, 0xffffffff
mov ecx, dword [edi]
lea ebx, [eax - 0x10]
lea edx, [ecx - 0x10]
mov dword [ebp - 0x434], edx
cmp ebx, edx
je 0x4b6103
cmp dword [edx + 0xc], 0
lea ecx, [edx + 0xc]
mov dword [ebp - 0x430], ecx
jl 0x4b60f6
mov ecx, dword [ebx]
cmp ecx, dword [edx]
jne 0x4b60f6
mov ecx, ebx
call fcn.0040be70
mov edx, dword [ebp - 0x430]
mov ecx, esi
mov dword [ebp - 0x438], eax
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4b60ef
mov eax, dword [ebp - 0x434]
push eax
mov esi, dword [eax]
mov ecx, dword [esi]
mov edx, dword [ecx + 4]
mov ecx, esi
call edx
mov eax, dword [ebp - 0x438]
or esi, 0xffffffff
lea ecx, [eax + 0x10]
mov dword [edi], ecx
jmp 0x4b6103
push dword [eax - 0xc]
mov ecx, edi
push eax
call fcn.004143c0
mov ecx, dword [edi]
mov eax, dword [ecx - 0xc]
test eax, eax
jle 0x4b612d
lea edx, [eax - 1]
test edx, edx
js 0x4b68da
cmp edx, eax
jg 0x4b68da
cmp word [ecx + edx*2], 0x5c
je 0x4b612d
push 0x5c
mov ecx, edi
call fcn.00492e20
mov dword [ebp - 4], 0xffffffff
lock xadd dword [ebx + 0xc], esi
dec esi
test esi, esi
jg 0x4b6146
mov ecx, dword [ebx]
push ebx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, 1
jmp 0x4b6290
mov dword [ebp - 4], 0xffffffff
mov eax, ebx
mov edx, dword [ebp - 0x428]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x4b6171
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 0x421], 1
call fcn.00413cd0
mov ecx, eax
test ecx, ecx
je 0x4b68e4
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x428], eax
mov dword [ebp - 4], 4
mov eax, str.SystemFolder
lea ecx, [ebp - 0x428]
test eax, 0xffff0000
jne 0x4b61b9
movzx eax, ax
push eax
call fcn.00414050
jmp 0x4b61c5
push 0xc
push str.SystemFolder
call fcn.004143c0
mov dword [ebp - 4], 5
lea edx, [ebp - 0x428]
mov ecx, edi
call fcn.0040b9a0
mov byte [ebp - 0x429], al
mov dword [ebp - 4], 0xffffffff
mov ecx, ebx
mov edx, dword [ebp - 0x428]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4b6209
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0x429]
test al, al
je 0x4b62ac
lea eax, [ebp - 0x218]
push eax
movzx eax, byte [ebp - 0x422]
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
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b6240
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.004143c0
mov edx, dword [edi]
mov ecx, dword [edx - 0xc]
test ecx, ecx
jle 0x4b628a
lea eax, [ecx - 1]
test eax, eax
js 0x4b68da
cmp eax, ecx
jg 0x4b68da
cmp word [edx + eax*2], 0x5c
je 0x4b628a
push 0x5c
mov ecx, edi
call fcn.00492e20
mov al, byte [ebp - 0x421]
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.00520c02
mov esp, ebp
pop ebp
ret
call fcn.00413cd0
mov ecx, eax
test ecx, ecx
je 0x4b68ee
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x428], eax
mov dword [ebp - 4], 7
mov eax, str.System32Folder
lea ecx, [ebp - 0x428]
test eax, 0xffff0000
jne 0x4b62ed
movzx eax, ax
push eax
call fcn.00414050
jmp 0x4b62f9
push 0xe
push str.System32Folder
call fcn.004143c0
mov dword [ebp - 4], 8
lea edx, [ebp - 0x428]
mov ecx, edi
call fcn.0040b9a0
mov byte [ebp - 0x422], al
mov dword [ebp - 4], 0xffffffff
mov ecx, ebx
mov edx, dword [ebp - 0x428]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4b633d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0x422]
test al, al
je 0x4b63a8
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 0x4b68f8
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 0x4b6385
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.004143c0
jmp 0x4b628a
call fcn.00413cd0
mov ecx, eax
test ecx, ecx
je 0x4b68fd
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x428], eax
mov dword [ebp - 4], 0xa
mov eax, str.WindowsFolder
lea ecx, [ebp - 0x428]
test eax, 0xffff0000
jne 0x4b63e9
movzx eax, ax
push eax
call fcn.00414050
jmp 0x4b63f5
push 0xd
push str.WindowsFolder
call fcn.004143c0
mov dword [ebp - 4], 0xb
lea edx, [ebp - 0x428]
mov ecx, edi
call fcn.0040b9a0
mov byte [ebp - 0x422], al
mov dword [ebp - 4], 0xffffffff
mov ecx, ebx
mov edx, dword [ebp - 0x428]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4b6439
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0x422]
test al, al
je 0x4b6491
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 0x4b68f8
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 0x4b6481
jmp 0x4b6390
call fcn.00413cd0
mov ecx, eax
test ecx, ecx
je 0x4b6907
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x428], eax
mov dword [ebp - 4], 0xd
mov eax, str.WindowsVolume
lea ecx, [ebp - 0x428]
test eax, 0xffff0000
jne 0x4b64d2
movzx eax, ax
push eax
call fcn.00414050
jmp 0x4b64de
push 0xd
push str.WindowsVolume
call fcn.004143c0
mov dword [ebp - 4], 0xe
lea edx, [ebp - 0x428]
mov ecx, edi
call fcn.0040b9a0
mov byte [ebp - 0x422], al
mov dword [ebp - 4], 0xffffffff
mov ecx, ebx
mov edx, dword [ebp - 0x428]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x4b6522
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov al, byte [ebp - 0x422]
test al, al
je 0x4b6560
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 word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b6550
jmp 0x4b6390
mov eax, dword [edi]
mov ecx, str.TempFolder
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4b658d
test dx, dx
je 0x4b6589
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4b658d
add eax, 4
add ecx, 4
test dx, dx
jne 0x4b6567
xor eax, eax
jmp 0x4b6592
sbb eax, eax
or eax, 1
test eax, eax
jne 0x4b65e0
lea eax, [ebp - 0x218]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
add eax, eax
cmp eax, 0x208
jae 0x4b68f8
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 0x4b65d0
jmp 0x4b6390
mov edx, str.SETUPEXEDIR
mov ecx, edi
call fcn.0040b910
test al, al
je 0x4b66e2
mov eax, dword [0x5d65b4]
cmp dword [eax - 0xc], 0
jne 0x4b667b
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub eax, 1
je 0x4b6630
nop dword [eax + eax]
cmp word [ebp + eax*2 - 0x218], 0x5c
je 0x4b6630
sub eax, 1
jne 0x4b6620
lea eax, [eax*2 + 2]
cmp eax, 0x208
jae 0x4b68f8
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 0x4b6655
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, 0x5d65b4
call fcn.004143c0
mov eax, dword [0x5d65b4]
mov esi, dword [edi]
lea ecx, [eax - 0x10]
sub esi, 0x10
cmp ecx, esi
je 0x4b628a
cmp dword [esi + 0xc], 0
lea edx, [esi + 0xc]
mov dword [ebp - 0x438], edx
jl 0x4b66d2
mov edx, dword [ecx]
cmp edx, dword [esi]
jne 0x4b66d2
call fcn.0040be70
mov ecx, dword [ebp - 0x438]
mov dword [ebp - 0x434], eax
lock xadd dword [ecx], ebx
dec ebx
test ebx, ebx
jg 0x4b66c8
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x434]
add eax, 0x10
mov dword [edi], eax
jmp 0x4b628a
push dword [eax - 0xc]
mov ecx, edi
push eax
call fcn.004143c0
jmp 0x4b628a
xor esi, esi
nop dword [eax]
nop dword [eax + eax]
mov edx, dword [esi*4 + 0x58e954]
mov ecx, edi
call fcn.0040b910
test al, al
jne 0x4b670f
inc esi
cmp esi, 0xe
jb 0x4b66f0
xor al, al
jmp 0x4b6290
cmp esi, 0xe
jae 0x4b6708
lea eax, [ebp - 0x430]
push eax
push dword [esi*4 + 0x58e91c]
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
je 0x4b685c
mov eax, dword fs:[0x2c]
mov ebx, dword [esi*4 + 0x58e91c]
mov ecx, dword [eax]
mov eax, dword [0x5d709c]
cmp eax, dword [ecx + 4]
jle 0x4b67a0
push 0x5d709c
call fcn.00520e0e
add esp, 4
cmp dword [0x5d709c], 0xffffffff
jne 0x4b67a0
mov dword [ebp - 4], 0x10
push 0x570100
mov dword [0x5d70a0], 0x584ae4
mov dword [0x5d70a4], 0
call fcn.0052116a
add esp, 4
mov dword [ebp - 4], 0xffffffff
push 0x5d709c
call fcn.00520dc4
add esp, 4
cmp dword [0x5d70a4], 0
jne 0x4b67fb
push str.shfolder.dll
call dword [sym.imp.KERNEL32.dll_LoadLibraryW]
mov ecx, dword [0x5d70a4]
mov esi, eax
cmp esi, ecx
je 0x4b67d6
mov edx, dword [0x5d70a0]
mov ecx, 0x5d70a0
call dword [edx + 4]
mov ecx, esi
mov dword [0x5d70a4], ecx
test ecx, ecx
je 0x4b6850
push 0x58e8b0
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [0x5d66a4], eax
test eax, eax
jne 0x4b6804
mov ecx, edi
call fcn.004b6920
jmp 0x4b6290
mov eax, dword [0x5d66a4]
test eax, eax
je 0x4b6850
lea ecx, [ebp - 0x420]
push ecx
push 0
push 0
push ebx
push 0
call eax
mov esi, eax
test esi, esi
jne 0x4b6850
lea ecx, [ebp - 0x420]
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b6823
sub ecx, edx
lea eax, [ebp - 0x420]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.004143c0
mov ecx, edi
call fcn.00493910
test esi, esi
je 0x4b628a
mov ecx, edi
call fcn.004b6920
jmp 0x4b6290
lea eax, [ebp - 0x218]
push eax
push dword [ebp - 0x430]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
mov esi, eax
mov dword [ebp - 0x428], 0
lea eax, [ebp - 0x428]
push eax
call dword [sym.imp.SHELL32.dll_SHGetMalloc]
mov ecx, dword [ebp - 0x428]
push dword [ebp - 0x430]
push ecx
mov edx, dword [ecx]
call dword [edx + 0x14]
test esi, esi
je 0x4b6708
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x4b68b0
sub ecx, edx
lea eax, [ebp - 0x218]
sar ecx, 1
push ecx
push eax
mov ecx, edi
call fcn.004143c0
mov ecx, edi
call fcn.00493910
jmp 0x4b628a
push 0x80070057
call fcn.004143a0
push 0x80004005
call fcn.004143a0
push 0x80004005
call fcn.004143a0
call fcn.005212a0
push 0x80004005
call fcn.004143a0
push 0x80004005
call fcn.004143a0
int3