Function at 0x1400585e0
Capabilities:
Query or enumerate registry key

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
mov eax, 0x10130
call fcn.14009a1c0
sub rsp, rax
mov qword [rsp + 0xb0], 0xfffffffffffffffe
mov qword [rsp + 0x10180], rbx
mov rax, qword [0x1400d2478]
xor rax, rsp
mov qword [rsp + 0x10120], rax
mov r14, rdx
mov rbp, rcx
mov r13d, 4
mov qword [rsp + 0xd8], 7
xor r15d, r15d
mov qword [rsp + 0xd0], r15
mov word [rsp + 0xc0], r15w
lea r8d, [r13 + 0x1b]
lea rdx, str.SystemInfo::SI_GetUsersHivePath
lea rcx, [rsp + 0xb8]
call fcn.140001870
nop
lea r9, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae r9, qword [rsp + 0xc0]
lea rax, str.Function_start
mov qword [rsp + 0x20], rax
lea edx, [r13 + 0x2e]
lea r8d, [r13 - 3]
mov rcx, rbp
call fcn.1400144a0
mov qword [rsp + 0x68], r15
mov rdx, qword [r14 + 0x30]
mov rdx, qword [rdx + 8]
mov rcx, r14
call fcn.140011580
mov rdx, qword [r14 + 0x30]
mov qword [rdx + 8], rdx
mov qword [r14 + 0x38], r15
mov rax, qword [r14 + 0x30]
mov qword [rax], rax
mov rax, qword [r14 + 0x30]
mov qword [rax + 0x10], rax
lea rax, [rsp + 0x68]
mov qword [rsp + 0x20], rax
lea r9d, [r13 + 5]
xor r8d, r8d
lea rdx, str.SoftwareMicrosoftWindows_NTCurrentVersionProfileList
mov rcx, 0xffffffff80000002
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140058b78
mov qword [rsp + 0x58], r15
mov qword [rsp + 0x50], r15
mov qword [rsp + 0x48], r15
lea rax, [rsp + 0xac]
mov qword [rsp + 0x40], rax
lea rax, [rsp + 0xa8]
mov qword [rsp + 0x38], rax
mov qword [rsp + 0x30], r15
lea rax, [rsp + 0x60]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x74]
mov qword [rsp + 0x20], rax
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyW]
test eax, eax
jne 0x140058b1b
mov eax, dword [rsp + 0x60]
inc eax
mov dword [rsp + 0x60], eax
mov ecx, eax
mov eax, 2
mul rcx
mov rdi, 0xffffffffffffffff
cmovo rax, rdi
mov rcx, rax
call fcn.140067ea4
mov rbx, rax
test rax, rax
je 0x140058add
mov esi, dword [rsp + 0x74]
dec esi
js 0x140058ad0
lea r12, str.Error___i__return_by_function___s_
nop word [rax + rax]
mov eax, dword [rsp + 0x60]
mov dword [rsp + 0x70], eax
mov qword [rsp + 0x38], r15
mov qword [rsp + 0x30], r15
mov qword [rsp + 0x28], r15
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x70]
mov r8, rbx
mov edx, esi
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegEnumKeyExW]
test eax, eax
jne 0x140058a77
mov qword [rsp + 0x100], 7
mov qword [rsp + 0xf8], r15
mov word [rsp + 0xe8], r15w
mov qword [rsp + 0xa0], 7
mov qword [rsp + 0x98], r15
mov word [rsp + 0x88], r15w
xor eax, eax
mov rcx, rdi
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbx
lea rcx, [rsp + 0x80]
call fcn.140001870
lea rdx, [rsp + 0x80]
mov rcx, rbp
call fcn.14005f3f0
test eax, eax
je 0x140058a5d
mov byte [rsp + 0x20], 0
lea r9, [rsp + 0xe0]
lea r8, str.ProfileImagePath
mov rdx, rbx
mov rcx, qword [rsp + 0x68]
call fcn.140033fa0
test al, al
je 0x140058a13
mov word [rsp + 0x110], r15w
xor edx, edx
mov r8d, 0x10000
lea rcx, [rsp + 0x112]
call fcn.1400719a0
mov dword [rsp + 0x78], 0x10001
lea rcx, [rsp + 0xe8]
cmp qword [rsp + 0x100], 8
cmovae rcx, qword [rsp + 0xe8]
lea r8, [rsp + 0x78]
lea rdx, [rsp + 0x110]
call fcn.140057b20
test al, al
je 0x14005896d
mov qword [rsp + 0xa0], 7
mov qword [rsp + 0x98], r15
mov word [rsp + 0x88], r15w
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rbx
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
mov rdx, rbx
lea rcx, [rsp + 0x80]
call fcn.140001870
nop
lea rdx, [rsp + 0x80]
mov rcx, r14
call fcn.1400099b0
mov r11, rax
xor eax, eax
or rcx, 0xffffffffffffffff
lea rdi, [rsp + 0x110]
repne scasw ax, word [rdi]
not rcx
lea r8, [rcx - 1]
lea rdx, [rsp + 0x110]
mov rcx, r11
call fcn.140001870
nop
cmp qword [rsp + 0xa0], 8
jb 0x140058965
mov rcx, qword [rsp + 0x88]
call fcn.140065920
mov r13d, r15d
jmp 0x140058a5d
lea rax, [rsp + 0xe8]
cmp qword [rsp + 0x100], 8
cmovae rax, qword [rsp + 0xe8]
lea r9, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae r9, qword [rsp + 0xc0]
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x28], rbx
lea rax, str.Parameter___s_:__s
mov qword [rsp + 0x20], rax
mov edx, reloc.Cabinet.dll_FDICreate
lea r8d, [rdx - 0x13]
mov rcx, rbp
call fcn.1400144a0
lea rdi, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae rdi, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.SI_ExpandEnvironmentStrings
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r12
mov r9, rdi
mov edx, reloc.Cabinet.dll_FDICreate
lea r8d, [rdx - 0x13]
mov rcx, rbp
call fcn.1400144a0
jmp 0x140058a5d
lea rdi, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae rdi, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.ReadStringFormRegistry
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r12
mov r9, rdi
mov edx, reloc.Cabinet.dll_FDICreate
lea r8d, [rdx - 0x13]
mov rcx, rbp
call fcn.1400144a0
nop
cmp qword [rsp + 0x100], 8
jb 0x140058ac0
mov rcx, qword [rsp + 0xe8]
call fcn.140065920
jmp 0x140058ac0
lea rdi, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae rdi, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.RegEnumKeyEx
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], eax
mov qword [rsp + 0x20], r12
mov r9, rdi
mov edx, reloc.Cabinet.dll_FDICreate
lea r8d, [rdx - 0x13]
mov rcx, rbp
call fcn.1400144a0
sub esi, 1
mov rdi, 0xffffffffffffffff
jns 0x1400587a0
mov rcx, rbx
call fcn.140067eac
jmp 0x140058b6b
mov r13d, 9
lea r9, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae r9, qword [rsp + 0xc0]
lea rax, str.Insufficient_memory
mov qword [rsp + 0x20], rax
lea edx, [r13 + 0xb]
lea r8d, [r13 - 8]
mov rcx, rbp
call fcn.1400144a0
jmp 0x140058b6b
lea rdi, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae rdi, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.RegQueryInfoKey
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], eax
lea r12, str.Error___i__return_by_function___s_
mov qword [rsp + 0x20], r12
mov r9, rdi
mov edx, reloc.Cabinet.dll_FDICreate
lea r8d, [rdx - 0x13]
mov rcx, rbp
call fcn.1400144a0
mov rcx, qword [rsp + 0x68]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x140058bc8
lea rdi, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae rdi, qword [rsp + 0xc0]
call qword [sym.imp.KERNEL32.dll_GetLastError]
lea rcx, str.RegOpenKeyEx
mov qword [rsp + 0x30], rcx
mov dword [rsp + 0x28], eax
lea r12, str.Error___i__return_by_function___s_
mov qword [rsp + 0x20], r12
mov r9, rdi
mov edx, reloc.Cabinet.dll_FDICreate
lea r8d, [rdx - 0x13]
mov rcx, rbp
call fcn.1400144a0
lea r9, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae r9, qword [rsp + 0xc0]
mov dword [rsp + 0x28], r13d
lea rax, str.Return_code__0x_x_
mov qword [rsp + 0x20], rax
mov edx, 0x28
lea r8d, [rdx - 0x27]
mov rcx, rbp
call fcn.1400144a0
lea r9, [rsp + 0xc0]
cmp qword [rsp + 0xd8], 8
cmovae r9, qword [rsp + 0xc0]
lea rax, str.Function_end
mov qword [rsp + 0x20], rax
mov edx, 0x32
lea r8d, [rdx - 0x31]
mov rcx, rbp
call fcn.1400144a0
nop
cmp qword [rsp + 0xd8], 8
jb 0x140058c59
mov rcx, qword [rsp + 0xc0]
call fcn.140065920
mov eax, r13d
jmp 0x140058c5c
mov eax, r13d
mov rcx, qword [rsp + 0x10120]
xor rcx, rsp
call fcn.140064b70
mov rbx, qword [rsp + 0x10180]
add rsp, 0x10130
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret