Function at 0x16016b5d0
Capabilities:
Get common file path

Disassembly:
mov qword [rsp + 0x20], rbp
push rsi
sub rsp, 0x280
mov rax, qword [0x160270bd8]
xor rax, rsp
mov qword [rsp + 0x270], rax
xor ebp, ebp
mov dword [rsp + 0x48], 4
lea rax, [rsp + 0x48]
mov byte [rcx], bpl
mov qword [rsp + 0x30], rax
lea r8, str.CatalogLogOnCorruption
lea rax, [rsp + 0x4c]
mov rsi, rcx
mov qword [rsp + 0x28], rax
lea r9d, [rbp + 0x10]
lea rdx, str.SOFTWAREMicrosoftWindows_Search
mov qword [rsp + 0x20], rbp
mov rcx, 0xffffffff80000002
call fcn.16005ac0c
test eax, eax
jne 0x16016b824
cmp dword [rsp + 0x4c], ebp
je 0x16016b824
lea rax, [rsp + 0x60]
xor r9d, r9d
xor r8d, r8d
mov qword [rsp + 0x20], rax
lea edx, [rbp + 0x23]
xor ecx, ecx
call qword [sym.imp.ext_ms_win_shell32_shellfolders_l1_1_0.dll_SHGetFolderPathW]
test eax, eax
js 0x16016b7d4
mov ecx, 0x104
mov qword [rsp + 0x298], rbx
mov edx, ecx
lea rax, [rsp + 0x60]
cmp word [rax], bp
je 0x16016b68e
add rax, 2
sub rdx, 1
jne 0x16016b67f
test rdx, rdx
mov ebx, 0x80070057
mov rax, rcx
mov r8, rbp
cmovne ebx, ebp
sub rax, rdx
test rdx, rdx
cmovne r8, rax
je 0x16016b704
lea rdx, [rsp + 0x60]
lea rdx, [rdx + r8*2]
sub rcx, r8
je 0x16016b6ee
lea rax, [r8 + 0x7ffffefa]
add rax, rcx
lea r8, str.MicrosoftSearchCatalogCorruptionLoglogdata.txt
sub r8, rdx
test rax, rax
je 0x16016b6ee
movzx r9d, word [r8 + rdx]
test r9w, r9w
je 0x16016b6ee
mov word [rdx], r9w
dec rax
add rdx, 2
sub rcx, 1
jne 0x16016b6cd
test rcx, rcx
lea rax, [rdx - 2]
mov ebx, 0x8007007a
cmovne rax, rdx
cmovne ebx, ebp
mov word [rax], bp
test ebx, ebx
js 0x16016b820
mov qword [rsp + 0x30], rbp
lea rcx, [rsp + 0x60]
mov dword [rsp + 0x28], ebp
xor r9d, r9d
xor r8d, r8d
mov dword [rsp + 0x20], 3
mov edx, 0x80000000
mov qword [rsp + 0x2a0], rdi
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x16016b7f5
xor r9d, r9d
lea rdx, [rsp + 0x40]
xor r8d, r8d
mov rcx, rax
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_GetFileTime]
test eax, eax
jne 0x16016b775
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ebx, eax
test eax, eax
jle 0x16016b775
movzx ebx, ax
or ebx, 0x80070000
test ebx, ebx
js 0x16016b7b9
mov rax, qword [rsp + 0x40]
movabs rcx, 0xc92a69c000
add rax, rcx
lea rcx, [rsp + 0x50]
mov dword [rsp + 0x40], eax
shr rax, 0x20
mov dword [rsp + 0x44], eax
call qword [sym.imp.api_ms_win_core_sysinfo_l1_1_0.dll_GetSystemTimeAsFileTime]
lea rdx, [rsp + 0x50]
lea rcx, [rsp + 0x40]
call qword [sym.imp.api_ms_win_core_file_l1_1_0.dll_CompareFileTime]
test eax, eax
jns 0x16016b7b9
mov byte [rsi], 1
mov rcx, rdi
call qword [sym.imp.api_ms_win_core_handle_l1_1_0.dll_CloseHandle]
mov eax, ebx
mov rdi, qword [rsp + 0x2a0]
mov rbx, qword [rsp + 0x298]
mov rcx, qword [rsp + 0x270]
xor rcx, rsp
call fcn.16006e590
mov rbp, qword [rsp + 0x2a8]
add rsp, 0x280
pop rsi
ret
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_GetLastError]
mov ecx, eax
test eax, eax
jle 0x16016b80a
movzx ecx, ax
or ecx, 0x80070000
lea eax, [rcx + 0x7ff8fffe]
cmp eax, 1
ja 0x16016b81c
mov byte [rsi], 1
mov eax, ebp
jmp 0x16016b7c4
mov eax, ecx
jmp 0x16016b7c4
mov eax, ebx
jmp 0x16016b7cc
mov eax, ebp
jmp 0x16016b7d4