Function at 0x16005b250
Capabilities:
Get common file path

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x2e0]
sub rsp, 0x3e0
mov qword [rsp + 0x60], 0xfffffffffffffffe
mov qword [rsp + 0x438], rbx
mov rax, qword [0x160270bd8]
xor rax, rsp
mov qword [rbp + 0x2d0], rax
mov rax, r8
mov qword [rsp + 0x40], rax
mov rbx, rdx
mov rsi, rcx
mov rcx, qword [rbp + 0x340]
mov qword [rsp + 0x50], rcx
mov rcx, qword [rbp + 0x348]
mov qword [rsp + 0x48], rcx
mov rcx, qword [rbp + 0x350]
mov qword [rsp + 0x58], rcx
mov r12, qword [rbp + 0x358]
test rdx, rdx
je 0x16009cf06
test rax, rax
je 0x16009cf06
xor r13d, r13d
test r12, r12
je 0x16005b2e4
mov dword [r12], r13d
movzx eax, word [rdx + 0x1ce]
mov ecx, 0xfff7
test al, 8
jne 0x16009c966
movzx eax, word [rdx + 0x1c4]
mov ecx, 8
mov r15d, 1
test ax, ax
je 0x16009c992
movzx edi, ax
movzx r14d, word [rbx + 0x1c2]
lea rdx, [rbx + 0x18]
lea r8, [r14 + rdi]
cmp r8, r14
jb 0x16005b91c
mov eax, dword [rdx + 0x14]
cmp r8, rax
ja 0x16009ca35
mov dword [rbp - 0x78], r14d
mov qword [rbp - 0x70], rdx
mov dword [rbp - 0x74], edi
mov rcx, rbx
call fcn.160027930
cmp word [rbx + 0x1b8], r13w
jne 0x16005b375
movzx eax, word [rbx + 0x1ce]
test al, 8
jne 0x16009ca54
cmp word [rbx + 0x1bc], r13w
jne 0x16009ca8e
lea rcx, [rsi + 0x48]
call fcn.160027930
movzx ecx, word [rsi + 0x200]
lea r14, [0x160271de8]
lea r8, [0x160271da0]
lea rdx, [0x160271db8]
lea r10, [0x160271dd0]
lea rax, [0x160271e18]
lea r9, [0x160271e00]
test ecx, ecx
jne 0x16005b597
mov edi, dword [0x160271e2c]
mov qword [rsp + 0x38], rax
mov rcx, rbx
call fcn.160027930
movzx ecx, word [rbx + 0x1b8]
test ecx, ecx
jne 0x16005b5c7
mov ebx, dword [0x160271e2c]
lea r14, [0x160271e18]
xor r8d, r8d
cmp ebx, edi
jne 0x16005b449
mov rcx, qword [rsp + 0x38]
mov rcx, qword [rcx + 8]
mov rdx, qword [r14 + 8]
mov eax, r13d
lea rdi, [rcx + rax*2]
mov eax, r8d
lea r14, [rdx + rax*2]
mov dword [rsp + 0x28], ebx
mov qword [rsp + 0x20], rdi
mov r9d, ebx
mov r8, r14
mov edx, r15d
mov ecx, 0x800
call qword [sym.imp.api_ms_win_core_string_l1_1_0.dll_CompareStringW]
cmp eax, 2
jne 0x16009cbf2
mov r8d, dword [rsi + 0x3f8]
lea rdx, [rbp - 0x78]
mov rcx, qword [rsi + 0x5c0]
call fcn.16005bbd0
test eax, eax
jne 0x16005b476
mov eax, r15d
mov rcx, qword [rbp + 0x2d0]
xor rcx, rsp
call fcn.16006e590
mov rbx, qword [rsp + 0x438]
add rsp, 0x3e0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret
xor bl, bl
cmp dword [rsi + 0x3f0], 0
je 0x16005b4e9
mov eax, dword [rsi + 0x3f0]
mov rcx, qword [rsp + 0x40]
mov dword [rcx], eax
mov rbx, qword [rsp + 0x48]
test rbx, rbx
jne 0x16009cede
xor edx, edx
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x16005b4b0
mov eax, dword [rsi + 0x5a0]
mov dword [rcx], eax
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x16005b4c2
mov eax, dword [rsi + 0x5a4]
mov dword [rcx], eax
test r12, r12
je 0x16005b4dd
cmp dword [rsi + 0x3f0], 0
je 0x16005b4e4
cmp dword [rsi + 0x5b4], 0
je 0x16005b4e4
mov dword [r12], r15d
xor eax, eax
jmp 0x16005b44c
mov r15d, edx
jmp 0x16005b4d9
mov rdx, qword [rbp - 0x70]
lea rcx, [rbp - 0x50]
call fcn.160040ae8
nop
mov r9d, dword [rbp - 0x3c]
mov dword [rsp + 0x28], r9d
mov r8, qword [rbp - 0x48]
mov qword [rsp + 0x20], r8
mov edx, 0x100
mov ecx, 0x800
call qword [sym.imp.api_ms_win_core_localization_l1_2_0.dll_LCMapStringW]
lea rdx, str.indexed
lea rcx, [rbp - 0x50]
call fcn.160034afc
mov r14d, eax
lea rdx, str.appdata
lea rcx, [rbp - 0x50]
call fcn.160034afc
mov edi, eax
lea rdx, str.history
lea rcx, [rbp - 0x50]
call fcn.160034afc
mov r8d, eax
lea rcx, [rbp - 0x50]
call fcn.160034bbc
movzx ecx, ax
call fcn.16005c2e4
test eax, eax
jne 0x16005b616
cmp edi, 0xffffffff
je 0x16005b581
cmp r14d, edi
jg 0x16005b616
cmp r8d, edi
jg 0x16005b616
lea rcx, [rbp - 0x50]
call fcn.160040b2c
test bl, bl
je 0x16005b481
jmp 0x16005b449
sub ecx, r15d
je 0x16009cb61
sub ecx, 5
je 0x16009cb29
sub ecx, r15d
je 0x16009cb19
sub ecx, r15d
jne 0x16005b5fd
mov edi, dword [0x160271dcc]
mov qword [rsp + 0x38], rdx
jmp 0x16005b3c2
sub ecx, r15d
je 0x16009cbe0
sub ecx, 5
je 0x16009cba8
sub ecx, r15d
je 0x16009cb96
sub ecx, r15d
jne 0x16009cb71
mov ebx, dword [0x160271dcc]
lea r14, [0x160271db8]
jmp 0x16005b3e6
cmp ecx, r15d
jne 0x16009cb09
mov edi, dword [0x160271db4]
mov qword [rsp + 0x38], r8
jmp 0x16005b3c2
lea rdx, str..___appdata___local___packages__________localstateroamingstatelocalcache____indexed___.
lea rcx, [rbp + 0x70]
call fcn.16002577c
nop
lea rdx, str..___appdata____local____packages____________localstateroamingstatelocalcache_____indexed___.___________
lea rcx, [rbp + 0x50]
call fcn.16002577c
nop
mov edx, dword [0x160271690]
mov rax, qword gs:[0x58]
mov ecx, 8
mov rdi, qword [rax + rdx*8]
add rdi, rcx
mov eax, dword [rdi]
cmp dword [0x160273c50], eax
jg 0x16005b7ff
mov eax, dword [rdi]
cmp dword [0x160273c54], eax
jg 0x16005b846
lea rcx, [rbp - 0x50]
call fcn.160034bbc
movzx ecx, ax
call fcn.16005c2e4
test eax, eax
je 0x16005b6a6
xor edx, edx
lea rcx, [rbp - 0x50]
call fcn.160034ad4
mov rcx, rax
lea rdx, [0x160273c30]
call fcn.16005d1c0
test al, al
jne 0x16009cc20
lea rcx, [rbp - 0x50]
call fcn.160034bbc
movzx ecx, ax
call fcn.16005c2e4
test eax, eax
je 0x16005b7b1
lea rdx, str..___appdata___local___microsoft___windows___connectedsearch___history___.
lea rcx, [rbp - 0x78]
call fcn.16002577c
nop
lea rdx, str..___appdata____local____microsoft____windows____connectedsearch____history___.___________
lea rcx, [rsp + 0x68]
call fcn.16002577c
nop
mov eax, dword [rdi]
cmp dword [0x160273cc0], eax
jg 0x16005b88d
mov eax, dword [rdi]
cmp dword [0x160273c98], eax
jg 0x16005b8d4
lea rcx, [rbp - 0x50]
call fcn.160034bbc
movzx ecx, ax
call fcn.16005c2e4
test eax, eax
je 0x16005b735
xor edx, edx
lea rcx, [rbp - 0x50]
call fcn.160034ad4
mov rcx, rax
lea rdx, [0x160273c78]
call fcn.16005d1c0
test al, al
jne 0x16009cc28
lea rcx, [rbp - 0x50]
call fcn.160034bbc
movzx ecx, ax
call fcn.16005c2e4
test eax, eax
je 0x16005b7d8
xor r14b, r14b
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x68]
call fcn.160025718
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp - 0x78]
call fcn.160025718
xor r13b, r13b
lea rcx, str.DisableCheckUrlWPSystem
call fcn.16005a698
test al, al
je 0x16009cc30
test r14b, r14b
jne 0x16009ccff
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x50]
call fcn.160025718
nop
xor r8d, r8d
mov dl, 1
lea rcx, [rbp + 0x70]
call fcn.160025718
jmp 0x16005b581
xor edx, edx
lea rcx, [rbp - 0x50]
call fcn.160034ad4
mov rcx, rax
lea rdx, [0x160273ca0]
call fcn.16005d1c0
test al, al
je 0x16005b6bf
jmp 0x16009cc20
xor edx, edx
lea rcx, [rbp - 0x50]
call fcn.160034ad4
mov rcx, rax
lea rdx, [0x160273c58]
call fcn.16005d1c0
test al, al
je 0x16005b74e
jmp 0x16009cc28
lea rcx, [0x160273c50]
call fcn.16006e658
cmp dword [0x160273c50], 0xffffffff
jne 0x16005b661
lea rdx, [rbp + 0x70]
lea rcx, [0x160273ca0]
call fcn.16000b228
lea rcx, [0x16007bb60]
call fcn.16006ead0
nop
lea rcx, [0x160273c50]
call fcn.16006e5ec
jmp 0x16005b661
lea rcx, [0x160273c54]
call fcn.16006e658
cmp dword [0x160273c54], 0xffffffff
jne 0x16005b66f
lea rdx, [rbp + 0x50]
lea rcx, [0x160273c30]
call fcn.16000b228
lea rcx, [0x16007bb30]
call fcn.16006ead0
nop
lea rcx, [0x160273c54]
call fcn.16006e5ec
jmp 0x16005b66f
lea rcx, [0x160273cc0]
call fcn.16006e658
cmp dword [0x160273cc0], 0xffffffff
jne 0x16005b6f0
lea rdx, [rbp - 0x78]
lea rcx, [0x160273c58]
call fcn.16000b228
lea rcx, [0x16007bb50]
call fcn.16006ead0
nop
lea rcx, [0x160273cc0]
call fcn.16006e5ec
jmp 0x16005b6f0
lea rcx, [0x160273c98]
call fcn.16006e658
cmp dword [0x160273c98], 0xffffffff
jne 0x16005b6fe
lea rdx, [rsp + 0x68]
lea rcx, [0x160273c78]
call fcn.16000b228
lea rcx, [0x16007bb40]
call fcn.16006ead0
nop
lea rcx, [0x160273c98]
call fcn.16006e5ec
jmp 0x16005b6fe
call fcn.1600bdb04
int3
and ax, cx
mov word [rdx + 0x1ce], ax
mov rcx, rbx
call fcn.160027020
movzx eax, word [rbx + 0x1c6]
sub ax, word [rbx + 0x1c2]
mov word [rbx + 0x1c4], ax
jmp 0x16005b2ff
mov eax, r13d
cmp word [rbx + 0x1b8], r13w
je 0x16005b313
mov edx, dword [0x160271690]
mov rax, qword gs:[0x58]
mov rax, qword [rax + rdx*8]
mov ecx, dword [rcx + rax]
cmp dword [0x160274068], ecx
jle 0x16009ca18
lea rcx, [0x160274068]
call fcn.16006e658
cmp dword [0x160274068], 0xffffffff
jne 0x16009ca18
mov dword [0x16027404c], r15d
mov dword [0x160274048], r15d
lea rax, [0x1601d6254]
mov qword [0x160274040], rax
lea rax, [0x1601bbd80]
mov qword [0x160274038], rax
lea rcx, [0x16007b8a0]
call fcn.16006ead0
lea rcx, [0x160274068]
call fcn.16006e5ec
mov r14d, r13d
mov dword [rbp - 0x78], r13d
mov edi, dword [0x16027404c]
lea rax, [0x160274038]
mov qword [rbp - 0x70], rax
jmp 0x16005b343
mov rcx, qword [rbp + 0x318]
mov r9d, 0xce
lea r8, str.onecoreuap_base_appmodel_search_searchcommonincludelmstr.hxx
mov edx, 0x44c
call fcn.160108adc
int3
mov ecx, 0xfff7
and ax, cx
mov word [rbx + 0x1ce], ax
mov rcx, rbx
call fcn.160027020
movzx eax, word [rbx + 0x1c6]
sub ax, word [rbx + 0x1c2]
mov word [rbx + 0x1c4], ax
cmp word [rbx + 0x1b8], r13w
je 0x16005b367
cmp edi, 2
jae 0x16009cab2
mov rcx, qword [rbp + 0x318]
mov r9d, 0xce
lea r8, str.onecoreuap_base_appmodel_search_searchcommonincludelmstr.hxx
mov edx, 0x3d4
call fcn.160108adc
int3
add r14d, 2
mov dword [rbp - 0x78], r14d
add edi, 0xfffffffe
mov dword [rbp - 0x74], edi
xor edx, edx
lea rcx, [rbp - 0x78]
call fcn.160026d40
mov ecx, eax
cmp eax, 0xffffffff
je 0x16005b449
cmp eax, edi
jbe 0x16009caf9
mov rcx, qword [rbp + 0x318]
mov r9d, 0xce
lea r8, str.onecoreuap_base_appmodel_search_searchcommonincludelmstr.hxx
mov edx, 0x3d4
call fcn.160108adc
int3
add eax, r14d
mov dword [rbp - 0x78], eax
sub edi, ecx
mov dword [rbp - 0x74], edi
jmp 0x16005b375
mov edi, dword [0x160271dfc]
mov qword [rsp + 0x38], r14
jmp 0x16005b3c2
mov edi, dword [0x160271de4]
mov qword [rsp + 0x38], r10
jmp 0x16005b3c2
mov edx, 0x3a
xor r8d, r8d
lea rcx, [rsi + 0x60]
call fcn.160034cb0
mov r9d, eax
xor r8d, r8d
lea rdx, [rsp + 0x68]
lea rcx, [rsi + 0x60]
call fcn.160034a74
mov rax, qword [rsp + 0x70]
mov edi, dword [rsp + 0x6c]
mov r13d, dword [rsp + 0x68]
jmp 0x16005b3bd
mov edi, dword [0x160271e14]
mov qword [rsp + 0x38], r9
jmp 0x16005b3c2
xor r8d, r8d
cmp ecx, r15d
je 0x16009cb84
mov ebx, dword [0x160271dfc]
jmp 0x16005b3e9
mov ebx, dword [0x160271db4]
lea r14, [0x160271da0]
jmp 0x16005b3e9
mov ebx, dword [0x160271de4]
lea r14, [0x160271dd0]
jmp 0x16005b3e6
mov edx, 0x3a
xor r8d, r8d
lea rcx, [rbx + 0x18]
call fcn.160034cb0
mov r9d, eax
xor r8d, r8d
lea rdx, [rsp + 0x68]
lea rcx, [rbx + 0x18]
call fcn.160034a74
mov r14, qword [rsp + 0x70]
mov ebx, dword [rsp + 0x6c]
mov r8d, dword [rsp + 0x68]
jmp 0x16005b3e9
mov ebx, dword [0x160271e14]
lea r14, [0x160271e00]
jmp 0x16005b3e6
sub eax, r15d
je 0x16005b449
cmp eax, 2
je 0x16005b449
movsxd r8, ebx
mov rdx, rdi
mov rcx, r14
call qword [sym.imp.msvcrt.dll__wcsnicmp]
test eax, eax
jne 0x16005b449
jmp 0x16005b42e
mov r14b, 1
jmp 0x16005b76f
mov r14b, 1
jmp 0x16005b751
lea rdx, str.wpsystem
lea rcx, [rbp - 0x50]
call fcn.160034afc
cmp eax, 0xffffffff
setne r13b
test r14b, r14b
jne 0x16009ccff
lea rcx, [rbp - 0x50]
call fcn.160034bbc
movzx ecx, ax
call fcn.16005c2e4
test eax, eax
je 0x16005b78f
test r13b, r13b
je 0x16005b78f
lea rdx, str._file:___a_z_:____........_...._...._...._............____wpsystem___
lea rcx, [rsp + 0x68]
call fcn.16002577c
nop
mov eax, dword [rdi]
cmp dword [0x160274de8], eax
jle 0x16009cccd
lea rcx, [0x160274de8]
call fcn.16006e658
cmp dword [0x160274de8], 0xffffffff
jne 0x16009cccd
lea rdx, [rsp + 0x68]
lea rcx, [0x160274278]
call fcn.16000b228
lea rcx, [0x16007bb80]
call fcn.16006ead0
nop
lea rcx, [0x160274de8]
call fcn.16006e5ec
xor edx, edx
lea rcx, [rbp - 0x50]
call fcn.160034ad4
mov rcx, rax
lea rdx, [0x160274278]
call fcn.16005d1c0
movzx ebx, al
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x68]
call fcn.160025718
nop
jmp 0x16005b78f
xor r14d, r14d
mov qword [rsp + 0x38], r14
lea rax, [rsp + 0x38]
mov qword [rsp + 0x68], rax
mov qword [rsp + 0x70], r14
mov byte [rsp + 0x78], 1
lea r9, [rsp + 0x70]
xor r8d, r8d
xor edx, edx
lea rcx, [0x1601d9710]
call qword [sym.imp.ext_ms_win_shell32_shellfolders_l1_1_0.dll_SHGetKnownFolderPath]
test eax, eax
setns dl
mov byte [rsp + 0x30], dl
cmp byte [rsp + 0x78], r14b
je 0x16009cd72
mov r14, qword [rsp + 0x70]
mov rax, qword [rsp + 0x68]
mov qword [rbp - 0x78], rax
mov rcx, qword [rax]
cmp r14, rcx
je 0x16009cd6f
test rcx, rcx
je 0x16009cd6c
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
mov rax, qword [rbp - 0x78]
movzx edx, byte [rsp + 0x30]
mov qword [rax], r14
xor r14d, r14d
test dl, dl
je 0x16009ce33
lea rax, [rbp + 0x148]
mov qword [rbp + 0x138], rax
mov qword [rbp + 0x140], CreateErrorInfo
mov word [rbp + 0x148], r14w
lea rax, fcn.160019c60
mov qword [rbp + 0x130], rax
lea r8, [rbp + 0x130]
mov rdx, qword [rsp + 0x38]
mov rcx, qword [rsi + 0x290]
call fcn.16001de30
test eax, eax
js 0x16009ce1f
lea rdx, [rbp + 0x130]
lea rcx, [rbp + 0x90]
call fcn.160040ae8
nop
mov dword [rsp + 0x68], r14d
mov eax, dword [rbp + 0xa4]
mov dword [rsp + 0x6c], eax
lea rax, [rbp + 0x90]
mov qword [rsp + 0x70], rax
mov rcx, qword [rsi + 0x5c0]
add rcx, 0x18
lea rdx, [rsp + 0x68]
call fcn.160177fe0
movzx ebx, bl
test eax, eax
cmovne ebx, r15d
lea rcx, [rbp + 0x90]
call fcn.160040b2c
nop
lea rcx, [rbp + 0x130]
call fcn.160019cb0
test bl, bl
jne 0x16009cec4
test r13b, r13b
je 0x16009cec4
lea rdx, str._file:___a_z_:____........_...._...._...._............____wpsystem___.
lea rcx, [rsp + 0x68]
call fcn.16002577c
nop
mov eax, dword [rdi]
cmp dword [0x160274de4], eax
jle 0x16009ce97
lea rcx, [0x160274de4]
call fcn.16006e658
cmp dword [0x160274de4], 0xffffffff
jne 0x16009ce97
lea rdx, [rsp + 0x68]
lea rcx, [0x160274258]
call fcn.16000b228
lea rcx, [0x16007bb70]
call fcn.16006ead0
nop
lea rcx, [0x160274de4]
call fcn.16006e5ec
xor edx, edx
lea rcx, [rbp - 0x50]
call fcn.160034ad4
mov rcx, rax
lea rdx, [0x160274258]
call fcn.16005d1c0
movzx ebx, al
xor r8d, r8d
mov dl, 1
lea rcx, [rsp + 0x68]
call fcn.160025718
nop
mov rcx, qword [rsp + 0x38]
test rcx, rcx
je 0x16005b78f
call qword [sym.imp.api_ms_win_core_com_l1_1_0.dll_CoTaskMemFree]
nop
jmp 0x16005b78f
mov rax, qword [rsi]
mov rcx, rsi
mov rax, qword [rax + 8]
call qword [case.0x16003fc5a.0]
lea rax, [rsi + 0x10]
test rsi, rsi
mov edx, 0
cmove rax, rdx
mov qword [rbx], rax
jmp 0x16005b49e
mov eax, 0x80004003
jmp 0x16005b44c