Function at 0x45e6ff
Capabilities:
Query or enumerate registry key
Query or enumerate registry value

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x7c8
cmp qword [rcx], 0
mov eax, 2
mov r12, rcx
mov rsi, rdx
je 0x45eaa9
mov rbx, qword [sym.imp.ADVAPI32.dll_RegOpenKeyA]
xor edx, edx
lea r8, [rsp + 0x98]
mov rcx, 0xffffffff80000003
call rbx
test eax, eax
mov qword [rsp + 0x68], rbx
jne 0x45eaa9
mov rax, qword [sym.imp.ADVAPI32.dll_RegEnumKeyExA]
xor ebp, ebp
mov qword [rsp + 0x70], rax
lea rdi, [rsp + 0x1b8]
mov dword [rsp + 0x80], 0x104
mov dword [rsp + 0x84], 0x200
mov dword [rsp + 0x88], 0x200
mov qword [rsp + 0x38], 0
lea r9, [rsp + 0x80]
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov r8, rdi
mov qword [rsp + 0x20], 0
mov edx, ebp
mov rcx, qword [rsp + 0x98]
mov rax, qword [rsp + 0x70]
call rax
test eax, eax
jne 0x45ea99
inc ebp
cmp byte [rsp + 0x1b8], 0x2e
je 0x45e75c
lea rdx, str._Classes
mov rcx, rdi
call sym.strstr
test rax, rax
jne 0x45e75c
lea rdx, [rsp + 0xa0]
mov rcx, rdi
call qword [r12]
test eax, eax
je 0x45e75c
lea rax, [rsp + 0x8c]
lea r13, [rsp + 0x3c0]
xor ecx, ecx
lea r9, [rsp + 0x84]
mov rdx, qword [rsp + 0xa0]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x88]
mov r8, r13
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x5c0]
mov qword [rsp + 0x20], rax
call qword [sym.imp.ADVAPI32.dll_LookupAccountSidA]
test eax, eax
je 0x45ea86
mov eax, dword [rsi + 4]
cmp dword [rsi], eax
jb 0x45e869
mov rcx, rsi
call sym.sigar_who_list_grow
mov ebx, dword [rsi]
mov rdx, r13
mov r8d, 0x20
lea r14, [rsp + 0x2bc]
lea eax, [rbx + 1]
imul rbx, rbx, 0x148
add rbx, qword [rsi + 8]
mov dword [rsi], eax
mov rcx, rbx
lea r15, [rbx + 0x40]
call sym.strncpy
lea rdx, [rsp + 0x5c0]
mov r8d, 0x100
mov rcx, r15
mov byte [rbx + 0x1f], 0
call sym.strncpy
lea rax, [rbx + 0x20]
lea rdx, str.console
mov r8d, 0x20
mov byte [rbx + 0x13f], 0
mov rcx, rax
mov qword [rsp + 0x78], rax
call sym.strncpy
mov r13, qword [rsp + 0x98]
lea r8, str._sVolatile_Environment
mov r9, rdi
mov edx, 0x104
mov rcx, r14
mov byte [rbx + 0x3f], 0
mov qword [rbx + 0x140], 0
call sym.snprintf_5
lea r8, [rsp + 0xa8]
mov rdx, r14
mov rcx, r13
mov rax, qword [rsp + 0x68]
call rax
test eax, eax
jne 0x45ea86
lea rdi, [rsp + 0xb0]
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rsp + 0x50], 0
mov qword [rsp + 0x48], 0
mov qword [rsp + 0x58], rdi
mov qword [rsp + 0x40], 0
mov qword [rsp + 0x38], 0
mov qword [rsp + 0x30], 0
mov qword [rsp + 0x28], 0
mov qword [rsp + 0x20], 0
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.ADVAPI32.dll_RegQueryInfoKeyA]
test eax, eax
jne 0x45e9ad
mov rdx, rdi
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_FileTimeToLocalFileTime]
mov rcx, rdi
call sym.sigar_FileTimeToTime
mov ecx, 0xf4240
xor edx, edx
div rcx
mov qword [rbx + 0x140], rax
lea r13, [rsp + 0x94]
lea r14, [rsp + 0x90]
lea rdi, [rsp + 0xb8]
xor r8d, r8d
mov dword [rsp + 0x90], 0x100
lea rdx, str.CLIENTNAME
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rdi
mov r9, r13
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x45ea2e
cmp byte [rsp + 0xb8], 0
je 0x45ea2e
lea rdx, str.Console
mov rcx, rdi
call sym.strcmp
test eax, eax
je 0x45ea2e
mov r8d, 0x100
mov rdx, rdi
mov rcx, r15
call sym.strncpy
mov byte [rbx + 0x13f], 0
xor r8d, r8d
mov dword [rsp + 0x90], 0x100
mov qword [rsp + 0x28], r14
mov qword [rsp + 0x20], rdi
mov r9, r13
lea rdx, str.SESSIONNAME
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExA]
test eax, eax
jne 0x45ea78
lea rcx, [rbx + 0x20]
mov r8d, 0x20
mov rdx, rdi
call sym.strncpy
mov byte [rbx + 0x3f], 0
mov rcx, qword [rsp + 0xa8]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rcx, qword [rsp + 0xa0]
call qword [sym.imp.KERNEL32.dll_LocalFree]
jmp 0x45e75c
mov rcx, qword [rsp + 0x98]
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
add rsp, 0x7c8
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret