Function at 0x140049d80
Capabilities:
Query or enumerate registry value

Disassembly:
mov r11, rsp
push rsi
push rdi
push r12
push r14
push r15
sub rsp, 0x60
mov qword [r11 - 0x50], 0xfffffffffffffffe
mov qword [r11 + 8], rbx
mov qword [r11 + 0x10], rbp
mov r10, r9
mov rax, r8
mov rsi, rdx
mov r15, rcx
xor r12d, r12d
mov edi, r12d
mov qword [r11 - 0x48], r12
mov dword [r11 - 0x40], r12d
mov qword [r11 - 0x38], r12
mov qword [r11 + 0x18], r12
lea rcx, [r11 + 0x18]
mov qword [r11 - 0x68], rcx
mov r9d, 0x2001f
xor r8d, r8d
mov rdx, qword [rax]
mov rcx, r10
call qword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x140049fa7
mov dword [rsp + 0x48], r12d
mov rdi, qword [rsp + 0xa0]
mov qword [rsp + 0x40], rdi
mov rax, qword [r15]
mov ebx, 1
mov ecx, ebx
sub ecx, dword [rax - 8]
mov eax, dword [rax - 0xc]
sub eax, 0x800
or eax, ecx
jge 0x140049e1e
mov edx, 0x800
mov rcx, r15
call fcn.1400023b0
mov r14, qword [r15]
cmp dword [r14 - 0xc], 0x800
jge 0x140049e36
mov ecx, 0x80070057
call fcn.140001920
int3
mov dword [r14 - 0x10], 0x800
mov rax, qword [r15]
mov word [rax + 0x1000], r12w
mov dword [rsp + 0xa0], 0x1000
mov ebp, r12d
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x30]
xor r8d, r8d
mov rdx, qword [rsi]
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov esi, eax
test eax, eax
jne 0x140049ec7
mov eax, dword [rsp + 0x30]
dec eax
cmp eax, ebx
jbe 0x140049e94
mov esi, 0xd
jmp 0x140049ec7
mov ecx, dword [rsp + 0xa0]
test r14, r14
je 0x140049ec0
test ecx, ecx
je 0x140049ebc
test bl, cl
jne 0x140049eb5
mov eax, ecx
shr rax, 1
cmp word [r14 + rax*2 - 2], bp
je 0x140049ec0
mov esi, 0xd
jmp 0x140049ec7
mov word [r14], r12w
mov ebp, ecx
shr ebp, 1
mov esi, r12d
mov r8d, dword [0x1401c3d80]
lea ecx, [r8 + 1]
imul ecx, r8d
mov eax, 0x6bca1af3
imul ecx
sar edx, 3
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x13
sub ecx, edx
cmp ecx, 3
jne 0x140049ef7
inc dword [0x1401c4e94]
lea eax, [rbp - 1]
cmp eax, 0xffffffff
jne 0x140049f1c
mov rcx, qword [r15]
test rcx, rcx
jne 0x140049f0c
mov eax, r12d
jmp 0x140049f20
movsxd rdx, dword [rcx - 0xc]
call fcn.1400ce73c
mov r8d, dword [0x1401c3d80]
test eax, eax
js 0x140049f9c
mov rcx, qword [r15]
cmp eax, dword [rcx - 0xc]
jg 0x140049f9c
mov dword [rcx - 0x10], eax
movsxd rcx, eax
mov rax, qword [r15]
mov word [rax + rcx*2], r12w
lea ecx, [r8 + 2]
lea eax, [r8 + 1]
imul ecx, eax
imul ecx, r8d
mov eax, 0x30c30c31
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add edx, eax
imul edx, edx, 0x15
sub ecx, edx
cmp ecx, 2
jne 0x140049f7a
cmp r8d, ebx
jle 0x140049f74
mov eax, r8d
cdq
idiv ebx
inc ebx
add ebx, edx
cmp ebx, r8d
jl 0x140049f65
mov dword [0x1401c3d80], ebx
test rdi, rdi
je 0x140049f90
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov rdi, r12
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x48], r12d
test esi, esi
sete bl
jmp 0x140049fa9
mov ecx, 0x80070057
call fcn.140001920
int3
xor bl, bl
test rdi, rdi
je 0x140049fbc
mov rcx, rdi
call qword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov qword [rsp + 0x40], r12
mov dword [rsp + 0x48], r12d
movzx eax, bl
lea r11, [rsp + 0x60]
mov rbx, qword [r11 + 0x30]
mov rbp, qword [r11 + 0x38]
mov rsp, r11
pop r15
pop r14
pop r12
pop rdi
pop rsi
ret