Function at 0x100046d50
Capabilities:
Query or enumerate registry value

Disassembly:
mov rax, rsp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x80
mov qword [rsp + 0x48], 0xfffffffffffffffe
mov qword [rax + 8], rbx
mov qword [rax + 0x10], rbp
mov rbx, r8
mov r12, rdx
lea rax, [0x100153eb8]
mov r13d, 5
mov rcx, qword [0x100153eb8]
cmp rcx, rax
je 0x100046db7
test byte [rcx + 0x1c], 1
je 0x100046db7
cmp byte [rcx + 0x19], r13b
jb 0x100046db7
mov edx, 0x102
mov r9, qword [r12]
lea r8, [0x10001e5a0]
mov rcx, qword [rcx + 0x10]
call fcn.1000347a8
xor r14d, r14d
mov qword [rsp + 0x50], r14
mov qword [rsp + 0x58], r14
mov qword [rsp + 0x60], r14
mov rbp, r14
mov qword [rsp + 0x68], r14
mov qword [rsp + 0x70], r14
mov qword [rsp + 0x78], r14
mov rcx, rbx
call fcn.100035fe0
mov qword [rsp + 0x38], r14
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], 0x2011f
mov dword [rsp + 0x20], r14d
xor r9d, r9d
lea r8, [0x10001fa10]
mov rdx, 0xffffffff80000002
lea rcx, [rsp + 0x50]
call fcn.10004f55c
mov esi, eax
mov rdi, qword [0x100153eb8]
lea rax, [0x100153eb8]
cmp rdi, rax
je 0x100046e62
test byte [rdi + 0x1c], 2
je 0x100046e62
movzx eax, byte [rdi + 0x19]
lea edx, [r14 + 2]
cmp esi, r14d
cmove edx, r13d
cmp eax, edx
jl 0x100046e62
mov edx, 0x103
mov r9d, esi
lea r8, [0x10001e5a0]
mov rcx, qword [rdi + 0x10]
call fcn.100036510
mov rdi, qword [0x100153eb8]
mov r13, qword [rsp + 0x50]
cmp esi, r14d
jne 0x100047062
mov qword [rsp + 0xc8], r14
lea rax, [rsp + 0xc8]
mov qword [rsp + 0x20], rax
mov r9d, 0x2011f
xor r8d, r8d
mov rdx, qword [r12]
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov esi, eax
cmp eax, r14d
jne 0x100046eb2
mov esi, r14d
mov rbp, qword [rsp + 0xc8]
mov qword [rsp + 0x68], rbp
mov rdi, qword [0x100153eb8]
lea rax, [0x100153eb8]
cmp rdi, rax
je 0x100046f09
test byte [rdi + 0x1c], 2
je 0x100046f09
mov ecx, 2
cmp esi, r14d
lea eax, [rcx + 3]
cmove ecx, eax
movzx eax, byte [rdi + 0x19]
cmp eax, ecx
jl 0x100046f09
mov rax, qword [r12]
mov edx, 0x104
mov qword [rsp + 0x20], rax
mov r9d, esi
lea r8, [0x10001e5a0]
mov rcx, qword [rdi + 0x10]
call fcn.10003ba64
mov rdi, qword [0x100153eb8]
cmp esi, r14d
jne 0x100047062
mov dword [rsp + 0x40], r14d
mov edi, r14d
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0xc8]
xor r8d, r8d
lea rdx, [0x10001fa90]
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, r14d
jne 0x100046f6a
cmp dword [rsp + 0xc8], 1
je 0x100046f61
cmp dword [rsp + 0xc8], 2
jne 0x10004705b
mov edi, dword [rsp + 0x40]
shr edi, 1
mov eax, r14d
cmp eax, r14d
jne 0x10004705b
inc edi
mov dword [rsp + 0xc8], edi
mov rax, qword [rbx]
mov ecx, 1
sub ecx, dword [rax - 8]
mov eax, dword [rax - 0xc]
sub eax, edi
or eax, ecx
jge 0x100046f9a
mov edx, edi
mov rcx, rbx
call fcn.100036160
mov r8, qword [rbx]
cmp edi, r14d
jl 0x100047050
cmp edi, dword [r8 - 0xc]
jg 0x100047050
mov dword [r8 - 0x10], edi
movsxd rcx, edi
mov rax, qword [rbx]
mov word [rax + rcx*2], r14w
lea r9, [rsp + 0xc8]
lea rdx, [0x10001fa90]
lea rcx, [rsp + 0x68]
call fcn.10004f4c0
cmp eax, r14d
jne 0x100047028
mov rdx, qword [rbx]
cmp rdx, r14
jne 0x100046fea
mov ecx, r14d
jmp 0x100047001
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
dec rcx
cmp ecx, r14d
jl 0x10004701d
cmp ecx, dword [rdx - 0xc]
jg 0x10004701d
mov dword [rdx - 0x10], ecx
movsxd rcx, ecx
mov rax, qword [rbx]
mov word [rax + rcx*2], r14w
mov rdi, qword [0x100153eb8]
jmp 0x100047062
mov ecx, 0x80070057
call fcn.100036284
int3
mov rax, qword [rbx]
cmp dword [rax - 0xc], r14d
jl 0x100047045
mov dword [rax - 0x10], r14d
mov rax, qword [rbx]
mov word [rax], r14w
mov rdi, qword [0x100153eb8]
jmp 0x100047062
mov ecx, 0x80070057
call fcn.100036284
int3
mov ecx, 0x80070057
call fcn.100036284
int3
mov rdi, qword [0x100153eb8]
lea rax, [0x100153eb8]
cmp rdi, rax
je 0x100047097
test byte [rdi + 0x1c], 1
je 0x100047097
mov eax, 5
cmp byte [rdi + 0x19], al
jb 0x100047097
mov edx, 0x105
mov r9, qword [rbx]
lea r8, [0x10001e5a0]
mov rcx, qword [rdi + 0x10]
call fcn.1000347a8
nop
cmp rbp, r14
je 0x1000470a6
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
cmp r13, r14
je 0x1000470b4
mov rcx, r13
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea r11, [rsp + 0x80]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r14
pop r13
pop r12
pop rdi
pop rsi
ret