Function at 0x100046cc4
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, [0x100152eb8]
mov r13d, 5
mov rcx, qword [0x100152eb8]
cmp rcx, rax
je 0x100046d2b
test byte [rcx + 0x1c], 1
je 0x100046d2b
cmp byte [rcx + 0x19], r13b
jb 0x100046d2b
mov edx, 0x102
mov r9, qword [r12]
lea r8, [0x10001e5a0]
mov rcx, qword [rcx + 0x10]
call fcn.100034788
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.100035fc0
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.10004f40c
mov esi, eax
mov rdi, qword [0x100152eb8]
lea rax, [0x100152eb8]
cmp rdi, rax
je 0x100046dd6
test byte [rdi + 0x1c], 2
je 0x100046dd6
movzx eax, byte [rdi + 0x19]
lea edx, [r14 + 2]
cmp esi, r14d
cmove edx, r13d
cmp eax, edx
jl 0x100046dd6
mov edx, 0x103
mov r9d, esi
lea r8, [0x10001e5a0]
mov rcx, qword [rdi + 0x10]
call fcn.100036328
mov rdi, qword [0x100152eb8]
mov r13, qword [rsp + 0x50]
cmp esi, r14d
jne 0x100046fd6
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 0x100046e26
mov esi, r14d
mov rbp, qword [rsp + 0xc8]
mov qword [rsp + 0x68], rbp
mov rdi, qword [0x100152eb8]
lea rax, [0x100152eb8]
cmp rdi, rax
je 0x100046e7d
test byte [rdi + 0x1c], 2
je 0x100046e7d
mov ecx, 2
cmp esi, r14d
lea eax, [rcx + 3]
cmove ecx, eax
movzx eax, byte [rdi + 0x19]
cmp eax, ecx
jl 0x100046e7d
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.10003b984
mov rdi, qword [0x100152eb8]
cmp esi, r14d
jne 0x100046fd6
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 0x100046ede
cmp dword [rsp + 0xc8], 1
je 0x100046ed5
cmp dword [rsp + 0xc8], 2
jne 0x100046fcf
mov edi, dword [rsp + 0x40]
shr edi, 1
mov eax, r14d
cmp eax, r14d
jne 0x100046fcf
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 0x100046f0e
mov edx, edi
mov rcx, rbx
call fcn.100036140
mov r8, qword [rbx]
cmp edi, r14d
jl 0x100046fc4
cmp edi, dword [r8 - 0xc]
jg 0x100046fc4
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.10004f370
cmp eax, r14d
jne 0x100046f9c
mov rdx, qword [rbx]
cmp rdx, r14
jne 0x100046f5e
mov ecx, r14d
jmp 0x100046f75
xor eax, eax
or rcx, 0xffffffffffffffff
mov rdi, rdx
repne scasw ax, word [rdi]
not rcx
dec rcx
cmp ecx, r14d
jl 0x100046f91
cmp ecx, dword [rdx - 0xc]
jg 0x100046f91
mov dword [rdx - 0x10], ecx
movsxd rcx, ecx
mov rax, qword [rbx]
mov word [rax + rcx*2], r14w
mov rdi, qword [0x100152eb8]
jmp 0x100046fd6
mov ecx, 0x80070057
call fcn.100036264
int3
mov rax, qword [rbx]
cmp dword [rax - 0xc], r14d
jl 0x100046fb9
mov dword [rax - 0x10], r14d
mov rax, qword [rbx]
mov word [rax], r14w
mov rdi, qword [0x100152eb8]
jmp 0x100046fd6
mov ecx, 0x80070057
call fcn.100036264
int3
mov ecx, 0x80070057
call fcn.100036264
int3
mov rdi, qword [0x100152eb8]
lea rax, [0x100152eb8]
cmp rdi, rax
je 0x10004700b
test byte [rdi + 0x1c], 1
je 0x10004700b
mov eax, 5
cmp byte [rdi + 0x19], al
jb 0x10004700b
mov edx, 0x105
mov r9, qword [rbx]
lea r8, [0x10001e5a0]
mov rcx, qword [rdi + 0x10]
call fcn.100034788
nop
cmp rbp, r14
je 0x10004701a
mov rcx, rbp
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
nop
cmp r13, r14
je 0x100047028
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