Function at 0x140017138
Capabilities:
Get windows directory from kuser_shared_data
Query or enumerate registry value

Disassembly:
mov rax, rsp
mov qword [rax + 0x10], rbx
mov qword [rax + 0x18], rsi
mov qword [rax + 0x20], rdi
push rbp
push r14
push r15
lea rbp, [rax - 0x618]
sub rsp, 0x700
mov rax, qword [0x1400277a0]
xor rax, rsp
mov qword [rbp + 0x5f0], rax
mov rsi, rcx
mov ebx, 0x20a
mov r8d, ebx
lea rcx, [rbp + 0x1d0]
xor edx, edx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
mov r8d, ebx
lea rcx, [rbp - 0x40]
xor edx, edx
call sub.api_ms_win_crt_string_l1_1_0.dll_memset
xor r14d, r14d
cmp dword [rsi + 4], 0x210
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x48], r14
mov qword [rsp + 0x50], r14
jne 0x140017475
lea r15d, [r14 + 1]
cmp dword [rsi], r15d
jne 0x140017475
mov r8, qword [rsi + 8]
lea rcx, [rsp + 0x60]
call fcn.140017048
mov ebx, eax
test eax, eax
jns 0x1400171f5
lea r9, str.Failed_to_hash_File_path___x_
lea r8d, [r14 + 0x79]
lea rdx, str.AeWERQueryFileInfo
mov dword [rsp + 0x20], eax
mov ecx, r15d
call fcn.14000ac0c
jmp 0x14001747a
lea rax, str.AppCompatPrograms
mov r9d, 0x7ffe0030
lea r8, str._s_s
mov qword [rsp + 0x20], rax
mov edx, 0x105
lea rcx, [rbp - 0x40]
call fcn.14000156c
mov ebx, eax
test eax, eax
jns 0x140017231
lea r9, str.StringCchPrintf_for_StoreDirectory___x_
mov r8d, 0x87
jmp 0x1400171dd
lea r8, [rbp - 0x40]
lea rcx, [rbp + 0x1d0]
call fcn.1400174f4
mov ebx, eax
test eax, eax
jns 0x140017256
lea r9, str.AeGetPersistedLocation_failed___x_
mov r8d, 0x92
jmp 0x1400171dd
lea rax, str.Amcache.hve
mov edx, 0x104
lea r9, [rbp + 0x1d0]
mov qword [rsp + 0x20], rax
lea r8, str._s_s
lea rcx, [rbp + 0x3e0]
call fcn.14000156c
mov ebx, eax
test eax, eax
jns 0x140017299
lea r9, str.StringCchPrintf___x_
mov r8d, 0xa0
jmp 0x1400171dd
mov ebx, 0x20019
mov dword [rsp + 0x20], r14d
mov r8d, ebx
lea rdx, [rsp + 0x58]
xor r9d, r9d
lea rcx, [rbp + 0x3e0]
call qword [sym.imp.ADVAPI32.dll_RegLoadAppKeyW]
nop dword [rax + rax]
mov edi, eax
test eax, eax
je 0x1400172fa
lea r9, str.RegLoadAppKey_failed___d_
mov r8d, 0xab
lea rdx, str.AeWERQueryFileInfo
mov dword [rsp + 0x20], edi
mov ecx, r15d
call fcn.14000ac0c
movzx ebx, di
or ebx, 0x80070000
test edi, edi
cmovle ebx, edi
jmp 0x14001747a
mov rcx, qword [rsp + 0x58]
lea rax, [rsp + 0x50]
mov r9d, ebx
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.Root
call qword [sym.imp.KERNEL32.dll_RegOpenKeyExW]
nop dword [rax + rax]
mov edi, eax
test eax, eax
je 0x14001733c
cmp eax, 2
je 0x1400172e7
lea r9, str.Failed_to_open_file_key___d_
mov r8d, 0xb8
jmp 0x1400172d4
mov rcx, qword [rsp + 0x50]
lea rax, [rsp + 0x48]
mov r9d, ebx
mov qword [rsp + 0x20], rax
xor r8d, r8d
lea rdx, str.InventoryApplicationFile
call qword [sym.imp.KERNEL32.dll_RegOpenKeyExW]
nop dword [rax + rax]
mov edi, eax
test eax, eax
je 0x140017385
cmp eax, 2
je 0x1400172e7
lea r9, str.Failed_to_open_file_key___d_
mov r8d, 0xc2
jmp 0x1400172d4
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea rbx, [rsi + 0x10]
mov r15d, 0x100
mov qword [rsp + 0x28], rbx
mov r9d, 2
mov qword [rsp + 0x20], r14
lea r8, str.ProgramId
mov dword [rsp + 0x40], r15d
lea rdx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_RegGetValueW]
nop dword [rax + rax]
mov edi, 3
test eax, 0xfffffffd
je 0x1400173f4
lea r9, str.Failed_to_get_program_id___d_
mov dword [rsp + 0x20], eax
lea r8d, [r15 - 0x29]
mov ecx, edi
lea rdx, str.AeWERQueryFileInfo
call fcn.14000ac0c
mov rcx, qword [rsp + 0x48]
lea rax, [rsp + 0x40]
mov qword [rsp + 0x30], rax
lea r8, str.FileId
add rsi, 0x110
mov dword [rsp + 0x40], r15d
mov qword [rsp + 0x28], rsi
lea rdx, [rsp + 0x60]
mov r9d, 2
mov qword [rsp + 0x20], r14
call qword [sym.imp.KERNEL32.dll_RegGetValueW]
nop dword [rax + rax]
test eax, 0xfffffffd
je 0x14001745d
lea r9, str.Failed_to_get_file_id___d_
mov dword [rsp + 0x20], eax
mov r8d, 0xea
lea rdx, str.AeWERQueryFileInfo
mov ecx, edi
call fcn.14000ac0c
cmp word [rsi], r14w
jne 0x140017470
cmp word [rbx], r14w
jne 0x140017470
mov ebx, 0x80070002
jmp 0x14001747a
mov ebx, r14d
jmp 0x14001747a
mov ebx, 0x80070057
mov rcx, qword [rsp + 0x48]
test rcx, rcx
je 0x140017490
call qword [sym.imp.KERNEL32.dll_RegCloseKey]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x50]
test rcx, rcx
je 0x1400174a6
call qword [sym.imp.KERNEL32.dll_RegCloseKey]
nop dword [rax + rax]
mov rcx, qword [rsp + 0x58]
test rcx, rcx
je 0x1400174bc
call qword [sym.imp.KERNEL32.dll_RegCloseKey]
nop dword [rax + rax]
mov eax, ebx
mov rcx, qword [rbp + 0x5f0]
xor rcx, rsp
call fcn.1400199f0
lea r11, [rsp + 0x700]
mov rbx, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rdi, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop rbp
ret