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

Disassembly:
push rsi
push rdi
push r15
sub rsp, 0x50
mov rax, qword [0x140008008]
xor rax, rsp
mov qword [rsp + 0x38], rax
mov rsi, r8
mov r15, rdx
mov rdi, rcx
test r8, r8
jne 0x1400013b0
mov eax, 0xa0
jmp 0x14000158a
xor ecx, ecx
mov qword [rsp + 0x88], rbx
lea rax, [rsp + 0x30]
mov dword [rsp + 0x34], ecx
mov qword [rsp + 0x28], rax
lea r9, [rsp + 0x34]
mov qword [rsp + 0x20], rcx
xor r8d, r8d
mov dword [rsp + 0x30], ecx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov ebx, eax
test eax, eax
je 0x140001412
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r9, r15
lea r8, str.get_reg_string
lea rdx, str._s:_enumerating___ls__registry_value_failed
mov ecx, 0x120
call section..text
mov eax, ebx
jmp 0x140001582
mov r9d, dword [rsp + 0x34]
mov eax, r9d
sub eax, 1
je 0x140001446
cmp eax, 1
je 0x140001446
lea r8, str.get_reg_string
mov ecx, 0x20
lea rdx, str._s:___ls__registry_value_is_not_string__type__u_
call section..text
mov eax, 0x65e
jmp 0x140001582
mov ecx, dword [rsp + 0x30]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rbx, rax
test rax, rax
jne 0x14000147d
mov r9d, dword [rsp + 0x30]
lea r8, str.get_reg_string
lea rdx, str._s:_malloc__u__failed
lea ecx, [rax + 0x10]
call section..text
lea ecx, [rbx + 1]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3
lea rax, [rsp + 0x30]
xor r9d, r9d
mov qword [rsp + 0x28], rax
xor r8d, r8d
mov rdx, r15
mov qword [rsp + 0x20], rbx
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edi, eax
test eax, eax
je 0x1400014d7
mov ecx, eax
call qword [sym.imp.KERNEL32.dll_SetLastError]
mov r9, r15
lea r8, str.get_reg_string
lea rdx, str._s:_reading___ls__registry_value_failed
mov ecx, 0x120
call section..text
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov eax, edi
jmp 0x140001582
cmp dword [rsp + 0x34], 2
jne 0x140001614
mov eax, dword [rsp + 0x30]
mov qword [rsp + 0x48], rbp
mov qword [rsp + 0x40], r14
lea r14d, [rax + rax]
mov ebp, r14d
mov ecx, r14d
shr ebp, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
mov rcx, rbx
test rax, rax
jne 0x140001536
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov r9d, r14d
lea r8, str.get_reg_string
lea rdx, str._s:_malloc__u__failed
lea ecx, [rdi + 0x10]
call section..text
lea ecx, [rdi + 1]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3
mov r8d, ebp
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov r14d, eax
test eax, eax
jne 0x1400015a0
mov r9, r15
lea r8, str.get_reg_string
lea rdx, str._s:_expanding___ls__registry_value_failed
mov ecx, 0x120
call section..text
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbp, qword [rsp + 0x48]
mov r14, qword [rsp + 0x40]
xor eax, eax
mov rbx, qword [rsp + 0x88]
mov rcx, qword [rsp + 0x38]
xor rcx, rsp
call fcn.140003170
add rsp, 0x50
pop r15
pop rdi
pop rsi
ret
lfence
cmp r14d, ebp
jbe 0x140001603
mov rcx, rdi
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lea ebp, [r14 + r14]
mov ecx, ebp
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rdi, rax
lfence
mov rcx, rbx
test rax, rax
jne 0x1400015f7
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
lfence
mov r9d, ebp
lea r8, str.get_reg_string
lea rdx, str._s:_malloc__u__failed
lea ecx, [rdi + 0x10]
call section..text
lea ecx, [rdi + 1]
call qword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__exit]
int3
mov r8d, r14d
mov rdx, rdi
call qword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov qword [rsi], rdi
jmp 0x140001576
mov qword [rsi], rbx
jmp 0x140001580