Function at 0x1400178f0
Capabilities:
Query environment variable
Query or enumerate registry value

Disassembly:
push rsi
push rdi
push r14
sub rsp, 0x270
mov qword [rsp + 0x38], 0xfffffffffffffffe
mov qword [rsp + 0x2a8], rbx
mov rax, qword [0x1400c9158]
xor rax, rsp
mov qword [rsp + 0x260], rax
mov rsi, r8
mov rbx, rdx
mov rdi, rcx
xor ecx, ecx
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
mov rcx, qword [rdi + 0xb0]
test rcx, rcx
je 0x140017afa
mov dword [rsp + 0x30], 0x208
lea rax, [rsp + 0x30]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov r14d, eax
test eax, eax
jne 0x140017a91
mov ecx, dword [rsp + 0x34]
lea eax, [rcx - 1]
cmp eax, 1
ja 0x14003c4fc
cmp dword [rsp + 0x34], 2
je 0x140017aab
mov edx, dword [rsp + 0x30]
shr edx, 1
cmp r14d, 0xea
je 0x14003c548
cmp edx, dword [rsi + 0x10]
ja 0x14003c57f
mov rax, qword [rsi + 8]
mov edx, dword [rsp + 0x30]
shr rdx, 1
mov r10d, 0
mov r11d, r10d
je 0x14003c594
test r11d, r11d
js 0x14003c5ae
mov r11d, r10d
test rdx, rdx
je 0x14003c59f
mov r8d, 0x7ffffffe
sub r8, rdx
lea r9, [rsp + 0x50]
sub r9, rax
nop
lea rcx, [r8 + rdx]
test rcx, rcx
je 0x140017a15
movzx ecx, word [r9 + rax]
test cx, cx
je 0x140017a15
mov word [rax], cx
add rax, 2
sub rdx, 1
jne 0x1400179f0
jmp 0x14003c59f
test rdx, rdx
je 0x14003c59f
mov word [rax], r10w
mov rcx, qword [rsp + 0x288]
test r11d, r11d
js 0x14003c5bc
test r14d, r14d
jne 0x14003c5d0
mov eax, dword [rsp + 0x30]
shr eax, 1
mov dword [rsp + 0x30], eax
je 0x14003c60d
lea ecx, [rax - 1]
mov eax, dword [rsi + 0x10]
dec eax
cmp ecx, eax
ja 0x14003c5ed
mov dword [rsi + 0x14], ecx
mov rax, qword [rsi + 8]
mov word [rax + rcx*2], r10w
mov eax, 1
mov rcx, qword [rsp + 0x260]
xor rcx, rsp
call fcn.14002dd40
mov rbx, qword [rsp + 0x2a8]
add rsp, 0x270
pop r14
pop rdi
pop rsi
ret
cmp r14d, 0xea
je 0x140017978
mov ecx, r14d
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
xor eax, eax
jmp 0x140017a6d
cmp r14d, 0xea
je 0x14003c50a
mov edx, 0x104
mov rcx, rsi
call fcn.140017eac
mov r8d, 0x104
mov rdx, rax
lea rcx, [rsp + 0x50]
call qword [sym.imp.api_ms_win_core_processenvironment_l1_1_0.dll_ExpandEnvironmentStringsW]
mov dword [rsp + 0x30], eax
lea ecx, [rax - 1]
cmp ecx, 0x102
ja 0x14003c529
add eax, eax
mov dword [rsp + 0x30], eax
xor r10d, r10d
jmp 0x140017a33
mov ecx, 6
call qword [sym.imp.api_ms_win_core_errorhandling_l1_1_0.dll_SetLastError]
xor eax, eax
jmp 0x140017a6d
cmp ecx, 7
je 0x140017988
jmp 0x140017a9e
mov rcx, qword [rsp + 0x288]
mov r9d, 0xce
lea r8, str.onecoreuap_base_appmodel_search_searchcommonpkmutildcregistry.cxx
mov edx, 0x2e7
call fcn.1400029ec
mov rcx, qword [rsp + 0x288]
mov r9d, 0xce
lea r8, str.onecoreuap_base_appmodel_search_searchcommonpkmutildcregistry.cxx
mov edx, 0x2ed
call fcn.1400029ec
mov rcx, rsi
call fcn.140017eac
lea rcx, [rsp + 0x30]
mov qword [rsp + 0x28], rcx
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x34]
xor r8d, r8d
mov rdx, rbx
mov rcx, qword [rdi + 0xb0]
call qword [sym.imp.api_ms_win_core_registry_l1_1_0.dll_RegQueryValueExW]
mov r14d, eax
jmp 0x140017af2
mov rax, qword [rsi]
mov rcx, rsi
mov rax, qword [rax]
call qword [case.0x14000702c.0]
nop
jmp 0x1400179af
mov r11d, 0x80070057
jmp 0x1400179c9
sub rax, 2
mov r11d, 0x8007007a
jmp 0x140017a1e
test rdx, rdx
je 0x140017a22
jmp 0x140017a1e
mov r9d, r11d
lea r8, str.onecoreuap_base_appmodel_search_searchcommonpkmutildcregistry.cxx
mov edx, 0x2fc
call fcn.140048df4
mov rcx, qword [rsp + 0x288]
mov r9d, r14d
lea r8, str.onecoreuap_base_appmodel_search_searchcommonpkmutildcregistry.cxx
mov edx, 0x301
call fcn.1400029ec
nop
mov rcx, qword [rsp + 0x288]
mov r9d, 0xce
lea r8, str.onecoreuap_base_appmodel_search_searchcommonincludelmstr.hxx
mov edx, 0x153
call fcn.1400029ec
int3
xor edx, edx
mov rcx, rsi
call fcn.140017e50
nop
jmp 0x140017a68